Open diplfranzhoepfinger opened 1 week ago
also discussed here:
Yes, that is right way.
Default storage in WIFI_STORAGE_FLASH
You can manually change storage Documentation
esp_wifi_set_storage(WIFI_STORAGE_FLASH);
@diplfranzhoepfinger @ravinder-bb
I am trying to do the same but for me the contents of wifiStaConfig.sta_cfg.sta.ssid and wifiStaConfig.sta_cfg.sta.password are 0 /empty I am using IDF v5.0.1
Example code
wifi_config_t wifiStaConfig = {0};
esp_err_t ret = esp_wifi_get_config(ESP_IF_WIFI_AP, &wifiStaConfig);
printf("WIFI STA SSID DETECTED: %s\n", wifiStaConfig.sta.ssid);
printf("WIFI STA PASSWORD DETECTED: %s\n", `wifiStaConfig.sta.password);
Any idea what would be wrong ? I have successfully stored it. The reading does not work
Hi @imdahsiaria90 esp_wifi_get_config(ESP_IF_WIFI_STA, &wifiStaConfig);
Answers checklist.
General issue report
Hi,
how to use
esp_wifi_get_config
?after executing the command, how to know if there was a stored config in flash ?
is this the right way ?