How to remotely wake up and OTA esp32

atif_m
Posts: 6
Joined: Wed Dec 02, 2020 10:57 am

How to remotely wake up and OTA esp32

Postby atif_m » Fri Dec 25, 2020 7:14 pm

Hi I am trying to remotely (using wifi) wake up a ESP32 WROOM device ideally from deep sleep mode but can opt for light sleep mode if no option. After it wakes up I should be able to perform OTA (Over the air firmware update) using wifi.

Can anyone please guide me if there is any example code or any way to wake up device using wifi remotely?

I did come across a statement in the latest esp32 reference manual table 156 which shows as
WAKEUP_ENA Wake-up Source Light-sleep Deep-sleep Hibernation Notes*
0x20 Wi-Fi Y - - 5


My hardware is: Sparkfun's Esp32 Thing plus
Tool : Using Arduino IDE to program

thanks in advance

felmue
Posts: 70
Joined: Mon Nov 16, 2020 2:55 pm

Re: How to remotely wake up and OTA esp32

Postby felmue » Sun Dec 27, 2020 4:21 pm

Hi @atif_m

have a look at this example https://github.com/espressif/esp-idf/tr ... power_save which allows the ESP32 to sleep as much as possible while still maintaining a WiFi connection. (Sorry not an Arduino example, but you should get the idea.)

Thanks
Felix

atif_m
Posts: 6
Joined: Wed Dec 02, 2020 10:57 am

Re: How to remotely wake up and OTA esp32

Postby atif_m » Wed Dec 30, 2020 8:58 pm

Hi @felmue,

Thank you very much for your response.

Although, that is indeed helpful. But there is a way I came across not sure how it works using which device, whenever it wakes up using normal process such as in my case it wakes up when user presses the push button and then goes back to deep sleep mode.
On each wake up request send to check on https url provided if the version number is same no update done otherwise software is updated and device goes back to deep sleep?
Any idea about that. If this can be done we can use any sleep mode without need to keep wifi awake other than when device wakes up.

Regards
Atif

Who is online

Users browsing this forum: Baidu [Spider] and 101 guests