[regression] WiFi stops working on with pico W
Port, board and/or hardware
picow
MicroPython version
Reproduction
Connect to wifi and suddenly start getting connection aborted errors (103) when making outbound request
When this happens isconnected() returns true, my ubiquity logs shows the device is still connected and i am not able to load the diagnostic data over http and the pico does not see the connection attempt
Expected behaviour
Wifi works indefinitely
Observed behaviour
wifi stops working within 6 hours of uptime (could take less than 5 minutes)
- Note that my AP and Pico W are less than 30cm apart
Additional Information
v1.23.0 (2024-06-02) .uf2 - no issues, it just works
v1.24.0 (2024-10-25) .uf2 - why is this not working
Archive.zip - my simple script
The PICO just sits around waiting for input to report to my server and periodically reports sensor data to my server
Related discussion: https://github.com/orgs/micropython/discussions/16288 - may have useful notes
Code of Conduct
Yes, I agree
RPI PICO W Regression: Setting DNS results in address resolution failure
Port, board and/or hardware
RPI PICO W
MicroPython version
MicroPython v1.24.0-preview.224.g6c3dc0c0b on 2024-08-22; Raspberry Pi Pico W with RP2040
Reproduction
import socket
import network
import asyncio
async def test():
print("Connecting to WiFi...")
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect("---", "---")
while not sta_if.isconnected():
await asyncio.sleep_ms(100)
print("Setting DNS...")
cfg = list(sta_if.ifconfig())
cfg[-1] = "8.8.8.8"
sta_if.ifconfig(cfg)
server, port = "blynk.cloud", 443
print("Resolving IP...")
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
addr = socket.getaddrinfo(server, port)[0][-1]
print("Connecting...")
sock.connect(addr)
print("OK")
asyncio.run(test())
Expected behaviour
MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico W with RP2040:
MPY: soft reboot
Connecting to WiFi...
Setting DNS...
Resolving IP...
Connecting...
OK
Observed behaviour
MicroPython v1.24.0-preview.224.g6c3dc0c0b on 2024-08-22; Raspberry Pi Pico W with RP2040:
MPY: soft reboot
Connecting to WiFi...
Setting DNS...
Resolving IP...
Traceback (most recent call last):
File "main.py", line 22, in test # socket.getaddrinfo
OSError: -2
Additional Information
No response
Code of Conduct
Yes, I agree