-
Notifications
You must be signed in to change notification settings - Fork 44
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
Pico W can not connect to WiFi #436
Comments
@magher Are you able to try a different WiFi network or a mobile WiFi network hotspot? |
Tried it on my iPhone network and it seems to work better.... Can it be a firewall issue? Registering hardware with WipperSnapper... |
The device is now registered on my account but I can only run it through my phone |
@magher do you know if your home network is 2.4GHz or 5GHz? |
Hmmm, I was sure that it was 2.4GHz but apparently it is 5GHz. It is an ASUS meshed router with 3 nodes if it is of interest |
Progress ?? |
Switched network to 2.4GHz but same result |
@magher I wonder if the Pico W's board support package for Arduino that we use (https://github.com/earlephilhower/arduino-pico) has issues connecting to your mesh wifi setup. I don't have a mesh setup so it's not possible for me to replicate this issue. Are you familiar with how to use Arduino IDE to upload a sketch? We could try uploading a simple WiFi connection sketch to the Pico W to isolate if its the WiFi, or if it's WipperSnapper. |
Ok. Do you have a sketch in mind or should I whip something up?
//M
16 juni 2023 kl. 18:20 skrev Brent Rubell ***@***.***>:
@magher<https://github.com/magher> I wonder if the Pico W's board support package for Arduino that we use (https://github.com/earlephilhower/arduino-pico) has issues connecting to your mesh wifi setup. I don't have a mesh setup so it's not possible for me to replicate this issue.
Are you familiar with how to use Arduino IDE to upload a sketch? We could try uploading a simple WiFi connection sketch to the Pico W to isolate if its the WiFi, or if it's WipperSnapper.
—
Reply to this email directly, view it on GitHub<#436 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAVKFRAEQGOZAH7P4RR7I2DXLSBV5ANCNFSM6AAAAAAZBSXLKQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@magher I'd suggest:
|
I’ll do that
//M
16 juni 2023 kl. 18:34 skrev Brent Rubell ***@***.***>:
@magher<https://github.com/magher> I'd suggest:
1. Install Arduino Pico: https://arduino-pico.readthedocs.io/en/latest/install.html
2. In Arduino IDE, navigate to File->Examples->WiFi->WiFiClient
3. Modify the sketch to use your SSID/password and upload it.
4. See if it connects to your home network
—
Reply to this email directly, view it on GitHub<#436 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAVKFREQLLGA5FRCRKTZUNDXLSDI3ANCNFSM6AAAAAAZBSXLKQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Running 5 GHz Running 2.4 GHz |
@magher So, 2.4GHz appears to work for the Pico W and 5GHz does not. This is expected behavior as the chipset does not support 5GHz. Is there anything else to resolve before I close out this issue? |
I can confirm that the same problem occurs here, using wippersnapper.rpi_pico_w.1.0.0-beta.66.uf2 I also have an Asus mesh network and I have tried it on the main wireless LAN and also a guest wireless LAN. These are 2.4 GHz networks. I have tried using two different Pico W boards, with exactly the same results. The symptoms are generally the same as the initial report but VERY occasionally it does manage to connect to the Wi-Fi and start to initiate the dialogue with adafruit.io. It then drops out again and goes back into the failure loop . I have tried using my Android phone as a hotspot but no success there either. After a number of iterations of the loop, the internal FAT file system ends up getting corrupted and I lose the secrets.json file. I then have to restart all over again from scratch. I should add that neither micropython, or other test environments that I have used such as mmbasic/picomite, have any problems connecting to my Wi-Fi network. |
Out of sheer stubbornness and determination, I once again tried using my phone as a hotspot and changed the secrets.json file appropriately. For reasons unknown, this time the Pico W was actually able to connect to adafruit.io using the hotspot Wi-Fi. I'm really not sure what this tells us. Clearly the software is incompatible with an Asus mesh network and/or router(s). This is unfortunately a bit of a showstopper for me. |
Having made a single successful connection, using the mobile phone provided hotspot, I have since updated to the latest available beta. Reverting back to the Wi-Fi network provided by the Asus mesh results in the original problem reappearing. Here is what I get on the serial connection over USB.
|
@zardoz99 Which Asus router do you have? |
|
In case it is helpful, I am including a segment of log from the router which shows that the Pico W does in fact connect to the network and gets offered at DHCP response providing it with the correct IP address.
One of the things that I did note is that it takes 3 seconds after the connection is established for the DHCP offer to go out. Is this too long? I have no mechanism to change it, if it is. Update: |
@zardoz99 The WiFi stack is within the PicoW's SDK, not WipperSnapper. If we can figure out the issue here, it'll likely require a PR into their SDK. Could you try splitting the combined 5GHz/2.4GHz network into separate networks? There's some discussion around the WLED, Home Assistant, ETC repos of the RT-AX86U having issues with ESP32 and other MCUs: https://wled.discourse.group/t/unable-to-connect-to-secondary-router/3910/3 |
The network here is served by two different SSIDs, one each for the appropriate bands. It's not possible to split the network up to only be served by one or the other at this point in time. However I did do some experimenting by setting up a completely separate 2.4GHz only Network using an old router that I have. That was using a different SSID altogether. I still had the same problem when using that standalone network, as when I am using the normal one. I have discovered that it is possible to eventually connect via the main network if I leave the Pico W polling for long enough. It may take a number of reboots due to watchdog timer before it'll eventually manage to get CONNECTED. This demonstrates that the SSID and credential information is correct in the secrets.json file. From what I am seeing, I deduce that we are not waiting long enough for the network to fully establish before giving up. On the few occasions that the DHCP response arrives within 2 seconds, we do establish the connection but when it takes 3 seconds or longer we fail. Obviously I don't know how WipperSnapper is handling the connections and what timers are configured. Maybe that is something that you can experiment with. I suspect that internal to dnsmasq, running on the ASUS router, we have a variable amount of delay due to the requirement to ping the network to establish that the IP address is not already in use. If it's not, we have to wait for the ARP request to time out before we can proceed with DHCP IP address assignment. Obviously if the address is in use, the ARP reply will be quick but then we will still need to issue an ICMP ping to see if the IP address responds before allocating a new one. All of these things will take time. I have tried setting up the Asus DHCP with a static mapping between the Pico W MAC address and a known unused IP address but this still doesn't work any better. What I have managed to demonstrate with the above is that it is not specific to an ASUS router and/or using an AImesh network. I can reproduce this using an old Linksys WRT54Gv5. Unfortunately, the Linksys router is pretty much closed/primative and I can't extract log information from it, unlike the Asus. |
This much can be adjusted, we can change the maximum WiFi connection attempts here: https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/blob/main/src/Wippersnapper.cpp#L2195 |
I am also having this issue with a xFi router, using a hotspot also worked. |
Just to add, the changeover for CI builds has happened, along with BSP upgrades and there has been no change in the connectivity ability. (My home 2.4GHz network broadcast from Virgin Media Hub5 is unconnectable with v72 of wippersnapper) |
Hi again,
Unfortunately I still have the same problem with
wippersnapper.picow_rp2040_tinyusb.1.0.0-alpha.74.uf2
Thonny gives me...
Attempting to connect to WiFi...
Attempting to connect to WiFi...
Attempting to connect to WiFi...
ERROR: Unable to connect to WiFi!
ERROR [WDT RESET]: ERROR: Unable to connect to WiFi, rebooting soon...
It is just longer time between the reboots
//Magnus
|
Hi @magher there was a problem with 74, so please try v75 and report back. Also is that the 5GHz or 2.4GHz WiFi network? |
It was the 2.4 GHz. Does it work on 5GHz?
//Magnus
7 dec. 2023 kl. 21:59 skrev Tyeth Gundry ***@***.***>:
Hi @magher<https://github.com/magher> there was a problem with 74, so please try v75 and report back. Also is that the 5GHz or 2.4GHz WiFi network?
—
Reply to this email directly, view it on GitHub<#436 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAVKFRA53RG4FQIZW3G77Y3YIIU3PAVCNFSM6AAAAAAZBSXLKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWGEYDIMJZGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I haven't actually tried 5ghz as the problem for me was on 2.4GHz. Try v75 and see |
The eagle has landed 😃…
Connecting to WiFi (attempt #1)
Connected to WiFi!
Connecting to AIO MQTT (attempt #0)
WiFi Status: 20
Registering hardware with WipperSnapper...
Registering hardware with IO...
Encoding registration request...Encoding registration msg...Published!
Polling for registration message response...2
GOT Registration Response Message:
Hardware Response Msg:
GPIO Pins: 31
Analog Pins: 4
Reference voltage: 3.30v
Completed registration process, configuration next!
Polling for message containing hardware configuration...
Polling for message containing hardware configuration...
cbSignalTopic: New Msg on Signal Topic
2 bytes.
decodeSignalMsg
cbSignalMsg
Sub-messages found: 1
Signal Msg Tag: Pin Configuration
Initial Pin Configuration Complete!
Publishing to pin config complete...
Hardware configured successfully!
Registration and configuration complete!
Running application...
PING!
PING!
PING!
//Magnus
7 dec. 2023 kl. 22:34 skrev Tyeth Gundry ***@***.***>:
I haven't actually tried 5ghz as the problem for me was on 2.4GHz. Try v75 and see
https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/releases
—
Reply to this email directly, view it on GitHub<#436 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAVKFRCXUBYHICLI4JVCYLTYIIY7XAVCNFSM6AAAAAAZBSXLKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWGE2DMMRUGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Describe the bug
After following the on-line guide at Adafruit to connect the Pico to Adafruit I/O and rebooting the device the output in the serial monitor of Thonny is 'Attempting to connect to Wifi and ends with an error (see pic)
Arduino board
Raspberry Pi PicoW
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect it to work of course :)
Note:
Which components are connected to your device
None
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Serial monitor output...
Contents on the USB device...
The text was updated successfully, but these errors were encountered: