-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Raspberry Pi Pico W network becomes inaccessible when not used for some time #9455
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
Based on our testing, we've arranged to "default" to power saving mode of 0xa11140 in circuitpython. |
Also, to clarify the original comment... it does seem to be typically a disconnection from the wifi AP when using the default power-save mode. The presence of an IP address when not connected was confusing.
|
I think this depends on the AP because this test runs here with yesterday's daily build with no config changes. Currently I'm seeing
I encountered something similar when developing mqtt_as. Collaborator @kevinkk525 reported a similar problem on ESP8266: after periods of inactivity it would spontaneously disconnect and the code would go through the reconnect process. This was fixed by On the basis of the Pico W documentation (para 3.6.3) on mqtt_as I use 0xa11140 (as per @jepler ). |
I'm interested to know the mechanism too, though I'm not too savvy to the low layer protocols. Other devices stay connected, but it's also not surprising that there would be differences in behavior across different network equipment when tweaking sleep intervals. |
Is there any update on this? I am still having the same issue |
I am also experiencing this problem, it's frustrating. |
I'm running into the same problem with the C API. That makes me believe the problem is more low-level and not in the micropython bindings. |
Using
MicroPython v1.19.1 on 2022-09-20; Raspberry Pi Pico W with RP2040
, Pico W loses network operation (though seemingly not AP connection since there is typically still an IP address) if no network operations are performed for some time. The maximum non-operating interval between network operations is typically about 5 minutes with Power-Saving on, and at least 10 minutes with Power-Saving off (more testing continues with this mode). The failure mode is typicallyOSError: -2
.If some operation, say a
ping
is done frequently, the network operation is preserved and more complex transactions (e.g., sockets) can be done with much longer intervals.Code:
Output:
Possibly related to power-saving mode (
wlan.config(pm = 0xa11140)
) described in section 3.6.3 here.Documented here and here.
Addendum: Pinging the device periodically from an external source also seems to extend accessibility of the network.
Addendum 2: Toggling the LED via the wifi module gives mixed results keeping the network alive, other factors may be at work. But the early test with network failure in Power-Saving off mode was perhaps spurious. A subsequent run has shown a longer interval possible between network operations.
The SDK doc indicates "Both the low level cyw43_driver and the lwIP stack require periodic servicing" (p.265), but it's not clear to me what those intervals are or how to recover the network from lack of servicing without a hard reset of the board after an OSError: -2.
The text was updated successfully, but these errors were encountered: