as I read in the docs the ESP8266 can chache up to five Wifi networks. But I cannot get that working. During startup I set the maximum number of networks to five by using the following code:
Code:
printf("err:%i\r\n",wifi_station_ap_number_set(5));
Then I connect to one WLAN and query the Wifi list like this:
Code:
struct station_config config[5];
int cnt = wifi_station_get_ap_info(config);
printf("Number of known networks: %i\r\n", cnt);
for (int i = 0; i < cnt; i++)
{
printf("%i: '%-16s' '%s'\r\n", i, config[i].ssid, config[i].password);
}
printf ("Connected to %i\r\n",wifi_station_get_current_ap_id());
I get two (?) networks, one is the right one, the other is empty.
Then I disconnect and connect to another WLAN and query again. Now I get five(?) networks. Three empty ones and the two I connected to. Looks nice.
But if I power cycle the ESP the ESP tries to connect only to the second Network even if that one is offline. And the list contains only the last connected Network. So it seems the network cache is not persistent. Is that normal behaviour, what sense is in caching the Networks like that? Or do I miss something?
ThorstenStatistics: Posted by Bluescreen2001 — Fri Jun 01, 2018 12:53 am
]]>