Page 1 of 1

Restart ESP Programmatically

Posted: Thu Feb 15, 2018 9:02 am
by ankitdaf
Hi

Is there a way to restart the ESP32, the equivalent of a power cycle ?

I tried esp_restart(), but it seems that it only restarts the CPU, not the WiFi, Bluetooth etc. How do I trigger a restart which is an equivalent of a power cycle ?

Re: Restart ESP Programmatically

Posted: Thu Feb 15, 2018 1:38 pm
by ESP_Sprite
Esp_restart should indeed do a full restart, to my knowledge. How is it not working for you?

Re: Restart ESP Programmatically

Posted: Thu Feb 15, 2018 4:13 pm
by Ritesh
ankitdaf wrote:Hi

Is there a way to restart the ESP32, the equivalent of a power cycle ?

I tried esp_restart(), but it seems that it only restarts the CPU, not the WiFi, Bluetooth etc. How do I trigger a restart which is an equivalent of a power cycle ?
esp_restart() will gracefully restart whole system including WiFi and Bluetooth.

So, you can test like start WiFi into station mode and connect it with configured Router or form network into AP mode and connect mobile with ESP. Then restart ESP using that API and you can see connection lost.

It means it will turned off WIFI with CPU as well.