nRF7002 WiFi auto connect and handoff

I am attempting to use the automatic WiFi connection feature described here:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/wifi_mgmt_ext.html

I have multiple WiFi AP SSID/passwords stored using the WiFi credentials module, then using net_mgmt(NET_REQUEST_WIFI_CONNECT_STORED) to automatically connect to one of them.

It works if I have only a single AP stored, but not with multiple. Tracing through the code, it appears that is because the code issues back-to-back commands to hostap with a "remove_network all" each time. Earlier APs get removed before they even have a chance to connect. The last one will have a chance to succeed.

Even if it didn't have that issue, all it seems to be doing is iterating through the stored credentials and calling WIFI_CONNECT on each. 

Maybe I'm misunderstanding what "automatic" means in this context. What I'd ultimately like is a stored list of APs, and for the system to connect to the best one (highest RSSI, as a first approximation), and switch to another AP if it becomes better. Similar behavior as a phone or PC. I was hoping that hostap would have that functionality built in, does it? Is there any other support in NCS to do this? If not, do I have to cook my own (scan periodically, disconnect/reconnect as needed)? Seems like a feature that almost any WiFi device would need. 

We are using NCS v2.5.2. Looking at v2.6.0, I don't believe this module has changed, but if so let me know and I can try to migrate.

Parents Reply Children
No Data
Related