4

I have a Raspberry Pi 4 b(4g), it perfectly works with 2.4 GHz WiFi access points, But it doesn't detect 5 GHz WiFi access points. In official specs of Raspberry Pi 4 b noted that it supports: "2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE"

No matter which operating system (Raspberrian, Ubuntu) it doesn't detect 5 GHz WiFi access points.

What is the problem? What should I do to fix this problem?

4
  • Hello and welcome -- How you configured the raspberry pi for setting the 5 GHz channels? And, are you mentioning that it can be a hardware sight problem?
    – M. Rostami
    Jan 30, 2020 at 9:27
  • I tried netplan on cli and network manager on GUI it detects all 2.4Ghz channels but 5GHz, I think it may firmware or hardware problem. Jan 30, 2020 at 10:10
  • Add more channels band to /etc/wpa_supplicant/wpa_supplicant.conf on freq_list=. For example: freq_list=2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 5170 5180 5190 5200 5210 5220 5230 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700
    – M. Rostami
    Jan 30, 2020 at 10:26
  • 1
    Ah, it is an unsolvable problem. The three references in my answer to the following question explains why: raspberrypi.stackexchange.com/questions/106588/…
    – tlfong01
    Jan 30, 2020 at 11:28

2 Answers 2

6

I suppose you are using Raspbian. With my RasPis I have found that they tend to connect first to the 2.4 GHz band if both bands available. So first you should check if the 5 GHz band is seen by your RasPi. Execute this command.

rpi ~$ sudo iw wlan0 scan | grep -A5 'freq: 5'

It should give you at least one (ore more) outputs like this:

freq: 5300
beacon interval: 100 TUs
capability: ESS Privacy SpectrumMgmt ShortSlotTime RadioMeasure (0x1511)
signal: -71.00 dBm
last seen: 0 ms ago
SSID: RPiNet

If you find one then you can restrict wpa_supplicant only to connect with this frequency. Just add a line freq_list= to /etc/wpa_supplicant/wpa_supplicant.conf. According to the documentation in /usr/share/doc/wpa_supplicant/examples/wpa_supplicant.conf you can set it general or within a network block:

# freq_list: Array of allowed frequencies
# Space-separated list of frequencies in MHz to allow for selecting the BSS. If
# set, scan results that do not match any of the specified frequencies are not
# considered when selecting a BSS.
#
# This can also be set on the outside of the network block. In this case,
# it limits the frequencies that will be scanned.

This is an example for a general setting (use your settings for country, ssid and psk). You may consider to move the freq_list inside the network block:

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

freq_list=5300
# freq_list=2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
# freq_list=5170 5180 5190 5200 5210 5220 5230 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700

network={
    ssid="RPiNet"
    psk="verySecretPassword"
    key_mgmt=WPA-PSK
    mode=RSN WPA
}

I have commented a complete list of frequencies so you can select what frequencies you want to connect to.

3
  • 1
    Great answer it would seem, but be careful; if you set a frequency, and the Pi cannot connect to that frequency, you will no longer have wifi access and will either need to plugin the Pi via a network cable, or edit the /etc/wpa_supplicant/wpa_supplicant.conf file directly on the SD card from another Linux computer via a USB Card reader (and use sudo or you will not be able to save the file). i.e. sudo vi /media/$(whoami)/rootfs/etc/wpa_supplicant/wpa_supplicant.conf executed as the user and not as root. Perhaps better to add a full 2.4/5.0 frequency list as per other answers elsewhere. Jun 11, 2020 at 9:42
  • Like this: freq_list=2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 5170 5180 5190 5200 5210 5220 5230 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 Jun 11, 2020 at 9:45
  • 1
    @RoelVandePaar Good to mention, but cutting the branch you are sitting on is always a problem with a headless connection ;-). But a complete list isn't needed. That's the default.
    – Ingo
    Jun 11, 2020 at 10:10
1

Well, I searched everything trying to solve this and eventually realised the problem. Most of the answers you will get on the internet will suggest setting the WIFI country.

sudo raspi-config

You will need to go to Localisation Settings->WLAN Country and select your country. Ideally, this is supposed to solve the problem; however, if you are still unable to see the 5Ghz SSID, you need to check what all channels are enabled by selecting your country by typing in the following command.

iwishlist channel


lo        no frequency information.

eth0      no frequency information.

wlan0     32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:5.3 GHz (Channel 60)

This tells you what all channels your raspi is listening to. Now equipped with this knowledge, we need to go into the router page and select one of the enabled channels.

enter image description here

In my case, it was set to Auto by default and sometimes it was getting connected and sometimes it was not. So I fixed it to 60 and was able to connect it every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.