Page 1 of 1

After scan event: station ip lost

Posted: Fri Jan 04, 2019 6:07 pm
by snahmad75
Hi,

After I scan to get list of Access points It get this event lost SYSTEM_EVENT_STA_LOST_IP. After that when I try to access Station IP address. It give me no more IP address. station/client connection gets lost.

tcpip_adapter_ip_info_t ipInfo;
::tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_AP, &ipInfo);



https://github.com/espressif/esp-idf/issues/2497

// Disconect before start scan. Fix crash.
ESP_ERROR_CHECK(esp_wifi_disconnect());

wifi_scan_config_t conf;
memset(&conf, 0, sizeof(conf));
conf.show_hidden = true;

ESP_ERROR_CHECK(esp_wifi_scan_start(&conf, true));

Re: After scan event: station ip lost

Posted: Fri Jan 04, 2019 10:29 pm
by snahmad75
Is this function as designed.

I guess I do esp_wifi_disconnect before scan. It will cause IP lost event. Am I right?