Raspberry Pi 4b 5ghz upper frequencies disabled, tried many fixes

I type this up after hours of troubleshooting. I apparently can’t use the upper frequency range of the 5ghz wifi spectrum. I recently changed my router out with a new unit and did a fresh site survey and changed to one of the upper (above DFS) frequencies, but I simply can’t see that network on my pi4b now. After digging in, I have determined that the applicable frequencies are disabled. I’ve googled and tried a hand full of fixes:

  • Installed crda, set the regdom to us, restart, etc…
  • Manually run crda like COUNTRY=US crda
  • Used iw reg set US
  • Set the cfg80211 module param ieee80211_regdom to US
  • I even played with ccode values in the nvram that loads with firmware at brcmfmac module load time and read the kernel driver comments around ccode values.

Nothing I do produces any other result other than “global” regdom is US, but the phy interface is 99 unset, and my high band 5ghz channels are disabled. To me, it feels like there is a mismatch between firmware and driver as there are clearly country code considerations in the nvram and special handling in the driver code. Not sure how long this has been going on as I historically ran under the DFS range on my old router, but every other device in the house connects fine to the upper ranges of 5ghz with the new router, and that’s how I discovered this issue.

[root@nibble brcm]# uname -a
Linux nibble 5.16.0-1-MANJARO-ARM-RPI #1 SMP PREEMPT Mon Jan 10 20:07:42 UTC 2022 aarch64 GNU/Linux
[root@nibble brcm]# iw phy5 channels
Band 1:
        * 2412 MHz [1] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 2417 MHz [2] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 2422 MHz [3] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 2427 MHz [4] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 2432 MHz [5] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40- HT40+
        * 2437 MHz [6] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40- HT40+
        * 2442 MHz [7] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40- HT40+
        * 2447 MHz [8] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40- HT40+
        * 2452 MHz [9] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40- HT40+
        * 2457 MHz [10] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 2462 MHz [11] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 2467 MHz [12] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 2472 MHz [13] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 2484 MHz [14] (disabled)
Band 2:
        * 5170 MHz [34] (disabled)
        * 5180 MHz [36] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 5190 MHz [38] (disabled)
        * 5200 MHz [40] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 5210 MHz [42] (disabled)
        * 5220 MHz [44] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40+
        * 5230 MHz [46] (disabled)
        * 5240 MHz [48] 
          Maximum TX power: 20.0 dBm
          Channel widths: 20MHz HT40-
        * 5260 MHz [52] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5280 MHz [56] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5300 MHz [60] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5320 MHz [64] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5500 MHz [100] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5520 MHz [104] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5540 MHz [108] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5560 MHz [112] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5580 MHz [116] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5600 MHz [120] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5620 MHz [124] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5640 MHz [128] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5660 MHz [132] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40+
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5680 MHz [136] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz HT40-
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5700 MHz [140] 
          Maximum TX power: 20.0 dBm
          No IR
          Radar detection
          Channel widths: 20MHz
          DFS state: usable (for 1036 sec)
          DFS CAC time: 60000 ms
        * 5720 MHz [144] (disabled)
        * 5745 MHz [149] (disabled)
        * 5765 MHz [153] (disabled)
        * 5785 MHz [157] (disabled)
        * 5805 MHz [161] (disabled)
        * 5825 MHz [165] (disabled)
[root@nibble brcm]# iw reg get
global
country US: DFS-FCC
        (2400 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5350 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5470 - 5730 @ 160), (N/A, 23), (0 ms), DFS
        (5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
        (5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
        (57240 - 71000 @ 2160), (N/A, 40), (N/A)

phy#5
country 99: DFS-UNSET
        (2402 - 2482 @ 40), (6, 20), (N/A)
        (2474 - 2494 @ 20), (6, 20), (N/A)
        (5140 - 5360 @ 160), (6, 20), (N/A)
        (5460 - 5860 @ 160), (6, 20), (N/A)

[root@nibble brcm]# COUNTRY=US crda 
Failed to set regulatory domain: -7
[root@nibble brcm]# 

        * 5720 MHz [144] (disabled)
        * 5745 MHz [149] (disabled)
        * 5765 MHz [153] (disabled)
        * 5785 MHz [157] (disabled)
        * 5805 MHz [161] (disabled)
        * 5825 MHz [165] (disabled)

The above output being the real issue it seems…

Wayne

If I remember correctly, there have been reports of some versions of Raspis interfering with the 5GHz spectrum of WiFi. So it’s possible that not only is it unable to connect, but it’s also preventing others from using 5GHz.

Going from memory this has been an on going issue for the pi4 and people have been forced to use lower channels in the router for what reason they have done this in the firmware I do not know why. Just to note their firmware is proprietary.

1 Like

I’ve tried all sorts of regulation blobs and different firmware and nvram settings and it just refuses to enable those frequencies. It’s frustrating because you can see in the firmware that it supports country codes just by running strings on the binary file.