User avatar
Posts: 66
Joined: Sun Jan 01, 2012 10:05 am

Setup Jessie-lite headless and wireless HOWTO

Mon Aug 22, 2016 1:16 pm

This guide started as my own notes for setting up the Rpi zero for use with a camera and picamera python libraries but it applies to any Rpi. It assumes you are using a Linux computer.
It's not for complete beginners. You need know how to use the dd command and how to edit text files as the root user. You will also need to know a bit about your home network such as what IP addresses it uses, the IP address of your router and the ssid and psk of the wireless access point.
The dd command is used to write the SD card. There is a guide here http://elinux.org_Pi_Easy_SD_Card_Setup#Using_the_Linux_command_line
Once the card has been written leave it plugged in and edit the files as described in the guide. This will set the Rpi up to connect to your wireless network with a static IP address and (optionally) unique hostname so that you can login via ssh to complete the set up.
When you've finished head over here to play ... ipes1.html :D

Code: Select all

Write new SD card
(this is just a reminder of the dd options to use and to remember to do a sync)

#dd bs=4MB status=progress if=xxxxx of=wwwww

Set up Raspberry pi zero for wlan with fixed ip and ssh root login and add picam python libs

Once the SD card is written edit, as root, these files on the SD card.

edit /etc/wpa_supplicant/wpa_supplicant.conf
	add at the EOF

	ssid="your ssid"
	psk="your wireless password"

edit /etc/dhcpcd.conf
	add at the EOF (change ip numbers to suit your network)

	interface wlan0
	static ip_address=192.168.1.xx/24 (replace xx with the desired ip number)
	static routers=
	static domain_name_servers=

edit /etc/ssh/sshd_config
	Change the auth section to this. When you have finished all your development work you can revert this change.

	# Authentication:
	LoginGraceTime 120
	# PermitRootLogin without-password
	PermitRootLogin yes 
	StrictModes yes

edit /etc/hostname
	Delete raspberrypi and enter your chosen hostname eg picam1.

		On your computer as root edit /etc/hosts and add

		192.168.1.xx	picam1 (or whatever address and hostname you set)

Put the SD card in your pi zero, plug in your wifi dongle and camera and power it up. 

$ssh pi@192.168.1.xx (or whatever address you set)
	Or if you edited /etc/hosts use the hostname
$ssh pi@picam1

Login as pi password raspberry.

$ sudo passwd root (give a password for root)

Login as root

Update software

# apt-get update
# apt-get dist-upgrade

Regenerate OpenSSH keys

# rm -v /etc/ssh/ssh_host_*
# dpkg-reconfigure openssh-server

Note. The next time you SSH to the pi it will throw an error bcause the keys have changed.
To fix: On your computer edit ~/.ssh/known_hosts.
	Find the line that starts with the Rpis hostname or IP address and delete it.

Configure RPi

# raspi-config
	expand filesystem
	change user password
	enable camera
	advanced options -> memory split -> GPU 16

install picamera python libraries

	apt-get install python3 python3-picamera
	apt-get install libjpeg-dev (needed to install Pillow)
	apt-get install python3-pip
	pip3 install Pillow

LINUX convert since 2003

Posts: 1580
Joined: Thu Oct 09, 2014 2:50 am

Re: Setup Jessie-lite headless and wireless HOWTO

Tue Aug 23, 2016 9:11 pm

The Devs got a bit carried away with making Jessie-Lite ultra-lite and excluded a lot of useful applications that help to get it all going and doing what you wish. I think you are better off loading the full Jessie and striping things you don't need. Better yet, just get the next size up of uSD card. I fought that battle for a whlle and gave up.

Return to “Beginners”