geoffr
Posts: 85
Joined: Wed Aug 22, 2012 11:25 am
Location: Melbourne, VIC

Pi Zero W - setting up SSID for headless

Tue Apr 04, 2017 12:24 am

Firstly, I wanted to comment that the Pi zero W addresses probably one of the biggest things people have been requesting of the Pi Zero. Well done to the Foundation!

One of the challenges is that for someone setting up a headless Pi with a WiFi interface is that it can be challenging to set up the SSID of your WiFi network for your first boot.
To get ssh working, you can put a file called "ssh" on the FAT partition of the microSD card.
At the moment, to set up WiFi you either need a keyboard and display, console cable or the ability to set up your SSID, password and WiFi country (I am in Australia and I use channel 13, because very few other people are aware that you can use it). To set up WiFi, currently you need to put the microSd card into a Linux system and mount the ext4 filesystem.

What would potentially be useful is the ability to create a file on the SD card with the WiFi parameters so that they can be copied into /etc/wpa_supplicant/wpa_supplicant.conf. That would make it easier to do this configuration on a Mac or a Windows PC.

W. H. Heydt
Posts: 10769
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi Zero W - setting up SSID for headless

Tue Apr 04, 2017 1:11 am

You mean like putting a wpa_supplicant file in the /boot partition? A feature that already exists...

User avatar
HawaiianPi
Posts: 4534
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi Zero W - setting up SSID for headless

Tue Apr 04, 2017 1:17 am

W. H. Heydt wrote:You mean like putting a wpa_supplicant file in the /boot partition? A feature that already exists...
Yup. Along with the "ssh" file, create another file called "wpa_supplicant.conf" with the following information in it.

Code: Select all

network={
	ssid="your-router-SSID"
	psk="your-WPA/WPA2-passphrase"
}
When Raspbian finds this file in the boot partition (the partition that is visible to Windows/Mac) it will move it to the correct location and use it to connect.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

geoffr
Posts: 85
Joined: Wed Aug 22, 2012 11:25 am
Location: Melbourne, VIC

Re: Pi Zero W - setting up SSID for headless

Wed Apr 05, 2017 4:45 am

HawaiianPi wrote:
W. H. Heydt wrote:You mean like putting a wpa_supplicant file in the /boot partition? A feature that already exists...
Yup. Along with the "ssh" file, create another file called "wpa_supplicant.conf" with the following information in it.

Code: Select all

network={
	ssid="your-router-SSID"
	psk="your-WPA/WPA2-passphrase"
}
When Raspbian finds this file in the boot partition (the partition that is visible to Windows/Mac) it will move it to the correct location and use it to connect.
I missed that one. Thanks!

Return to “General discussion”