Problem setting up headless pi zero w

Hi folks.

Recently bought a pi zero w from Core Electronics.

I have installed Raspian Buster Lite on the microSD card, and have create the ‘ssh’ and ‘wpa_supplicant.conf’ files:

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

network={
	ssid="mySSID"
	psk="myPassword"
        key_mgmt=WPA-PSK
	scan_ssid=1
}

In a Windows console, when I try to ping ‘raspberrypi’ or ‘raspberrypi.local’, this is displayed:

Ping request could not find host raspberrypi. Please check the name and try again.

When I try to use putty to SSH into the pi zero, an error window pops up with:

Unable to open connection to raspberrypi. Host does not exist.

When I put the SD card back into my laptop, I can see that both ‘ssh’ and '‘wpa_supplicant.conf’ have been deleted or moved, which means at least the pi recognised them and dealt with them.

Any ideas? Thank you.

EDIT: I am able to successfully ping the IP address of the pi zero, it just looks like I can’t ping the hostname ‘raspberrypi’ and ssh into the hostname for some reason.

The only things aware of the IP address at this point is the DHCP server and the Raspberry Pi.

The windows machine has no way of knowing what the hostname and assigned IP address of the Pi. Either check your DHCP server to see what IP address was assigned to the Pi, and then use that address to connect. E.g. 192.168.0.99

Alternatively, download something like Angry IP Scanner, and use that to find out the IP address.

2 Likes

Hi Robin, thanks for your reply.

I did eventually manage to ssh into the IP address of the pi zero. So your suggestion is spot on. :slight_smile:

hi - you should be able to talk to the pi on your local network using the hostname you gave it (instead of just by IP address), but it needs some additional software.
Last time I did this there were 2 parts - software on the pi and then some software on the Windows machine I was trying to use Putty to SSH from.

  • I installed avahi-daemon on the pi
  • then you also need Bonjour support on the Windows machine. This was included in iTunes or there was an Apple Bonjour Printer Service package that also installed the components I needed.

Then you should be able to ping your pi at raspberrypi.local (or hostname.local etc., depending on what you named the pi when you were setting it up)

hope this helps

1 Like

Thanks a lot. All the YouTube videos for setting up headless Pi Zero just show putting the SD card into the Pi, powering it up and immediately magically ssh into the hostname ‘raspberrypi’. :smile: