this post was submitted on 07 May 2024
12 points (92.9% liked)

Raspberry Pi Pico

303 readers
1 users here now

Unofficial Raspberry Pi Pico/RP2040 Forum on Lemmy.

Visit us on discord! @Discord

Other Lemmy Communities (not affiliated, see related post to make suggestions for changes)

General Electronics

Embedded (generic)

Embedded (hardware specific)

Radio Frequency / RF

founded 1 year ago
MODERATORS
 

The linked article describes the problem I'm having: I have a Pi Pico W programmed in C++ using PlatformIO and after a few hours of inactivity, the WiFi disconnects.

The rest of the program on the Pi Pico W continues to run, I can see it outputting debug statements in the serial link via USB.

I can't use the solution proposed on the linked page because I'm running an http server on the Pi Pico W, intended to receive commands maybe two or three times a day. These are completely asynchronous, so I don't have a way to know when a command is coming so I can get the WiFi connected again.

Is this a known issue? If so is there a solution that will cause the Pi Pico W to keep the WiFi connection active? I need that server running and listening 24 hours a day, 7 days a week, 365 days a year, irrespective of how little traffic is on it.

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 6 months ago (1 children)

Two ideas:

Check whether your DHCP IP leases are running out. You can increase the lease time on your router.

Second idea, if you’re using WPA, check the key renewal interval. That could be what’s killing your link.

Had this issue on ESP.

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago) (1 children)

Definitely not a DHCP lease issue. Leases default to 168 hours, i.e. 7 days, and the disconnect happens within single digits of hours.

I'm not using WPA. Since TKIP is no longer considered secure enough, I've switched to WPA2 CCMP only, which has the additional; benefit of getting rid of the temporary keys than needed to be renewed.

Also, when a DHCP lease runs out, the client should simply reapply for a new one. Since the device has a permanent DHCP reservation for a static IP (necessary to be able to run a server on it), then at worst that should cause an interruption of service lasting no longer than a second or two.

Meanwhile the problem I'm having is typically permanent. Once it goes offline, it's down until I reboot the device.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

That’s tough. Do you have Wi-Fi 6 capability? I’ve seen this happen when some devices don’t play nice with the newer Wi-Fi 6 devices.

Is your regulation zone set correctly? It’s possible if your device is configured for the wrong operating zone, the router might decide to change to a frequency that would have been illegal and so it falls off.

[–] [email protected] 1 points 6 months ago

Is it a power supply issue? It's not consistently supplying enough current?