I have a question regarding the AP cache for station mode. I understand that ESP8266 can cache up to 5 APs is was successfully connected to. The SDK says:
Sets the number of APs that will be cached for ESP8266 Station mode. Whenever
ESP8266 Station connects to an AP, it caches a record of this AP’s SSID and
password. The cached ID index starts from 0.
What I don't understand: Once cached, does ESP automatically connect to any of the cached APs if it comes into range? Or only the first (or zeroth) one? Is it my task to switch between them?
Set the ESP8266 Station to connect to the AP (whose ID is cached) automatically
or not when powered on. Auto-connection is enabled by default.
Switch ESP8266 Station connection to AP as specified.
uint8 new_ap_id: AP’s record ID; start counting from 0.
Get the current cached ID of AP. ESP8266 records the ID of each AP it connects
with. The ID number starts from 1.
Now that totally confuses me. The ID number, does it start from 0 or 1??