#Strange issue with Pico W Ping Functionality
1 messages ยท Page 1 of 1 (latest)
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.
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.
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 ๐ค
real pico w's from alieexpress, not from a raspberry pi distributor?
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
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) ๐คท
well, looks OK, but I wonder where they're coming from.
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
we sell RP2040 boards with more flash. But you may need more RAM, that's a problem ๐
https://forums.raspberrypi.com/viewtopic.php?t=335481 of mild interest but not about Pico W
You sell pico w's with more flash? I've only seen normal pico's with extra flash. But that's a good point about Ram. May have to get clever with loading data from files maybe. Or a more efficient way to define the animations.
not, not pico w. there are no non-rpi pico w-ish boards that use the same wifi that I know of
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
Yes, I think that means the ping is failing
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.
what kind of internet service do you have, what router do you have, are you using a VPN, etc.?
Its cable internet, netgear modem, asus router. No VPN on the router.
Is the cable modem a router in itself (its own wifi and has some Ethernet ports?)
No just one ethernet port to connect to the router
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?
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
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
Oh you're right sorry I was thinking of CGNAT
modem is netgear cm1000v2
ok, modem has almost no settings
Yeah pretty basic.
I just installed micropython and tryed a ping with this ping implementation https://forum.micropython.org/viewtopic.php?f=15&t=5287&hilit=uping&start=10#p38313 and it worked
repeated pings?
Looks like out of the 4 pings it does it drops at least one typically
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
Hmm in a for loop it looks like only the first time has the issue
I don't have another router unfortunately
interesting, I was seeing the same issue when pinging the router though.
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
if you can do http requests in circuitpython, I wouldn't worry about the ping too much
That's kind of what I was thinking. When I got the error for ping I kind of hyperfocused on that haha
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
excellent