Raspberry Pi Zero Wifi issue
I was playing around and writing another Tutorial on setting up 3 Raspi Zero Wifi for Docker Swarm when I came around some connectivity problems with the wifi connection. I was barely able to configure and/or use the ssh connection of the Zeros.
First Try: reconnect
I found some other forum posts about people having the same issue saying: Reconnect your Wifi with:
sudo raspi-config
1 - System Options you can configure
S1 - Wireless LAN
Sounds like this is a common issue after setting up your Raspi with the Raspi Imager tool where i pre-configured my Wifi for a headless setup.
But this only worked for a couple of reboots.
Second Try: fixed IP
It could be that my local network (unifi) is causing this problem. I did not set the static IP on the Pi itself but in the unifi controller dashboard which should be equal to a fixed IP-address.
But I was wrong, the Raspberry Pi obviously has a DHCP problem by getting it's fixed IP-address. Which should be something like 192.168.10.x/24.
I was having the same problems in the past with other devices so I guess it's either a configuration thing or the unifi controller/router sucks.
Well, to prevent that from happening again and not trusting the dhcp connection, I just edited the dhcpd.conf on the Raspi. I repeated that on all my devices and since they should have fixed IPs anyway, it doesn't even bother me.
sudo nano /etc/dhcpcd.conf
interface wlan0
static routers=192.168.10.1
static domain_name_servers=192.168.10.1
static ip_address=192.168.10.255/24 # Pi Zero selected address
This fixed the connectivity for me, hope it helps!