← index #8941PR #11890
Off-topic · high · value 4.685
QUERY · ISSUE

Support config("pm")

openby peterharperukopened 2022-07-21updated 2022-07-21
enhancement

Currently I can set the power management value for wlan (network cyw43) with the config function. But I can't query the current value. It would be useful to be able to do this for debugging.

applies to network cyw43 wifi
Requires a change to the driver https://github.com/georgerobotics/cyw43-driver/pull/8
I will push a change.

CANDIDATE · PULL REQUEST

ports/esp32: Set ESPNow power management with ESPNow.config(pm=).

openby glenn20opened 2023-06-28updated 2023-07-11
port-esp32

Control power management of the wifi radio during ESPNOW operation.

Control the ESPNOW power management parameters with the ESPNow.config(pm=(window, interval)).

These settings are used whenever the module is disconnected from a wifi Access Point. While connected to a wifi AP, the wifi power management settings will be used instead (WLAN.config(pm=WLAN.PM_POWERSAVE)).

Usage:

  • e.config(pm=(75, 200)) sets the wake_window to 75ms and the wake_interval to 200ms, ie: turn on the radio for 75ms every 200ms (equivalent to WLAN.config(pm=WLAN.PM_PERFORMANCE))
  • e.config(pm=(75, 300)) sets the wake_window to 75ms and the wake_interval to 300ms (equivalent to WLAN.config(pm=WLAN.PM_POWERSAVE))

By default, when disconnected from a wifi Access Point the radio is left on continuously which may lead to undesirable power drain of battery operated devices. IDF v5.0 has introduced the esp_now_set_wake_window() and esp_wifi_connectionless_module_set_wake_interval() to control the duty cycle of the radio for listening to incoming messages while not connected to an AP.

For the results of some power consumption tests, see: https://github.com/glenn20/upy-esp32-experiments/tree/main/ESPNowPowerManagement.

See Config ESP-NOW Power-saving Parameter.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied