Give a list of wifi networks and passwords to try

koshin
Posts: 10
Joined: Sat Apr 15, 2023 11:30 pm

Give a list of wifi networks and passwords to try

Postby koshin » Wed Apr 19, 2023 3:03 pm

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?

ves011
Posts: 20
Joined: Fri Oct 07, 2022 2:31 pm

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

Postby ves011 » Thu Apr 20, 2023 2:46 pm

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

Who is online

Users browsing this forum: No registered users and 349 guests