How do I determine whether WIFI SSID and others config has been configured
Posted: Sun Aug 07, 2022 2:50 pm
by LanFly
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.
Re: How do I determine whether WIFI SSID and others config has been configured
Posted: Mon Aug 08, 2022 4:55 pm
by cruvus
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.
Re: How do I determine whether WIFI SSID and others config has been configured
Posted: Wed Jun 26, 2024 1:52 pm
by franzhoepfinger