issues using esp_wifi_get_config - not getting any results

wegunterjr
Posts: 37
Joined: Thu Jun 07, 2018 3:05 am

issues using esp_wifi_get_config - not getting any results

Postby wegunterjr » 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:

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));
Trying two different ways to see what is in there, but it is empty.

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);
Any thoughts?

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 116 guests