How can I completely reset Wi-Fi and turn it on again?

Glebiys
Posts: 9
Joined: Sun Apr 07, 2019 4:26 pm

How can I completely reset Wi-Fi and turn it on again?

Postby Glebiys » Sun Apr 07, 2019 4:50 pm

Hi!

I need to control the stability of the Wifi connection and reset the Wifi driver mode in case of problems with reconnection.
In the documentation, I found a way to completely stop Wifi:

Code: Select all

esp_wifi_disconnect ();
esp_wifi_stop ();
esp_wifi_deinit ();
This should completely disable Wifi and clear its configuration.
After that, I have to start the Wifi connection again. What sequence of commands can I do this?

And in general, how correct is this decision? Does it harm the ESP? If so, how can I do this correctly? My goal is high resiliency Wifi connectivity and reliable automatic reconnection in case of failure.

Who is online

Users browsing this forum: No registered users and 43 guests