Page 1 of 1

ESP32-C3 won't light sleep for specified DTIM

Posted: Wed Jan 26, 2022 2:29 pm
by fgervais
I did some test with light sleep.

My router beacon interval is set at the default 100ms.

If I set the router DTIM to 100 then light sleep works as expected, the device sleeps for 10 seconds.

However, if I set the router DTIM to 255, the device will still only sleep for about 10s. The rest of the time it will stay awake.

The 26s DTIM:
ppk-20220126T142359.png
ppk-20220126T142359.png (230.03 KiB) Viewed 2550 times
The light sleep period:
ppk-20220126T142410.png
ppk-20220126T142410.png (230.93 KiB) Viewed 2550 times
Is there something I can do to sleep the complete DTIM?

Re: ESP32-C3 won't light sleep for specified DTIM

Posted: Wed Jan 26, 2022 3:32 pm
by fgervais
I see, I got caught by the inactive timeout.

Code: Select all

esp_wifi_set_inactive_time(WIFI_IF_STA, 30)
did the trick.