8000 Ping responce stops working after several hours · Issue #17300 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

Ping responce stops working after several hours #17300

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

Open
bty-1 opened this issue May 14, 2025 · 0 comments
Open

Ping responce stops working after several hours #17300

bty-1 opened this issue May 14, 2025 · 0 comments
Labels

Comments

@bty-1
Copy link
bty-1 commented May 14, 2025

Port, board and/or hardware

Raspberry Pi Pico W with RP2040; Raspberry Pi Pico 2 W with RP2350

MicroPython version

MicroPython v1.24.0; MicroPython v1.25.0;

Reproduction

  1. Install RPI_PICO2_W-20250415-v1.25.0.uf2 on Raspberry Pi Pico 2 W.
  2. Create main.py with script below on device.
  3. Power on device with USB or batery.
  4. Wait 10 hours. Do not access the device over the network.
  5. On PC (in my case Windows 10) run command "ping 192.168.10.241 -t".
# main.py
import network
from time import sleep
from machine import Timer, Pin

led = machine.Pin("LED", machine.Pin.OUT);
wfssid = "xxxxxxxxxx"
wfpass = "xxxxxxxxxx"
wlan = network.WLAN(network.STA_IF);
wlan.active(True);
print(f'Connecting to "{wfssid}" AP. ', end="")
wlan.connect(wfssid, wfpass);
while wlan.isconnected() == False:
    sleep(1.0);
    print('.', end="");
print(' Done !');
print(wlan.ifconfig())

def cb1sec(timer):
    # To be sure that the device is working
    led.on()
    sleep(0.001);
    led.off()

timer1sec = Timer(period=1000, mode=Timer.PERIODIC, callback=cb1sec)

while True:
    sleep(10.0);

Expected behaviour

Starts respond on pings immidiately.

Observed behaviour

Starts to respond after 10...60 unsuccessful pings.

Additional Information

The device stops responding to ping after a few hours of operation.
Powered by USB or battery, no USB connection (with USB connection it also sometimes "hangs")
The device "hangs" after 1...10 hours.
During this time, do not access the device over the network!

During "hanging":

  1. Unable to connect to FTP server on device.
  2. Ping from device continues to work!

When device is "frozen", you can "wake it up" using command:
ping 192.168.10.241 -t
Initially, the device does not respond to pings, but after 10...60 unsuccessful pings, device starts responding and normal operation of network interface is restored.

See:
Raspberry Pi Pico W network becomes inaccessible when not used for some time #9455
With network.PPP device hangs after several hours of operation #16340
#9455 and #16340 probably have the same root cause.

Not Reproducing on:
MicroPython v1.25.0 on 2025-04-15; ESP module with ESP8266. (ESP8266 Wemos D1 mini)

Code of Conduct

Yes, I agree

@bty-1 bty-1 added the bug label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
0