5GHz WiFi on Raspberry Pi 4

In my post about quickly setting up a headless Raspberry I had a simple wpa_supplicant.conf file example. This week I got a Raspberry Pi 4, which according to the documentation supports 5GHz networks and 802.11ac.

I’d been running the command sudo iwlist wlan0 scan | grep ESSID and only seeing 2.4GHz networks.

It occurred to me that I’d seen some people in other countries putting the country detail in their wpa_supplicant.conf file, so I decided to see if it made a difference. Sure enough, after adding the line country=US to my file I was able to see 5GHz networks as well as 2.4GHz networks.

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

After a bit of reading on the https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md page, I noticed a section that made this point with the Pi 3B+, but because I’d not used a 3B+, I didn’t realize it supported 5GHz networking as well.
On the Raspberry Pi 3 Model B+, you will also need to set the country code, so that the 5G networking can choose the correct frequency bands. You can either use the raspi-config application and select the localisation option, or edit the wpa_supplicant.conf file and add the following. (Note you need to replace ‘GB’ with the ISO code of your country. See Wikipedia for a list of country codes.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s