Wifi NVS FLash is enabled. I am using esp_wifi_get_config to find out whether wifi configuration is saved in NVS. My code is :
Code: Select all
wifi_config_t conf;
ret = esp_wifi_get_config(ESP_IF_WIFI_STA, &conf);
if (ret == ESP_OK)
{
ESP_LOGI(TAG, "Wifi configuration already stored in flash partition called NVS");
ESP_LOGI(TAG, "%s" ,conf.sta.ssid);
ESP_LOGI(TAG, "%s" ,conf.sta.password);
}
else
{
ESP_LOGI(TAG, "Wifi configuration not found in flash partition called NVS.");
configure_wifi();
}
Code: Select all
I (697) Wifi station: Wifi configuration already stored in flash partition called NVS
I (707) Wifi station:
I (707) Wifi station:
Code: Select all
Wifi configuration not found in flash partition called NVS