You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that this issue might be related to the BCM2711 nl80211 wireless kernel device driver.
Describe the bug
With a Raspberry Pi supporting the 5GHz Wi-Fi band (e.g., Raspberry Pi 4 Model B), if a Wi-Fi Direct P2P-GO group is created with option 2.4 GHz (freq=2), considering also the presence of some P2P Clients only supporting 2.4 GHz and some supporting Wi-Fi dual bands, the starting P2P-GO band will be 2.4GHz, but after some time the band will autonomously move to 5 GHz.
p2p-wlan0-0 channel shall not autonomously move to different frequencies when not driven by wpa_supplicant.
Actual behaviour
Just after creating the P2P-GO group, wpa_supplicant correctly configures the band, in fact the initial P2P-GO virtual interface (p2p-wlan0-0) is set to a 2.4 GHz frequency even if the Wi-Fi interface (wlan0) is set to a frequency in the 5 GHz band. To verify that wpa_supplicant does not interfere, we can send a SIGSTOP signal just after the P2P-GO group is created.
After several minutes, the Broadcom nl80211 wireless device driver autonomously appears to move the P2P-GO frequency from the 2.4 GHz band to the 5 GHz band.
The result is that 5 GHz P2P Devices can still connect the P2P-GO group after a while, while the 2.4 GHz ones will no more receive the group beaconing data.
Considering to find a workaround by modifying the wpa_supplicant sources, which is the correct nl80211 wireless device driver option to prevent this (wrong) default behavior when creating the NL80211_IFTYPE_P2P_GO type interface? Notice that if the P2P-GO interface is created with NL80211_ATTR_FREQ_FIXED property, the results are unchanged.
Which firmware version (vcgencmd version)?
Oct 22 2020 13:59:27
Copyright (c) 2012 Broadcom
version 74e754ff8947c58d2773253f77f6f68a303188f8 (clean) (release) (start)
Which kernel version (uname -a)?
Linux RaspberryPi 5.4.72-v7l+ Rpi 4.5.y #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
Additional context
I'm not sure that this is misleading, but there should be a way to overcome the issue, in fact if I run the following commands (after resuming and stopping wpa_supplicant with sudo killall -CONT wpa_supplicant; sleep 10; sudo killall wpa_supplicant), the frequency of the interface appears to stably remain to 2.4 GHz even if, before issuing them, the wlan0 frequency was in a 5 GHz band:
iw dev wlan0 interface add p2p-wlan0-0 type __p2pgo
ifconfig p2p-wlan0-0 192.168.4.1 netmask 255.255.255.0 up
iw dev p2p-wlan0-0 ap start DIRECT-PP-Toyota 2437 100 1 head 80000000ffffffffffff0a85bc6459460a85bc645946000000000000000000006400110400104449524543542d50502d546f796f746101088c129824b048606c030101
iw dev
Such case is anyway different and possibly not appropriate: both p2p-wlan0-0 and wlan0 are stably set to the same fixed 2.4 GHz frequency, while ideally only the P2P-GO group should be set to a 2.4 GHz frequency.
The text was updated successfully, but these errors were encountered:
Meanwhile, there is an (invasive) workaround to fix the 2.4 GHz band, by editing wpa_supplicant.conf and setting an appropriate country that needs to both respect the regulatory settings of the region where the interface is used and at the same time disable the 5 GHz band. For instance, country=RU.
Use iw reg get to get the currently used settings.
Use iwlist wlan0 frequency to get the list of the frequencies available with the interface settings.
use iw reg set RU;iwlist wlan0 frequency;iw reg get to set the region settings and check the used frequencies. The output can be compared with the previous commands in order to verify compatibility with the regulatory specifications.
Is this the right place for my bug report?
I think that this issue might be related to the BCM2711 nl80211 wireless kernel device driver.
Describe the bug
With a Raspberry Pi supporting the 5GHz Wi-Fi band (e.g., Raspberry Pi 4 Model B), if a Wi-Fi Direct P2P-GO group is created with option 2.4 GHz (
freq=2
), considering also the presence of some P2P Clients only supporting 2.4 GHz and some supporting Wi-Fi dual bands, the starting P2P-GO band will be 2.4GHz, but after some time the band will autonomously move to 5 GHz.To reproduce
wpa_supplicant config file (wpa_supplicant.conf):
No AP shall be active (P2P-GO and AP cannot run concurrently on such hw),
wpa_supplicant command:
Start
wpa_cli -i p2p-dev-wlan0
and issue:The result is the following (
iw dev
):Notice the different channels of p2p-wlan0-0 (2.4 GHz) and wlan0 (5 GHz)
Ensure wpa_supplicant is not interfering:
Wait for several minutes.
The
iw dev
will show a 5 GHz channel for the p2p-wlan0-0 Interface:Expected behaviour
p2p-wlan0-0 channel shall not autonomously move to different frequencies when not driven by wpa_supplicant.
Actual behaviour
Just after creating the P2P-GO group, wpa_supplicant correctly configures the band, in fact the initial P2P-GO virtual interface (p2p-wlan0-0) is set to a 2.4 GHz frequency even if the Wi-Fi interface (wlan0) is set to a frequency in the 5 GHz band. To verify that wpa_supplicant does not interfere, we can send a SIGSTOP signal just after the P2P-GO group is created.
After several minutes, the Broadcom nl80211 wireless device driver autonomously appears to move the P2P-GO frequency from the 2.4 GHz band to the 5 GHz band.
The result is that 5 GHz P2P Devices can still connect the P2P-GO group after a while, while the 2.4 GHz ones will no more receive the group beaconing data.
Considering to find a workaround by modifying the wpa_supplicant sources, which is the correct nl80211 wireless device driver option to prevent this (wrong) default behavior when creating the NL80211_IFTYPE_P2P_GO type interface? Notice that if the P2P-GO interface is created with NL80211_ATTR_FREQ_FIXED property, the results are unchanged.
System
Results of the raspinfo command
Which model of Raspberry Pi? Pi4 Model B
Which OS and version (
cat /etc/rpi-issue
)?Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 9a3a10bf1019ebb2d59053564dc6b90068bad27d, stage4
Which firmware version (
vcgencmd version
)?Oct 22 2020 13:59:27
Copyright (c) 2012 Broadcom
version 74e754ff8947c58d2773253f77f6f68a303188f8 (clean) (release) (start)
Which kernel version (
uname -a
)?Linux RaspberryPi 5.4.72-v7l+ Rpi 4.5.y #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
Additional context
I'm not sure that this is misleading, but there should be a way to overcome the issue, in fact if I run the following commands (after resuming and stopping wpa_supplicant with
sudo killall -CONT wpa_supplicant; sleep 10; sudo killall wpa_supplicant
), the frequency of the interface appears to stably remain to 2.4 GHz even if, before issuing them, the wlan0 frequency was in a 5 GHz band:iw dev wlan0 interface add p2p-wlan0-0 type __p2pgo ifconfig p2p-wlan0-0 192.168.4.1 netmask 255.255.255.0 up iw dev p2p-wlan0-0 ap start DIRECT-PP-Toyota 2437 100 1 head 80000000ffffffffffff0a85bc6459460a85bc645946000000000000000000006400110400104449524543542d50502d546f796f746101088c129824b048606c030101 iw dev
The output is the following:
Such case is anyway different and possibly not appropriate: both p2p-wlan0-0 and wlan0 are stably set to the same fixed 2.4 GHz frequency, while ideally only the P2P-GO group should be set to a 2.4 GHz frequency.
The text was updated successfully, but these errors were encountered: