Raspberry Zero, wifi trouble

Hi all, I had to change my ISP without warning and I’m trying to get my Zero to connect with my old router. I pulled the SD card, mounted it on my desktop computer (Debian Buster) and wanted to simply edit the wpa_supplicant.conf file with the correct info for the old router but there was none to be found. Had a backup on the Desktop and saved it to the SD card but it’s not logging on to the router.

The thought came to mind perhaps after using the zero something deletes the wpa_supplicant.conf file and moves the info someplace else.

Anyone have any ideas on how to change the WIFI info on a zero that had been working perfect?

Thanks, Dale

The file should be in /etc. Use a text editor to create wpa_supplicant.conf. Then reboot.

I tried that, not working. Best guess is it’s pulling up the WIFI info from the previous router from another file and is not looking at the wpa_supplicant.conf anymore.

Or it’s some type of wpa error

Looks like after booting the Raspberry moves the info

root@BlackBox:/media/dkc/pi-star/etc/wpa_supplicant# pwd
/media/dkc/pi-star/etc/wpa_supplicant
root@BlackBox:/media/dkc/pi-star/etc/wpa_supplicant# ls -l
total 44
-rwxr-xr-x 1 root root 937 Nov 10 2015 action_wpa.sh
-rwxr-xr-x 1 root root 25569 Feb 28 2019 functions.sh
-rwxr-xr-x 1 root root 4696 Nov 10 2015 ifupdown.sh
-rwxr-xr-x 1 root root 157 Nov 12 09:40 wpa_supplicant.conf
root@BlackBox:/media/dkc/pi-star/etc/wpa_supplicant#

I checked the wpa_supplicant.conf file located above and found it did take the updated wifi info. Looks like it must be some type of wpa error.

Plan B.
Start over.
Put the mSD in a desktop.
Create wpa_supplicant.conf in the boot partition.
Put the mSD in the RPi.
Boot the RPi.

Already tried three times on two different zeros - still no go.

Perhaps the only way I’m going to sort this out is to grab the Raspberry 3+ I have and hook it up to a keyboard, mouse and monitor then access the logs to figure out what the heck is the problem.

Common issues are text editors that insert the wrong type of quotation marks "quote" this is how it needs to be, but they like to make start / stop quotes insted.

Other common issues are some special characters.
I’d say post your wpa_supplicant.conf.
I suppose removing the inside of the quotes for ssid / password won’t hurt (but that can still be the issue).

I use FileZilla to access/transfer files, logs, etc. via SSH to/from my Windows 10 tablet. It works seamlessly (once you get connected).

Here are the two I tried:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=[US]>

network={
ssid=“[CoreDump]”
psk=“[wifipass]”
}

country=USA
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=“CoreDump”
psk=“wifipass”
key_mgmt=WPA-PSK
}

Perhaps I have a syntax error that’s causing trouble.

That give me an idea, I could mount the SD card on the desktop and take a look at the logs instead of trying to use the Raspberry 3+. Just remembered I do not have a HDMI or USB monitor handy.

I just tried again using nano direct to the SD card.

Still not working.

What are those <> for?
Get rid of them, country and ssid / psk

This has the bad quotation marks i mentions.
Also it’s US as country code, not USA.

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="CoreDump"
psk="wifipass"
key_mgmt=WPA-PSK
}

Good catch on the wonky quotation marks. I changed them and got rid of the <> Still no go.

My old router got me back online and got my VOIP phones working but it is not keeping up with the full speed of the new internet service I now have. Have a Gigabit Ethernet ports and dual band router on order and will try again after I get it setup.

Maybe add scan_ssid?

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=00
network={
  ssid="your_ssid"
  scan_ssid=1
  psk="secret_pass"
}

If you are using the Piaware package rather than building Piaware yourself you need to make changes to /boot/piaware-config.txt. SSID and passwords changes are made there.
or
sudo piaware-config option value

The package route overwrites any changes you make to wpa_supplicant.conf.

Maybe a stupid question, but are you operating perhaps a 5Ghz WiFi only? I assume the Raspberry Zero won’t be able to connect.

Some Raspberry users in other discussions have also reported connectivity issues if a mixed WiFi (2.4GHz and 5GHz) are sharing the same SSID name

That shouldn’t be a problem, I have two APs here, they both have 2.4GHz and 5GHz networks, all with the same SSID and I’ve never had an issue connecting to them with any Pi.

I have a standard wpa_supplicant.conf file that I dump on SD cards when I write them.

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="Telegraph Office"
    psk="xxxxxxxxxxxxxxxxxxxxxx"
}

Sure, but i’ve read other users feedbacks in different areas reporting something weird on that.

Thanks everybody for the excellent ideas here. I now have it working.
My new router came in (Netgear AC1200) and I just got it setup. Below is the working wpa_supplicant.conf

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=“Amoeba2”
psk=“MyPassword”
key_mgmt=WPA-PSK
}

Here are some things I learned that might help someone that finds this post later:

The new router was well worth the upgrade. It is a dual 2.4 and 5 GHz WIFI router that came with default different SSID names for both 2.4 and 5G. I ended up changing these to custom names but the different names for the two bands is a real good idea and I kept this. This will make it easy to know if one it trying to access the 2.4 or 5 G For example my TV supports 5 G so I will use the SSID for the 5 G band for the TV and keep it off of the 2.4. The Raspberry Pi zero needs the 2.4 so I can make sure it gets what it wants. I have a Raspberry Pi 3B+ that I run a remote SDR on and it slams the WIFI when I use it. I think it supports 5G so I will select the 5G SSID and keep the 2.4G free.

The new router also has some very nice advance features:
Under Administration - attached devices I could see the Pi logon and knew it was working and find it’s IP.

The router has a LAN - setup - address reservation that lets me reserve the IP for the device so it will stay the same and I can use a bookmark to open my local PiAware page.

And perhaps the best part is the new router tripled my download speed.

5 star for this one :smile:

1 Like