I have a question about "wifi: Haven't to connect to a suitable AP now"
Posted: Fri Dec 14, 2018 9:40 am
I call SM_Quit_wifi() to close the wifi task. Then after one minute, I try to init the WIFI resource and task and connect the AP,but the problem occured.
The Debug Info
I (32849) wifi: mode : sta (30:ae:a4:47:27:ac)
[0;32mI (32849) Somnic_WIFICon: received wifi event 2[0m
[0;32mI (32849) Somnic_WIFICon: connected successfully[0m
W (32849) wifi: Haven't to connect to a suitable AP now!
[0;32mI (32849) WIFICon: current ap ssid:![0m
[0;32mI (122709) event: station ip lost[0m
[0;32mI (122709) WIFICon: received wifi event 8[0m
There are any one know after call esp_wifi_deinit(), how to resolve the problem.
The Debug Info
I (32849) wifi: mode : sta (30:ae:a4:47:27:ac)
[0;32mI (32849) Somnic_WIFICon: received wifi event 2[0m
[0;32mI (32849) Somnic_WIFICon: connected successfully[0m
W (32849) wifi: Haven't to connect to a suitable AP now!
[0;32mI (32849) WIFICon: current ap ssid:![0m
[0;32mI (122709) event: station ip lost[0m
[0;32mI (122709) WIFICon: received wifi event 8[0m
There are any one know after call esp_wifi_deinit(), how to resolve the problem.
Code: Select all
void SM_Quit_wifi(void)
{
ESP_ERROR_CHECK(esp_wifi_disconnect());
if(esp_wifi_stop()==ESP_ERR_WIFI_NOT_INIT) //停止WIFI
{
ESP_LOGE(SM_WFC,"Please Init WIFI, then call this function!\r\n");
return;
}
if(esp_wifi_deinit()==ESP_ERR_WIFI_NOT_INIT) //释放wifi所有资源和WIFI任务
{
ESP_LOGE(SM_WFC,"Please Init WIFI, then call this function!\r\n");
}
}