mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Add more description for WiFi modem sleep in document and example.
This commit is contained in:

committed by
XiaXiaotian

parent
58e7464dc0
commit
e72f7e7ec4
6
examples/wifi/power_save/README.md
Normal file → Executable file
6
examples/wifi/power_save/README.md
Normal file → Executable file
@@ -2,10 +2,12 @@
|
||||
|
||||
This example shows how to use power save mode of wifi.
|
||||
|
||||
Power save mode only works in sta mode.
|
||||
Power save mode only works in station mode. If the modem sleep mode is enabled, station will switch between active and sleep state periodically after connecting to AP successfully. In sleep state, RF, PHY and BB are turned off in order to reduce power consumption. Station can keep connection with AP in modem sleep mode.
|
||||
|
||||
* No power save: This is default mode. And the esp32 will work with full power.
|
||||
|
||||
* modem sleep: If you set power save mode as modem sleep, 10s later after connecting to AP, esp32 will wake up and sleep(turn off RF and PHY) periodically.
|
||||
* Minimum modem sleep: In minimum modem sleep mode, station wakes up every DTIM to receive beacon. Broadcast data will not be lost because it is transmitted after DTIM. However, it can not save much more power if DTIM is short for DTIM is determined by AP.
|
||||
|
||||
* Maximum modem sleep: In maximum modem sleep mode, station wakes up every listen interval to receive beacon. Broadcast data may be lost because station may be in sleep state at DTIM time. If listen interval is longer, more power is saved but broadcast data is more easy to lose.
|
||||
|
||||
* others: not supported yet.
|
||||
|
12
examples/wifi/power_save/main/Kconfig.projbuild
Normal file → Executable file
12
examples/wifi/power_save/main/Kconfig.projbuild
Normal file → Executable file
@@ -16,13 +16,21 @@ config WIFI_LISTEN_INTERVAL
|
||||
int "WiFi listen interval"
|
||||
default 3
|
||||
help
|
||||
WiFi listen interval for station to receive beacon from AP.
|
||||
Interval for station to listen to beacon from AP. The unit of listen interval is one beacon interval.
|
||||
For example, if beacon interval is 100 ms and listen interval is 3, the interval for station to listen
|
||||
to beacon is 300 ms.
|
||||
|
||||
choice POWER_SAVE_MODE
|
||||
prompt "power save mode"
|
||||
default POWER_SAVE_MIN_MODEM
|
||||
help
|
||||
Power save mode for the esp32 to use.
|
||||
Power save mode for the esp32 to use. Modem sleep mode includes minimum and maximum power save modes.
|
||||
In minimum power save mode, station wakes up every DTIM to receive beacon. Broadcast data will not be
|
||||
lost because it is transmitted after DTIM. However, it can not save much more power if DTIM is short
|
||||
for DTIM is determined by AP.
|
||||
In maximum power save mode, station wakes up every listen interval to receive beacon. Broadcast data
|
||||
may be lost because station may be in sleep state at DTIM time. If listen interval is longer, more power
|
||||
is saved but broadcast data is more easy to lose.
|
||||
|
||||
config POWER_SAVE_NONE
|
||||
bool "none"
|
||||
|
Reference in New Issue
Block a user