Page 1 of 1

Give a list of wifi networks and passwords to try

Posted: Wed Apr 19, 2023 3:03 pm
by koshin
The building I live in has two wifi networks and I would like my esp32c3 to try connecting to both of them. Is it possible to provide multiple ssids and passwords to esp_wifi_set_config so that if any of the listed networks are available then my device will connect to that one?

Re: Give a list of wifi networks and passwords to try

Posted: Thu Apr 20, 2023 2:46 pm
by ves011
esp_wifi_scan_start() followed by esp_wifi_scan_get_ap_records() will give you the list of availbale networks, together with rssi, channel, ....
Then you can connect to which network you want