Restart ESP Programmatically

ankitdaf
Posts: 2
Joined: Thu Feb 15, 2018 8:57 am

Restart ESP Programmatically

Postby ankitdaf » Thu Feb 15, 2018 9:02 am

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_Sprite
Posts: 8999
Joined: Thu Nov 26, 2015 4:08 am

Re: Restart ESP Programmatically

Postby ESP_Sprite » Thu Feb 15, 2018 1:38 pm

Esp_restart should indeed do a full restart, to my knowledge. How is it not working for you?

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Restart ESP Programmatically

Postby Ritesh » Thu Feb 15, 2018 4:13 pm

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.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot], mura_lb and 88 guests