issues using esp_wifi_get_config - not getting any results
Posted: Fri Dec 07, 2018 4:12 am
I am trying to use the esp_wifi_get_config to see what the SSID/PWD once it is saved, but I am getting nothing back when I call it:
Trying two different ways to see what is in there, but it is empty.
Any thoughts?
Code: Select all
wifi_config_t wifi_config = { };
ESP_LOGI(LOG_TAG, " the size of esp_wifi_config before: %i ", sizeof(wifi_config));
esp_err_t ret = esp_wifi_get_config(WIFI_IF_STA, &wifi_config);
ESP_LOGI(LOG_TAG, " the size of esp_wifi_config: %i ", sizeof(wifi_config));
Code: Select all
ESP_LOGI(LOG_TAG, "this is stored SSID: %s ", (char *)wifi_config.sta.ssid);
ESP_LOGI(LOG_TAG, "this is stored SSID 2 no Char: %s ", wifi_config.sta.ssid);