Giter VIP home page Giter VIP logo

Comments (30)

magher avatar magher commented on August 22, 2024 1

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@magher Are you able to try a different WiFi network or a mobile WiFi network hotspot?

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

Tried it on my iPhone network and it seems to work better.... Can it be a firewall issue?

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!

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

The device is now registered on my account but I can only run it through my phone

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@magher do you know if your home network is 2.4GHz or 5GHz?

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

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

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

Progress ??

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

Switched network to 2.4GHz but same result

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@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.

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@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

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

Running 5 GHz
Unable to connect to network, rebooting in 10 seconds...
Unable to connect to network, rebooting in 10 seconds...
Unable to connect to network, rebooting in 10 seconds...
.
.
.

Running 2.4 GHz
IP address:
192.168.50.152
connecting to djxmmx.net:17
sending data to server
receiving from remote server
"It's not about where your dreams take you, but where you take your dreams..."
- Anonymous
closing connection
etc....
.
.
.

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@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?

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024

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.

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024

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.

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024

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.

Adafruit.io WipperSnapper
-------Device Information-------
Firmware Version: 1.0.0-beta.67
Board ID: rpi-pico-w
Adafruit.io User: zardoz99
WiFi Network: Shadow-2G
MAC Address: 28:CD:C1:0B:79:68
-------------------------------
Generating device's MQTT topics...
Running Network FSM...
Connecting to WiFi...
Attempting to connect to WiFi...
Attempting to connect to WiFi...
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...

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@zardoz99 Which Asus router do you have?

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024
AiMesh router
--
RT-AX86U
Current Version : 3.0.0.4.388_23285-g5068da5

AiMesh Node
RT-AX86S
Current Version : 3.0.0.4.388_23285-g5068da5
RT-AC86U 
Current Version : 3.0.0.4.386_51915-g43629d2

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024

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.

Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 kernel: wl0: random key value: 31392003804AAE4137920216CB4E42CAF948C257E64B0A5FA23150D793D91EE7
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(503): eth6: Deauth_ind 28:CD:C1:0B:79:68, status: 0, reason: Unspecified reason (1), rssi:0
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(539): eth6: Auth 28:CD:C1:0B:79:68, status: Successful (0), rssi:0
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(568): eth6: Assoc 28:CD:C1:0B:79:68, status: Successful (0), rssi:-56
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: associated
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 RADIUS: starting accounting session 1F4DD85A11B4AABE
Jul 21 18:46:10 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 WPA: pairwise key handshake completed (RSN)
Jul 21 18:46:13 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPDISCOVER(br0) 28:cd:c1:0b:79:68
Jul 21 18:46:13 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPOFFER(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 kernel: wl0: random key value: 3DA087F613E5BD4D6DA80099F58C9FEAD0F58E2DA85E0357B4FAE658A1AD6868
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(503): eth6: Deauth_ind 28:CD:C1:0B:79:68, status: 0, reason: Unspecified reason (1), rssi:-57
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(539): eth6: Auth 28:CD:C1:0B:79:68, status: Successful (0), rssi:-57
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(568): eth6: Assoc 28:CD:C1:0B:79:68, status: Successful (0), rssi:-57
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: associated
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 RADIUS: starting accounting session 1F4DD85A11B4AABE
Jul 21 18:46:29 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 WPA: pairwise key handshake completed (RSN)
Jul 21 18:46:32 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPDISCOVER(br0) 28:cd:c1:0b:79:68
Jul 21 18:46:32 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPOFFER(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 kernel: wl0: random key value: 902F8A4102A8F4DE5F3001C31A3CB4A6733C8775C26B0313095217B077CDFC67
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(503): eth6: Deauth_ind 28:CD:C1:0B:79:68, status: 0, reason: Unspecified reason (1), rssi:0
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(539): eth6: Auth 28:CD:C1:0B:79:68, status: Successful (0), rssi:0
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(568): eth6: Assoc 28:CD:C1:0B:79:68, status: Successful (0), rssi:-56
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: associated
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 RADIUS: starting accounting session 1F4DD85A11B4AABE
Jul 21 18:46:37 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 WPA: pairwise key handshake completed (RSN)
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPDISCOVER(br0) 28:cd:c1:0b:79:68
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPOFFER(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 kernel: wl0: random key value: 534D21B18577FBC80EDF025017F14E33A04AFC11A1C80555B5F294181C73853C
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(520): eth6: Disassoc 28:CD:C1:0B:79:68, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(520): eth6: Disassoc 28:CD:C1:0B:79:68, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: disassociated
Jul 21 18:46:40 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: disassociated
Jul 21 18:46:45 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(539): eth6: Auth 28:CD:C1:0B:79:68, status: Successful (0), rssi:0
Jul 21 18:46:45 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: associated
Jul 21 18:46:45 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(568): eth6: Assoc 28:CD:C1:0B:79:68, status: Successful (0), rssi:-55
Jul 21 18:46:45 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 RADIUS: starting accounting session 9EC7216FDFA81397
Jul 21 18:46:45 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 WPA: pairwise key handshake completed (RSN)
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPDISCOVER(br0) 28:cd:c1:0b:79:68
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPOFFER(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 kernel: wl0: random key value: 43A38D9828BB7C6E4E30037187A8AC75F6DCAC8EFFE60901E6A24491F2DDEF15
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: disassociated
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(520): eth6: Disassoc 28:CD:C1:0B:79:68, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 hostapd: eth6: STA 28:cd:c1:0b:79:68 IEEE 802.11: disassociated
Jul 21 18:46:48 RT-AX86U-C280-818D6EF-C/192.168.0.1 wlceventd: wlceventd_proc_event(520): eth6: Disassoc 28:CD:C1:0B:79:68, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jul 21 18:46:53 RT-AC86U-FBA8-818D6EF-R/192.168.0.199 wlceventd: wlceventd_proc_event(530): wl0.1: Auth 28:CD:C1:0B:79:68, status: Successful (0), rssi:0
Jul 21 18:46:53 RT-AC86U-FBA8-818D6EF-R/192.168.0.199 wlceventd: wlceventd_proc_event(559): wl0.1: Assoc 28:CD:C1:0B:79:68, status: Successful (0), rssi:0
Jul 21 18:46:55 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPDISCOVER(br0) 28:cd:c1:0b:79:68
Jul 21 18:46:55 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPOFFER(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:55 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPREQUEST(br0) 192.168.0.100 28:cd:c1:0b:79:68
Jul 21 18:46:55 RT-AX86U-C280-818D6EF-C/192.168.0.1 dnsmasq-dhcp[4211]: DHCPACK(br0) 192.168.0.100 28:cd:c1:0b:79:68 rpi-picow00

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:
I have just read examined that log file segment and see that the very last few messages actually show a successful DHCP Exchange. What I also notice is that the DHCP offer only took two seconds to go out on that particular cycle. I wonder if this was a reason for its apparent success? The reason that the DHCP takes so long to be offered is that the router does a check to make sure that nobody else is responding on the IP address being offered.

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@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

from adafruit_wippersnapper_arduino.

zardoz99 avatar zardoz99 commented on August 22, 2024

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.

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

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.

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

from adafruit_wippersnapper_arduino.

electron271 avatar electron271 commented on August 22, 2024

I am also having this issue with a xFi router, using a hotspot also worked.

from adafruit_wippersnapper_arduino.

tyeth avatar tyeth commented on August 22, 2024

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)

from adafruit_wippersnapper_arduino.

brentru avatar brentru commented on August 22, 2024

@magher @zardoz99 Hi - we have just released WipperSnapper beta 74. This includes PR #514 which addresses issues with the Pico W infinite reboot loop issue caused by WiFi failing to connect.

Please give this a try and let me know if you are still experiencing issues.

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

from adafruit_wippersnapper_arduino.

tyeth avatar tyeth commented on August 22, 2024

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?

from adafruit_wippersnapper_arduino.

magher avatar magher commented on August 22, 2024

from adafruit_wippersnapper_arduino.

tyeth avatar tyeth commented on August 22, 2024

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

from adafruit_wippersnapper_arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.