I hope this somewhat fits the theme here (long post).
I'm trying to wrap my head around an issue with roaming between multiple access points under one SSID using the Arduino 33 IoT (with the Nina WiFi based on ESP).
I have several Ubiquiti Unifi APs covering the location. I have control over the network and can make adjustments as needed. There are two usage scenarios for my SAMD Arduinos:
a) They are stationary panels that send information to a server over WiFi.
b) They are portable and are carried across the location. They receive messages over WiFi.
I understand that the firmware used for Arduino NINA is using WIFI_FAST_SCAN instead of WIFI_ALL_CHANNEL_SCAN (ESP IDF).
In case A), the devices will connect to the first SSID of a given name they find. This could be one AP quite far away, across several walls, with minimal signal quality. Rather than the access point about 5 meters away, in plain sight, with optimal signal strength. As a result, we observe poor connection quality with many disconnects, even for stationary devices.
I would be somewhat fine with that behavior when moving across the location. Iâd expect it to reconnect to the strongest AP nearby, then do so again when finding a stronger AP or losing connection after some time. But Arduino handles this differently (probably for faster single AP SSID scenarios).
Espressif states in their docs:
"Please note that the first scanned channel may not be channel 1, because the Wi-Fi driver optimizes the scanning sequence.
It is a possible situation that there are multiple APs that match the target AP info, e.g., two APs with the SSID of 'ap' are scanned. In this case, if the scan is WIFI_FAST_SCAN, then only the first scanned 'ap' will be found. If the scan is WIFI_ALL_CHANNEL_SCAN, both 'ap' will be found, and the station will connect to the 'ap' according to the configured strategy. Refer to Station Basic Configuration."
Thus, I couldn't even mitigate this issue by adjusting the AP channels to optimize network performance. But this shouldn't be considered an ideal solution anyway.
Since scenario A) (stationary) doesnât work reliably, there is little hope I can achieve solid performance for scenario B) (mobile and roaming). It doesn't have to be 802.11r roaming. I'd be fine managing it manually, and 1-2-3 seconds of disconnection would be acceptable, though not ideal. What weâre seeing is a frequent loss of connection, and reconnecting doesn't improve things.
My workaround would be to use the BSSID obtained from a manual network scan and connect to that specific BSSID (sorted by RSSI). But as far as I understand, the NINA library on Arduino doesn't support BSSID with WiFi.begin().
If I were using a direct ESP setup, I think I could do this.
So the only potential solution (to keep hardware) would be to update the NINA firmware to use WIFI_ALL_CHANNEL_SCAN with the WIFI_CONNECT_AP_BY_SIGNAL configuration. But at the moment, this is beyond me. I want to keep the Arduino 33 Iot if possible. However, I lack the capabilities to build new firmware for the NINA chip that includes the configuration I think I need.
My first question: Is this the current state, or are there readily available firmware versions I could flash that support a different scanning approach?
My second question: Is there a WiFi library for SAMD architecture Arduino that uses WiFi NINA with support for selecting BSSID when connecting to a given SSID?
If that isn't feasible I'd probably switch to ESP, as first tests indicate, they could do what I need.
And it's a pitty ... since it's just some configuration flags (more or less) ... as far as I understand .. and I have 20 of them sitting on my shelf ready to go (or not).
I understand that it's not just changing some flags for a suitable release. And that there are considerable design decisions behind this, but how could I go about this?
