Stop Raspberry PI Dropping off the WiFi Network

I was having a recurring issue where the Pi 4 was dropping off the WiFi Network overnight and required a reboot to resolve.

After some research I discovered a fix which has been working for me.

I set the country code in the /etc/wpa_supplicant/wpa_supplicant.conf to be the same as the country code on my router.

This was the first line in the file:-


It would be great if this could become a standard parameter.


Glad you figured out and solved your troubles!

Linking to an old comment for some issue tracking/housekeeping…

Hi, i am having the same issue. How do I access "/etc/wpa_supplicant/wpa_supplicant.conf " on my Rpi4? Thanks for your support! Also, do you know the country code for the USA?


1 Like

Enable ssh via the volumio.local/dev page, connect using putty or an other ssh tool, login, sudo nano /etc/…

1 Like

Thank you !

Hello all,
Sorry I’m very thick when it comes to coding. How do I change the country code as I’m in Australia and the WiFi keeps dropping out?
I’ve put in sudo nano etc/wpa_supplicant/wpa_supplicant.conf and a list come up but I’m not sure what to do next?

If you do not see a line with the text country=< some 2 letter code here> just try adding country=AU on a new line to the end of the file.

Just in case something goes wrong create a backup copy sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.bak

Thank you I’ll give it a go. It is very annoying that I have to even do this as you’d think this would be as part of the setup with paying €69 a year for Volumio.

I also benefited from this solution, as my Volumio device mysteriously disappeared from the network intermittently after I swapped my AP.

It appears to be a known issue in Raspberry PI devices, and it would be a useful feature to support selection of the country code through the networking section of the settings menus, at least when run from one of the images targeting RP.