QUERY · ISSUE
Support config("pm")
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-esp8266: Add support for set/get the wifi power saving mode.
port-esp8266port-esp32
This PR adds support for setting and getting the wifi power saving mode.
Adds the pm option to WLAN.config() to support setting/getting the wifi power saving mode.
Also adds the PM_NONE, PM_MIN_MODEM and PM_MAX_MODEM constants to the WLAN class.
Example:
import network
sta = network.WLAN(0); sta.active(True)
sta.connect(ssid, password)
sta.config(pm=sta.PM_NONE)
This is especially useful for controlling power consumption on battery powered devices and is also required by PR #6515 (ESPNow support).