I use the esp_wifi_get_config() function to read the configuration, but how do I determine whether the SSID has been configured ?
If not configured, I need to jump to the settings page.
How do I determine whether WIFI SSID and others config has been configured
Re: How do I determine whether WIFI SSID and others config has been configured
I use
if (config.sta.ssid[0]) [...]
to check if the string is empty. I don't know if there is a better or official way. On the ESP8266 there was wifi_station_get_ap_info() which returned the number of stored credentials. BTW, compared to the ESP8266 there are more APIs missing, for example wifi_station_get_connect_status() which is really bad. It's the function I miss the most.
if (config.sta.ssid[0]) [...]
to check if the string is empty. I don't know if there is a better or official way. On the ESP8266 there was wifi_station_get_ap_info() which returned the number of stored credentials. BTW, compared to the ESP8266 there are more APIs missing, for example wifi_station_get_connect_status() which is really bad. It's the function I miss the most.
ESP32 / ESP-IDF 5.1.4
-
- Posts: 21
- Joined: Wed Mar 04, 2020 7:14 pm
Who is online
Users browsing this forum: No registered users and 185 guests