Closed
Description
Add sdk persistent support for wifimulti.
Some info from @kentaylor
kentaylor commented on May 10
I looked into this a bit more. It turns out the device will store data for up to 5 WiFi access points. It will only use one of them rather than switch between them by itself but once one is selected it will handle the connectivity automatically. The Espressif SDK functions you would use are:-
wifi_station_ap_number_set
to set how many to save, might as well make it 5.wifi_station_get_ap_info
which returns details of the access points recorded and can be tested against the list of scanned access points.wifi_station_ap_change
to set which one to use.
See function definitions in sedctions 3.4.10 - 3.4.12 at http://www.mikrocontroller.net/attachment/245197/2C-SDK-Espressif_IoT_SDK_Programming_Guide_v0.9.5.pdf .The algorithm when you save one would be choose the next empty one to save to. If there is already 5 saved, delete number 1. Then move 2 to 1 etc to make a vacancy at 5 and store the new one at 5.
At startup, scan for WiFi networks then change to the one from the scan list with the strongest signal that matches the SSID of one of the stored ones.