We are looking for a way to forge the RPi 4 to 2.4Ghz band only (bg only, no a).
We tried using the NM connection setup for band and channels but it does not seem to make any difference - the device keeps connecting to 5Ghz channels. We also tried configuring the NM connection to specific BSSID but it appears NM or wpa_supplicant ignores this as well. We’re not sure why this is ignored.
Note that the SSID we are testing with has BSSID on both 2.4 and 5Ghz - the signal strength on 2.4Ghz is stronger and we set the band=bg in the NM connection profile under the [wifi] section.
Welcome to the forums! I think this thread will provide you with the answer you need for forcing connection to the 2.4Ghz band only. In short, open a terminal into the HostOS, and edit the wifi config file located in /mnt/boot/system-connections by adding:
Thank you for the quick response. I will test it shortly.
BTW, is there a way to force the entire interface to only use 2.4Ghz? (ie., avoid scanning 5Ghz altogether) – on NM? wpa_supplicant or driver level? (this is RPi4)
According to that thread, it can be pretty difficult to disable a band on the device, but according to this you can do it with wpa-supplicant by explicitly setting the frequencies. I imagine it would take some trial and error, but it’s theoretically doable.
If possible, you could setup a 2.4ghz only ssid network in your wifi-settings on the network controller/router - but that require you to have access to those settings.
I did solve the 2.4ghz issue in my environment by making a hidden IoT-only ssid/wifi-lan, running on only the 2.4ghz radios. That can also be used for a lot of other tweaks and security settings for your units as well.
We have no control on where the device is deployed - so having a 2.4Ghz only SSID is not an option. We need to limit to 2.4Ghz only on the RPi side.
It’s just a shame there is no way to configure NM, wpa_supplicant (under NM control) or RPi driver to bg (2.4Ghz) only mode - if anyone knows of a way, please let me know.
No, we cannot setup separate SSIDs. These devices are deployed in the field with customers. We have no control over the wifi setup.
It’s amazing that such a trivial use case, which historically was always supported with pretty much all WiFi NICs is so hard to achieve. I’m not sure if it’s NM, wpa_supplicant or the driver that’s allowing the roaming to a 5Ghz network when wpa_supplicant is specifically configured (by NM, due to band=bg) to only use 2.4Ghz frequencies. I wonder if this is a wpa_supplicant bug (ie, not adhering to freq_list) or a driver issue where it is not even aware of this restriction.
The reason for wanting to stay on 2.4 is because of the inherently stronger signal over 5 ? If that’s the case then maybe our question to answer is how can we make the device always use the strongest signal. I am making this assumption because of:
Note that the strongest signal for the SSID is on 2.4g (channel 9) and yet the Balena RPi4 connects to BSSID on channel 36.
Is this the goal ? If not why do you want to stay on 2.4 ? Then we can try some other solutions to meet that.
Also, above you mentioned that after modifying your configuration to use band=bg in /mnt/boot/system-connections it appeared the device remained on 2.4 but after rebooting it switches back. Is this the case ? Can you explain more what steps you did to undo this working solution ? Maybe there’s an issue with system-connections settings persisting after a reboot.