WiFi 5Ghz

Hello,

unfortunately I am having problems connecting an RP 4B using 5Ghz Wifi.

  1. Connecting this particular RP 4P to my Wify using Raspibian (Bullseye) works.
  2. Connecting this particular RP 4P to my Wify using Dietpi (Bullseye) does not work
  3. Possibly it has something to do with the channel configuration of the wifi-adapter.
  4. All adapters are up an running (ifup wlan0 on both systems)
  5. I checked the output of commands iw, iwlist and ip addr
    5a) this gives me on Raspbian
    xx@xxx:~ $ iwlist wlan0 channel

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.26 GHz (Channel 52)

xx@xxx:~ $ iw reg get
global
country DE: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(57000 - 66000 @ 2160), (N/A, 40), (N/A)

xx@xxx:~ $ ip addr

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.178.32/24 brd 192.168.178.255 scope global dynamic noprefixroute wlan0
valid_lft 27904sec preferred_lft 24304sec
inet6 …::150/128 scope global dynamic noprefixroute
valid_lft 27901sec preferred_lft 27901sec
inet6 …::150/128 scope global dynamic noprefixroute
valid_lft 27901sec preferred_lft 27901sec

5b) this gives me on Dietpi

root@DietPi:~# iw reg get
global
country DE: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(57000 - 66000 @ 2160), (N/A, 40), (N/A)

root@DietPi:~# iwlist wlan0 channel
wlan0 22 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 149 : 5.745 GHz
Channel 153 : 5.765 GHz
Channel 157 : 5.785 GHz
Channel 161 : 5.805 GHz
Channel 165 : 5.825 GHz
root@DietPi:~# ip address
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

  1. Apparently dietpi offers only 22 wifi channels where raspbian offers 32
  2. My router (a fritz box) is set on autochannel
  3. wifi is working setting the wifi-channel manually to e.g. 48
  4. system journal is flooded with: DietPi wpa_supplicant[563]: wlan0: Failed to initiate sched scan
  5. I configured the dietpi using dietpi-config

Questions

  1. Am I doing something wrong?
  2. How can I enable the missing 10 channels?

Thank you very much for your support.

Additional info:
a) wpa_supplicant.conf
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev

Allow wpa_cli/wpa_gui to overwrite this config file

update_config=1
network={
ssid=""
scan_ssid=1
key_mgmt=WPA-PSK
psk=""
}

Firmware and WiFi packages should be the same. You manually upgraded Raspberry Pi OS to Bullseye? And a reboot on DietPi does not change anything?

Things to compare:

  • /etc/wpa_supplicant/wpa_cupplicant.conf (in our case it does not contain the country code, not sure on RPi OS?)
  • /etc/default/crda (this is where we set the country code, not sure on RPi OS?)

RPi OS sets up the connection via dhcpcd, if I’m not wrong, while we use ifupdown: journalctl -u ifup@wlan0
You could switch the network stack to align with DietPi, or the other way round, to see whether this makes a difference, but actually I think all the IP and DHCP parts are unrelated to the channel issue.

I played around on the RPi Zero W, and I am not able to really change the country code there to check back effect. One issue is that it is 2.4 GHz only, but also a change country code does not really apply: iwlist shows “country: 98” then an after a reboot it is reverted, even that /etc/default/crda contains a different country. Based on the logs it seems the router is forcing the country code, not sure whether it sends the channel list as well. But would be still strange if the same hardware gets different channel lists then.

I found an older but similar report about the error flood you see on the RPi GitHub: https://github.com/RPi-Distro/repo/issues/121
At least in the last post it seems to be related to two conflicting wpa_supplicant processes. ifup@wlan0 loads a per-interface process as configured in /etc/network/interfaces while there is additionally a global wpa_supplicant.service. The letter needs to be disabled. Probably you can compare this with RPi OS as well and assure on DietPi that the global service is not enabled:

systemctl disable --now wpa_supplicant