How to use SDK WiFi roaming

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I currently have some custom code that enables me to:

  • dynamically add and remove WPA2/PSK based access points that are accessed from the STA_INTERFACE
    • The AP names and passphrases are supplied by an external means and put into the list of available AP's
    • The custom code tries the first AP and tries to connect, if it fails, it tries the next AP in the list, if it succeeds, it connects and stops trying until it loses signal
    • When an AP is disconnected due to signal loss, it tries again.

There seems to be a better approach that is built-in to the SDK, but I can't find an example that uses it and allows the app layer to manage the list of available AP's.

Could someone point me to an example in 3.7 or 4.0?

Thanks!

0 Likes
5 Replies
Anonymous
Not applicable

Hi David,

You can refer the "Scan" example in the "snip" folder which will give a list of APs in the vicinity of the station.

Below is the path :

../apps/snip/scan/

Thanks.

0 Likes
Anonymous
Not applicable

Umm... very familiar with snip.scan.

scan is good for finding a list of what's available, but it doesn't manage connections.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello davidep

Yes, I do accept that there is no example snip as per your requirement. This is because one can write an application by using snip.scan and snip.dct_read_write according to the user requirements.

The only way to achieve is to scan the APs first and update the dct_wifi_config section with the appropriate SSID details and connect to the network. I have done small changes in apsta snip example where I have updated the dct with required wifi details and connected to the network.

You can take the same example, add scanning functionality and update the dct. When ever the Ping results getting errors, scan again and connect to the available AP. If you have more queries please let me know.

Anonymous
Not applicable

Thanks for the information rash but I'm looking to have the stored_ap_list[] contain several AP's and automatically pick whichever is available and automatically change when it goes out of range. It appears as though there is some support for this since stored_ap_list is an array, but I don't see any examples and the code that appears to do things with the list appears to be buried in a library (no source code). I'd like either an example or the related source code segments within that library.

0 Likes

What is the purpose of wiced_wifi_set_roam_trigger() and how to use it?