esp8266, esp32: WiFi: clarification about PowerManagement attributes
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues and didn't find any that matched.
Documentation URL
https://docs.micropython.org/en/latest/library/network.WLAN.html
Description
Trying to disable PowerManagement on a esp board acting as client WiFi.
The last doc says:
Constants
WLAN.PM_PERFORMANCE
WLAN.PM_POWERSAVE
WLAN.PM_NONE
I tried from REPL:
from network import *
nic = WLAN(STA_IF)
nic.config(pm = WLAN.PM_NONE)
dir(nic)
['__class__', 'PM_NONE', 'PM_PERFORMANCE', 'PM_POWERSAVE', 'active', 'config', 'connect', 'disconnect', 'ifconfig', 'isconnected', 'scan', 'status']
Questions:
-
So the attributes are available also on the nic instance: is it wanted or is just a leftover from the past ?
-
esp32: do these attributes make obsolete the previous setting listen_interval ?
esp8266 - feature request, disable wifi radio
The esp8266 (compared to esp32, nrf etc) is by far the best supported micropython device with so much proven and tested modules and good amounts of flash and ram and well proven & tested.
It would be so good to be able to disable the wifi radio so that this can be used as a powerful microcontroller with 'acceptable' power consumption.
I have googled several times, but don't seem to be able to find a definitive answer as to whether it can be completely disabled, although there are several references in arduino and node forums to putting the radio to sleep.
WiFi.mode( WIFI_OFF );
WiFi.forceSleepBegin();
Is this actually possible ? - even if it was a build option to build with WIFI off would still be a huge benefit as there are many applications where the 8266 is perfect, except for it's power consumption using wifi.
I have spent the last 2 weeks getting familiar with the nrf devices, which are low power but when you compare the level of functionality as well as the ram, flash and filesystem, the 8266 would still be an ideal non-wifi device if only it can run without the radio on !