I have a pi zero w that was working fine until a power cycle, it came back up with no wifi. I asked on the raspbian forum and got a suggestion that an unplanned power cycle might have borked the generic SD card. I replaced the card with a Samsung branded 8GB and burned Raspbian onto it and followed instructions for wifi setup. No joy.

Can anyone suggest where I can download a copy of raspbian for the zero w with wifi properly configured? I'd like to burn it onto the SD then test the wifi before replacing the unit.


  • 3
  • 3
    with wifi properly configured? - all you need to do is set up /etc/wpa_supplicant/wpa_supplicant.conf - you can create a file called wpa_supplicant.conf on the boot partition, with the correct settings, and wifi will come up on first boot of the pi – Jaromanda X May 29 '20 at 2:14
  • Does it work if you down load RaspiOS 32-bit from raspberrypi.org/downloads? – Dougie May 30 '20 at 11:32
  • I got rasp pi 32 bit as Dougie suggested then used Andyroo's instructions. no go so far. Jaromanda X I have tried what you suggest but no luck, see below – Dave Stevens May 31 '20 at 20:04

You may have only killed to operating system on the card due to files not being closed at power down.

I have never actually lost a card / damaged a card by pulling out the power (a regular habit of mine).

By default, any Raspberry Pi OS will run on the Zero currently (this will change due to the move to 64bit announced today) but none of them come with WiFi defined partially due to them not knowing your WiFi details and partially due to legal requirements of some frequencies not being available in some countries.

I assume your Pi is not connected to a monitor / keyboard so you need to set the machine up in headless mode by creating the SD card using Etcher etc from the 32 bit images downloadable from here.

Once you have made the SD card, DO NOT eject it but add two files to the 'boot' drive you will have on your machine:

a) Create a file called ssh or ssh.txt with no contents. This will allow you to use Putty or terminal to ssh in to the Pi

b) Create a file called wpa_supplicant.conf to define your WiFi details. The bare minimum this file should have is dependant on your WiFi network but I find that this works well for most home networks:

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

You will need to change the GB to match your country code from the two letter codes documented in ISO 3166 and on Wikipedia.

If you are not using any security then change the psk line to read:


or better add security to the network.

If you are using a hidden SSID then add a line after the ssid that reads


(Note the Pi is not very good at finding hidden networks and they are a waste of time security wise).

This should then allow your Pi to connect to the network and let you ssh in to enable VNC if needed.

Full documentation on this is available on the RPF site.

  • I've done as you suggest unsuccessfully so far. I have now got ssh access over the wire. The wpa_supplicant.conf file is configured as per your text in /etc.No wifi signal from the unit. I've used linssid and it doesn't show up there. ifconfig shows,wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:94:40:d8 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 is there a relevant logfile? – Dave Stevens May 31 '20 at 19:43
  • Put the file in /boot and then try a reboot. If you edit the question you can put the file in as code so we can see - just replace the SSID and password - leave the quotes etc as is :) – user115418 May 31 '20 at 20:18
  • For me, the Pi does not connect to the WiFi unless I configure static IP address (/etc/dhcpcd.conf) and actually configuring (/etc/wpa_supplicant/wpa_supplicant.conf). But I cannot get SSH to work. The ssh file stays on the boot partition and doesn't get deleted. – chx101 Mar 25 at 23:37

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