esp_wifi_set_ps

Reiner1210
Posts: 39
Joined: Tue Mar 20, 2018 6:28 pm

esp_wifi_set_ps

Postby Reiner1210 » Fri Mar 23, 2018 9:39 am

Hello,

how exactly works
esp_wifi_set_ps(WIFI_PS_MODEM)

As far as I understood it sleeps the WiFi and wake up periodically.

What happens when an UDP packet arrives during the sleep phase - I think it get lost ?
Correct ?

Reiner

ESP_Sprite
Posts: 8926
Joined: Thu Nov 26, 2015 4:08 am

Re: esp_wifi_set_ps

Postby ESP_Sprite » Sat Mar 24, 2018 2:13 am

If I recall correctly, modem sleep uses DTIM. This mechanism essentially allows the ESP32 to say to the AP 'Hey, I'll be offline for a while (iirc 100-300ms) , please buffer packets for me'. When the ESP32 wakes up again, the AP gives it the packets it buffered while the ESP32 was offline.

Who is online

Users browsing this forum: No registered users and 162 guests