How to properly clean up WiFi
Posted: Wed Feb 06, 2019 7:36 pm
When closing a WiFi connection, this is what I am doing:
The problem is that after I call esp_wifi_stop, I disconnect and the event handler, which is still running, calls connect(), which is not possible, because we already called deinit().
Is there a way to remove the event_handler?
Do I have to deinit the nvs flash? How about the tcp/ip stack?
Thanks!
Code: Select all
ESP_ERROR_CHECK(esp_wifi_stop());
ESP_ERROR_CHECK(esp_wifi_deinit());
Is there a way to remove the event_handler?
Do I have to deinit the nvs flash? How about the tcp/ip stack?
Thanks!