adafruit / Adafruit_Wippersnapper_Arduino

WipperSnapper is a firmware for creating no-code IoT electronics projects.
https://io.adafruit.com/welcome
MIT License
31 stars 45 forks source link

Pico W Infinite Reboot Loop After Wippersnapper Install #432

Closed indecorous closed 11 months ago

indecorous commented 1 year ago

Describe the bug Hello all, I hope this finds you well.

I install the firmware, .json file, then restart. The Pico enters an endless reboot loop. I checked out the .json file. The username, IO I.D., and WiFi login are all correct. There are no error messages to note. I’ve carefully followed the directions and have attempted multiple times. I’ve tested with a few different Pico W that are known to be completely functional.

Wippersnapper Firmware Version: 1.0.0-beta.63 (for the Pico W).

I tried enabling the Experimental Web Platform features in Chrome, as noted in one of the other guides I reviewed. This didn't seem to make a difference.

I also tried using Flashnuke between install attempts. This did not seem to make a difference either.

wipper_boot_out.txt contents: Adafruit.io WipperSnapper Firmware Version: 1.0.0-beta.63 Board ID: rpi-pico-w MAC Address: XX:XX:XX:XX:XX:XX (Noted as XX for privacy)

Any help would be greatly appreciated. Thanks for your time.

LLAP

Arduino board Raspberry Pi Pico W (Tried with four different Pico W boards.)

To Reproduce Steps to reproduce the behavior: I carefully followed the instructions as per the Adafruit site.

Expected behavior I would expect it to connect to Adafruit IO.

Which components are connected to your device Nothing was connected to the Pico W, other than the USB cable to interface with the PC.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information): -NA

Additional context -None Noted

brentru commented 1 year ago

@indecorous Looking into this today, I found that on my network the third try passes through to Adafruit IO.

It should attempt to retry the connection to Adafruit IO 5 times before rebooting the watchdog timer, but this does not occur. This problem appears to be separate from the infinite reboot you are experiencing and I will file a separate bug for this.

12:35:09.274 -> Attempting to connect to WiFi...
12:35:09.274 -> Attempting to connect to WiFi...
12:35:17.587 -> Attempting to connect to WiFi...
12:35:17.587 -> Attempting to connect to Adafruit IO...
WDT EXPIRED - REBOOT
12:35:37.315 -> Attempting to connect to WiFi...
12:35:37.315 -> Attempting to connect to WiFi...
12:35:45.623 -> Attempting to connect to WiFi...
12:35:45.623 -> Attempting to connect to Adafruit IO...
WDT EXPIRED - REBOOT
12:36:05.389 -> Attempting to connect to WiFi...
12:36:05.389 -> Attempting to connect to WiFi...
12:36:13.702 -> Attempting to connect to WiFi...
12:36:13.702 -> Attempting to connect to Adafruit IO...
12:36:19.669 -> Registering hardware with WipperSnapper...
12:36:19.669 -> Registering hardware with IO...

On a board with INVALID ADAFRUIT IO CREDENTIALS, I got the reboot loop your board's experience:

12:51:44.655 -> Attempting to connect to WiFi...
12:51:44.655 -> Attempting to connect to Adafruit IO...
12:51:45.269 -> Port number: 8883
12:51:45.269 -> CID: io-wipper-rpi-pico-w7117500
12:51:45.269 -> Connecting to: io.adafruit.com
12:51:49.333 -> Connect result: 1
12:51:49.333 -> MQTT connect packet:
DATA HERE SNIPPED FOR GITHUB
12:51:49.370 -> Client sendPacket returned: 84
12:51:49.370 -> Read data:        [0x20], 
12:51:49.370 -> Packet Type:          [0x20], 
12:51:49.370 -> Read data:        [0x02], 
12:51:49.370 -> Packet Length:  2
12:51:49.370 -> Read data:        [0x00],   [0x05], 
12:51:49.370 -> Unable to connect to Adafruit IO MQTT, retrying in 3 seconds...
12:51:52.372 -> Port number: 8883
12:51:52.372 -> CID: io-wipper-rpi-pico-w7117500
12:51:52.372 -> Connecting to: io.adafruit.com
REBOOT
12:51:56.240 -> Adafruit.io WipperSnapper

@indecorous Please check your Adafruit IO Username and Key along with your WiFi SSID and Password please. Also, try another wifi network.

brentru commented 1 year ago

Note: I've split the bug I noticed off into https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/issues/435

indecorous commented 1 year ago

Interesting. Thanks for investigating.

I double checked the secrets.json. The login credentials for IO and WiFi are correct. I've followed the instructions meticulously. I attempted this from a different WiFi network but got the same results. I can tell you that no other devices have an issue connecting to my router.

If it is truly unrelated to the bug report, I have a question. I've noticed that user accounts can get hosed in Terminal Services and need to be recreated from scratch. I realize this isn't Terminal Services or domain controller related, but is it possible something like that has happened here: a corrupted user account? Sorry if that's a dumb question. I'm not sure how the back-end of IO works.

brentru commented 1 year ago

I double checked the secrets.json. The login credentials for IO and WiFi are correct. I've followed the instructions meticulously.

Are you able to use either the Arduino Serial Monitor or https://www.serialterminal.com/ to get debug output Or does it reboot too quickly?

If it is truly unrelated to the bug report, I have a question. I've noticed that user accounts can get hosed in Terminal Services and need to be recreated from scratch. I realize this isn't Terminal Services or domain controller related, but is it possible something like that has happened here: a corrupted user account? Sorry if that's a dumb question. I'm not sure how the back-end of IO works.

If you fill out a query on http://io.adafruit.com/support and link this bug report, I can ask the web team to take a look into your account.

indecorous commented 1 year ago

Yeah, unfortunately, it happens too quickly to connect.

I did notice that the .json file mentions something about the (“status_pixel_brightness": 0.2). and the webpage you come to during setup talks about various light colors representing various states during the process. It appears to be referring to a NeoPixel. The Pico just has the green LED. It stays on and doesn’t blink until it turns off and on when rebooting. Not sure if that’s even remotely relevant or just a standard page that every setup lands on.

I’ve tested from Wi-Fi to pins. Nothing is wrong with any of the Pico W. I even soldered up headers on one of my spares, only to get the same results. I ordered a Feather RP 2040 from you guys to check that option. We’ll see if that works.

I also have an Unexpected Maker Feather ESP32 S3 I ordered from Adafruit. Will that work with the Adafruit Feather S3 IO firmware? The UM Feather has more memory and an extra IIC port so I’m not sure if that’s worth a shot.

Along with the physical computers, I’ve also tried various VMs with no success. Are there any known issues with VMware 17 Workstation (not VMware Viewer)? Just curious if I’m wasting my time with that route.

This may be another potentially silly question, but could you walk through how you would go about connecting the Pico W to the Arduino serial monitor: or any serial monitor? It seems pretty straight forward, and I’ve had success in the past. But maybe I’m missing something specific to this situation.

In addition to Arduino, I have Visual Studio 2022, VS Code, MU, Thonny, ESP32-IDE, plus other various Linux world options. Not sure if there are any tricks to be found there. I’ve even tried connecting with PuTTY through serial.

I submitted the query to support with a link to this post, as requested.

Thank you for working with me on this. It’s truly appreciated. I just want to play on IO like all the other cool kids.

LLAP

indecorous commented 1 year ago

Another potentially silly question: I’ve noticed that the usernames in the forum tend to start with a lower-case letter. Since IO and the Adafruit user account use the same login credentials, is it possible that the capital letter in my username is causing problems?

Also, ediazcoon, in the related Adafruit forum, explained that they started having the same issue with their Pico after that last update of Wippsnapper. It seems worth mentioning.

https://forums.adafruit.com/viewtopic.php?p=974533#p974533

LLAP

brentru commented 1 year ago

Another potentially silly question: I’ve noticed that the usernames in the forum tend to start with a lower-case letter. Since IO and the Adafruit user account use the same login credentials, is it possible that the capital letter in my username is causing problems?

I asked our development team, the username's capitalization should not matter here.

@indecorous I have a request that'll help me replicate this.

Could you attach the CURRENT.UF2 file that's present on your Pico W? This contains the current contents of the microcontroller flash.

To get this file:

indecorous commented 1 year ago

INFO_UF2.TXT

I don't see one called CURRENT.UF2. The above INFO_UF2,TXT is it. There's also an INDEX.HTM that takes you to https://www.raspberrypi.com/documentation/microcontrollers/?version=E0C9125B0D9B .

I flashed wippersnapper.rpi_pico_w.1.0.0-beta.63.uf2 .

brentru commented 1 year ago

@indecorous Trying to figure out why you're not seeing it,

1) You flashed wippersnapper.rpi_pico_w.1.0.0-beta.63.uf2 to RPI-RPI2? 2) Then it wasn't working (infinite reboot loop) 3) You went into bootloader mode and navigated to RPI-RPI2 and there is no CURRENT.UF2 file?

indecorous commented 1 year ago

That is correct. It's the same with any of the Pico W I tried. I just re flashed it to be sure. I've flashed with Windows 11 Pro 64bit, Linux Mint, Debian, Raspberry Pi OS, Red Hat Linux. and Ubuntu.

magher commented 1 year ago

I have the same problem. Here are some screen shots from what the USB drive contains after flashing with Wippersnapper and result in Thonny after the 'secrets' file was replaced with the one generated on the Adafruit site. Screenshot 2023-06-08 100106

Screenshot 2023-06-08 100130

magher commented 1 year ago

I've used the same secrets file with micro python on the same device (reflashed of course) and it works just fine.

brentru commented 1 year ago

@magher Both of these issues seem different. It is difficult to debug two people with different (but "similar") issues in the same thread.

Could you please open a new issue on https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/issues/new?assignees=&labels=&projects=&template=bug_report.md&title= so I can help you there and @indecorous in here?

Thanks!

brentru commented 1 year ago

@indecorous Can we try this before I implement a new "safe mode":

indecorous commented 1 year ago

I’ve rebooted it but there isn’t a whippersnapper_boot_out.txt this time. I have attached a couple of screenshots. I used flashnuke before re-flashing.

Also, I’m getting a permissions pop up every time I load a file to the rp2040 Wippersnapper. Not sure if this is normal or not. Included in attached screen shots. Happens with most things I add to it.

permissions_prompt wippersnapper_contents

brentru commented 1 year ago

@indecorous I see wipper_boot_out.txt on the file explorer screenshot.

I'm not sure about the permissions popup as of right now, I haven't experienced that before.

indecorous commented 1 year ago

Facepalm... sorry about that. It wasn't there the first couple of reboots so I missed it on the screen shot. My bad. That file isn't always created. I promise I'm not huffing glue...

Also, it's difficult to copy files before it reboots, but I can usually time it right.

wipper_boot_out.txt

indecorous commented 1 year ago

Just tried in Linux Mint with similar results. I've added the wipper_boot_out.txt from that attempt. It added some additional information.

I see slightly different outcomes when using Linux distros but it still ends up in an infinity loop. There are no permissions warnings when transferring files to the Pico W like I usually find in Windows.

I edited the username and SSID for privacy but the information is correct on the original. wipper_boot_out.txt

Is it better, in general, to use Linux for this? I typically use a Linux distro as my daily driver anyway.

Still no CURRENT.UF2 when I go into bootmode. Screenshot attached.

folder_view

brentru commented 1 year ago

@indecorous Since I can't replicate this, I'm going to look at implementing two ideas:

indecorous commented 1 year ago

Very cool. Just let me know how to proceed.

Also, is using a Linux based OS better for this? I just want to know if a given platform will make life easier for both of us.

As always, thanks. LLAP

indecorous commented 1 year ago

Hello, Just curios if there has been any progress or if I should be doing anything to help. I want to make sure you're not waiting on me to do something.

Let me know when you get a chance.

Thanks again. LLAP

brentru commented 1 year ago

I am the sole developer on this firmware. I was focused on releasing beta 64, released this week, which kicks off display integration so we can do some awesome visualization: https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/releases/tag/1.0.0-beta.64

With the display feature shipped, I am starting to loop back to unresolved and difficult-to-reproduce issues like this one after the USA Holiday this upcoming week.

brentru commented 11 months ago

Addressed in #514 , please try the latest version of Adafruit WipperSnapper