I got myself a Pi Zero W a few weeks back. After installing Raspbian on a sdcard and doing all the setup procedures (making the wpa_supplicant.conf file), I was able to connect it to my wifi. Then just a few days back, due to reasons, I had to re-install Raspbian on my SD card. After following the same procedures for setup for wifi connection, my Pi Zero hasn't been able to connect to my wifi. The wpa_supplicant.conf file contains this



Please, can anyone tell me a solution or if I am missing out any steps?

  • What is the output of sudo systemctl status dhcpcd ? And does sudo ifconfig show the WiFi interface? – RubberStamp Nov 13 '17 at 18:00
  • If this is the total content of the file, it is missing the header. What you have listed is intended to be APPENDED to the file. I believe Stretch is more strict than Jessie. – Milliways Nov 13 '17 at 22:46

My problems with the pi0w were seen in systemctl status dhcpcd which stated, that there were problems starting up. So I fixed my /etc/network/interfaces to:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
auto wlan0

iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

and the /etc/wpa_supplicant/wpa_supplicant.conf file contains:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


Since you do not want to write your password in clear text, you can issue

wpa_passphrase ssid pw

and the the resulting string for the network entry. This is a hashed password. But remember to delete the commented clear password. I hope this helps! Otherwise provide more data from your systemctl output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.