-
Notifications
You must be signed in to change notification settings - Fork 1.3k
wifi.radio.listen_interval not available #10170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I looked at this, and found that
it showed up. @EternityForest (author of #9476) not sure how we all missed that, but no one else had tried to use it. I wonder if we should see if the RP2 WiFi impl has some power-saving implementation that is similar, and maybe come up with a more general API that would be applicable to both. |
The CYW43 driver does have something equivalent to So I'll fix this, and open an issue for CYW43 support. |
@blackketter @EternityForest : I have started on a PR to fix this. One thing I noticed it there seems to be a standard of "min", "max", and "none" for power savings / power management. I've seen the same terms used in ESP-IDF and in the CYW43 driver. It's something like this (this is from my work in progress): //| MIN: PowerManagement
//| """Minimum power management (default). The WiFi station wakes up to receive a beacon every DTIM period.
//| The DTIM period is set by the access point."""
//| MAX: PowerManagement
//| """Maximum power managment, at the expense of some performance. The WiFi station wakes up at the `listen_interval` [Q: is this often 100 ms]."""
//| NONE: PowerManagement
//| """No power management: the WiFi station does not sleep.""" It looks like the listen interval is only used for max power management. I started adding a But in the case of "max", I also need to supply a listen interval. Or, I could just default it to something reasonable (100 ms??) as MicroPython does. This is simpler. Otherwise I'll need something like Which API would be good enough for your user case? |
For my case, I just want to disable wifi power savings as much as possible to reduce latency and improve reliability. My experience with ESP32 on my network (Apple AirPort Extreme, mostly) was that connectivity was unreliable until I disabled power savings when developing on Arduino. Indeed, I've found that the circuitpython web workflow can be unreliable and I'm betting that this is the cause. |
@anecdata: Well, that's interesting! I had no idea that was in ❗ Note this bug, fixed this fall: georgerobotics/cyw43-driver#122. I am not sure if we have updated to that or not. I can take advantage of that in the code I'm writing.
Yes, MIN seems to be the ESP-IDF default. |
looks like our CYW43 power settings |
@anecdata There was a bug (georgerobotics/cyw43-driver#122) in We have updated This may explain your original bug #6958, from 2022, which was fixed by #6976, by disabling WiFi power management entirely. MicroPython and pico-sdk now use the corrected "PERFORMANCE" setting as the default. My inclination is to switch to that, because I think our choice was predicated on the incorrect definition of "PERFORMANCE" initially, which was worse (poorer performance) than intended. Any comment? I will be making a PR not too long from now and the revised default can be tested. |
More intuitive and easier to maintain if we match MicroPython / pico-sdk. But the differences are more than the swapped constants, jepler may recall why the values for each differ from MP. I had tested our |
CircuitPython version and board name
Code/REPL
Behavior
Description
I'm trying to disable wifi power savings, which seems to improve reliability of ESP32 connections on some wifi networks. According to the documentation, as far as I can tell, this should be available. And I think by setting it to less than zero wifi power saving should be disabled. In any case, the api seems to be missing on this platform. It was apparently added in #9476.
First circuitpython bug report, could be I am holding it wrong. Thanks.
Additional information
No response
The text was updated successfully, but these errors were encountered: