Page 1 of 1

Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 3:59 pm
by 1uke_
Hello,

I have a new Raspberry Pi Zero W.

I have burnt Raspbian Stretch Lite to the SD Card using etcher on my Mac

I have added a blank file called 'ssh'

I have also added a file called 'wpa-supplicant.conf'

Based on the information towards the bottom of this thread I have added the following to the 'wpa-supplicant.conf' file -viewtopic.php?f=28&t=176844

Code: Select all

network={
	ssid="your SSID"
	psk="your WPA2 passphrase"
}
But the Raspberry Pi Zero W is not showing up on my network.

What next steps can I take to fix this issue?

Just to mention I also have a Raspberry Pi 2 - so if I can do some set up using the the Pi 2 and then transfer the card over to the Pi Zero W that would be possible.

Thanks in advance.

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 4:10 pm
by klricks
The wpa config is not complete.
Change country to match your location.

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
        ssid="Your_SSID"
        psk="Your_PSK"
        key_mgmt=WPA-PSK
}

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 4:39 pm
by ddmitry1973
.... and make sure you have put
auto wlan0
as first line of wlan configuration section in /etc/network/interfaces

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 5:00 pm
by 1uke_
OK I have followed everything you have said @klricks but it is still not showing up on my network.

Any thoughts on what I can try next?

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 5:02 pm
by 1uke_
Thanks for the tip @ddmitry1973

how do I find /etc/network/interfaces?

Remember that I can't ssh in yet.

I am only able to access the SD card via my Mac at the moment at I can't see /etc/network/interfaces.

Let me know if there is another way for me to access /etc/network/interfaces

Thank you.

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 5:15 pm
by klricks
1uke_ wrote:
Sat Feb 03, 2018 5:00 pm
OK I have followed everything you have said @klricks but it is still not showing up on my network.

Any thoughts on what I can try next?
In router setup:
Encryption must be WPA or WPA2 not WEP
Make sure the SSID is not hidden.
Make sure WIFI is set to 2.4GHz or mixed (5G & 2.4G)

DO NOT change anything in /etc/network/interfaces !!!!

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 7:51 pm
by scruss
ddmitry1973 wrote:
Sat Feb 03, 2018 4:39 pm
.... and make sure you have put
auto wlan0
as first line of wlan configuration section in /etc/network/interfaces
I have never needed to do this for headless setup. It's also really hard to do on Mac & Windows, as you can't see the non-FAT partition

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 8:32 pm
by PhatFil
For good measure if not already done so give your router/AP and dhcp server a reboot. spent a few hours chassing my tail with a similar issue which resolved itself with a router reboot..

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sat Feb 03, 2018 9:19 pm
by 1uke_
Hi and thanks for the reply @klricks

I have set up the wpa-suplicant.conf with the details you provided.

I updated my country code.

I also updated
key_mgmt=WPA-PSK to key_mgmt=WPA2-PSK as I think my system used WPA2.

Below are my wifi settings so you can get a clearer understanding.

Image

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sun Feb 04, 2018 10:05 am
by 1uke_
Just wanted to add I have checked my wifi network and I can see my security is set to WPA2-Personal.

In my wpa-supplicant.conf file I have updated to the following

Code: Select all

key_mgmt=WPA-PSK
to

Code: Select all

key_mgmt=WPA2-PSK

Re: Pi Zero W - Headless Set-up issue (ssh and wpa-supplicant.conf files)

Posted: Sun Feb 04, 2018 10:12 am
by jbudd
key_mgmt=WPA-PSK is the default so you don't need this line at all.
WPA-PSK is the right setting for both WPA and WPA2