Page 1 of 1

esp_wifi_set_ps

Posted: Fri Mar 23, 2018 9:39 am
by Reiner1210
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

Re: esp_wifi_set_ps

Posted: Sat Mar 24, 2018 2:13 am
by ESP_Sprite
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.