How to properly clean up WiFi

jubueche
Posts: 32
Joined: Sat Jan 19, 2019 4:03 pm

How to properly clean up WiFi

Postby jubueche » Wed Feb 06, 2019 7:36 pm

When closing a WiFi connection, this is what I am doing:

Code: Select all

ESP_ERROR_CHECK(esp_wifi_stop());
	ESP_ERROR_CHECK(esp_wifi_deinit());
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!

jubueche
Posts: 32
Joined: Sat Jan 19, 2019 4:03 pm

Re: How to properly clean up WiFi

Postby jubueche » Fri Feb 08, 2019 10:17 am

This is resolved now. But I still don't know how to disable the event handler.

Who is online

Users browsing this forum: No registered users and 90 guests