#Strange issue with Pico W Ping Functionality

1 messages ยท Page 1 of 1 (latest)

granite mesa
#

After finally getting my ESP32 setup properly. It seems to be connecting and pinging google just fine. Does that mean there's something wrong with my pico w? I don't understand why it will sometimes work and others it doesn't.

frozen yarrow
#

I don't know! There's a lot of different software at the lower level. it could be a peculiarity of your network. It could be some edge case we are not handling properly in CircuitPython 9.x. But I haven't heard of this particular issue before. If you get another Pico W, of course it would be interesting to try it to see if there's any hardware issue (e.g. marginal radio). But the alternating good/bad is strange

#

You can open an issue if you want on the circuitpython repo and describe what happened. That would record it for posterity.

granite mesa
#

Ok, I've got some more coming from aliexpress. When they get here I'll do some more testing and if I can replicate on the new boards I'll open an issue.

#

Thanks for your help through this. I really appreciate it ๐Ÿค—

frozen yarrow
#

i'm assuming this problem is particular to the Pico W, not to CircuitPython wifi in general. If it works on your generic ESP32, it's going to work on other Espressif boards.

#

The implementation of ping on Espressif is rather different than on Pico W

granite mesa
#

The one I currently have is from amazon, so not an official seller either but it looks the same (not that that means much I know) ๐Ÿคท

frozen yarrow
#

well, looks OK, but I wonder where they're coming from.

granite mesa
#

No idea, I kind of wish they weren't official so I could find one that has more flash memory ๐Ÿ˜… . I probably won't need it but I'm planning on doing a lot of LED animation

frozen yarrow
#

we sell RP2040 boards with more flash. But you may need more RAM, that's a problem ๐Ÿ™‚

granite mesa
frozen yarrow
granite mesa
#

I got my extra pico w boards and I'm seeing the same issue.
I started digging into the code. This is the first time I've done so, so I could be missing something but it looks like there's a way for the ping to return -1 from the pico hal implemention which returns a "None"
https://github.com/adafruit/circuitpython/blob/fbd9a6e41055597c4eabda01823e6e05e5553002/shared-bindings/wifi/Radio.c#L740
https://github.com/adafruit/circuitpython/blob/fbd9a6e41055597c4eabda01823e6e05e5553002/ports/raspberrypi/common-hal/wifi/Radio.c#L528

frozen yarrow
granite mesa
#

I tried testing on a friends wifi and it was working with no issues on the pico w. So something is weird with my wifi I guess. Good to know its not the firmware but not really sure how to proceed. Maybe I'll try MicroPython implementation and see if that works and go from there.

frozen yarrow
granite mesa
#

Its cable internet, netgear modem, asus router. No VPN on the router.

frozen yarrow
#

Is the cable modem a router in itself (its own wifi and has some Ethernet ports?)

granite mesa
#

No just one ethernet port to connect to the router

frozen yarrow
#

I'm trying to figure out if you're double-NATing

#

so cable directly to Netgear. What is the model number of the netgear modem?

#

have you tried power-cycling all the networking hw?

granite mesa
#

If it helps I've done a decent amount of research for another project to host servers like minecraft etc. and I don't remember a definitive answer but I do have an individual WAN IP which I think is indicative of no NAT

frozen yarrow
#

well, the asus router is doing NAT, assuming you have a 192.168-style LAN

#

but does the asus router see the exeternal WAN IP, and not another 192.168 addres

#

i would check the config settings on both the modem and the router

#

in addition to just making sure their firmware is up to date

granite mesa
#

modem is netgear cm1000v2

frozen yarrow
#

ok, modem has almost no settings

granite mesa
#

Yeah pretty basic.

frozen yarrow
#

repeated pings?

granite mesa
#

Looks like out of the 4 pings it does it drops at least one typically

frozen yarrow
#

that is kinda bad. I wonder if you have a flaky connection

#

how is your speed test, etc.?

#

do you have another wifi router to try?

#

trying to divide and conquer on where the problem actualy is

granite mesa
#

Hmm in a for loop it looks like only the first time has the issue

#

I don't have another router unfortunately

frozen yarrow
#

did you modify our sample program to ping more than once?

granite mesa
#

I didn't try to loop the pings. I can try that and see what happens

#

Speed test

#

Also I tried making an http get request and got some json back no issue in micropython. Didn't try that on Circuit so I'll try that too

frozen yarrow
#

if you can do http requests in circuitpython, I wouldn't worry about the ping too much

granite mesa
#

That's kind of what I was thinking. When I got the error for ping I kind of hyperfocused on that haha

granite mesa
#

Just did a ping 100 times. Only one that failed was the first. adafruit_requests works like a charm so I'll just press forward and ignore the ping issue

#

Strange issue with Pico W Ping Functionality

frozen yarrow
#

excellent