1uke_
Posts: 76
Joined: Thu Jul 07, 2016 9:19 pm

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

Sat Feb 03, 2018 3:59 pm

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.

klricks
Posts: 7158
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

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

Sat Feb 03, 2018 4:10 pm

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
}
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

ddmitry1973
Posts: 12
Joined: Thu Apr 20, 2017 6:57 am

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

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

1uke_
Posts: 76
Joined: Thu Jul 07, 2016 9:19 pm

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

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?

1uke_
Posts: 76
Joined: Thu Jul 07, 2016 9:19 pm

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

Sat Feb 03, 2018 5:02 pm

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.

klricks
Posts: 7158
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

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

Sat Feb 03, 2018 5:15 pm

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 !!!!
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
scruss
Posts: 3233
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

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

Sat Feb 03, 2018 7:51 pm

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
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

PhatFil
Posts: 1681
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

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

Sat Feb 03, 2018 8:32 pm

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..

1uke_
Posts: 76
Joined: Thu Jul 07, 2016 9:19 pm

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

Sat Feb 03, 2018 9:19 pm

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

1uke_
Posts: 76
Joined: Thu Jul 07, 2016 9:19 pm

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

Sun Feb 04, 2018 10:05 am

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

jbudd
Posts: 1429
Joined: Mon Dec 16, 2013 10:23 am

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

Sun Feb 04, 2018 10:12 am

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

Return to “Troubleshooting”