adafruit / Adafruit_Wippersnapper_Arduino

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

WipperSnapper loaded on Qt Py ESP32-C3 goes into infinite boot loop #308

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug WipperSnapper loaded to Qt Py ESP32-C3 from Adafruit.io website (below link) was successful but the device goes into a continuous boot loop evident from continuous connect/disconnect sound from the computer.

https://adafruit.github.io/WipperSnapper_Firmware_Uploader/?board=qtpy-esp32c3

Console log attached.

Arduino board Qt Py ESP32-C3

To Reproduce Steps to reproduce the behavior:

  1. Go to Adafruit.io
  2. Click on 'Add Device'
  3. Scroll down and select 'Qt Py ESP32-C3'
  4. Click on 'Get Firmware'
  5. Click on 'Connect'
  6. Select the port with keywords - USB JTAG/Serial
  7. Enter the credentials for the wifi network and Adafruit IO
  8. Click on 'Install WipperSnapper'
  9. Wait for the text 'To run the new firmware, please reset your device.' to appear in the console log
  10. Reset the device
  11. Leave the device connected to the computer
  12. You'll hear continuous connect/disconnect sounds and the LED on board will never turn-on

Expected behavior After installing WipperSnapper successfully, expect the LED to show some indication that it booted up properly and observe the ESP32-C3 on the Devices page of Adafruit.io

Which components are connected to your device Which components are set up on the WipperSnapper device page? None

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

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

QtPy_C3_Log.txt

marnibrewster commented 2 years ago

I'm having this issue too. I have my 2.4 and 5g wifi using the same SSID. Is there a workaround for this? I'd rather not muck up all of my other IoT devices by changing that.

Edited: I added a guest network only on 2.4. After adding the new credentials and flashed new firmware. Got to the 'reset your device' stage and when reseting, either via reset button or via unplugging and replugging, the device never shows up in my devices list.

ghost commented 2 years ago

@marnibrewster do you see the LED light up when you added the guest network for 2.4GHz? if left connected to the computer, does it continuously connect/disconnect?

brentru commented 2 years ago

@marnibrewster @sanramaraj Are you both having this issue with the Qt Py ESP32-C3? Does this happen with other boards (if you have them)? Did it occur on previous Wippersnapper releases, or just the latest?

ghost commented 2 years ago

@brentru I started using it a month ago, I was never successful with WipperSnapper installation from the website. The most recent attempt was 2 days ago.

Unfortunately, I have only the Qt Py ESP32-C3 to play with.

marnibrewster commented 2 years ago

I just received my c3 a day ago, so this is my first attempt with it. I can upload code via Arduino just fine. I hit snags when trying to upload circuit python code though. Can provide more details after work today. I was also unable to upload main.py via Thonny after installing circuitpython (attempted this to see if I could run the wifi test there as well, to rule out arduino/circuitpython issues). Got invalid header: 0xffffffff. @sanramaraj The LEDs stopped working when I first attempted to install wippersnapper.

marnibrewster commented 2 years ago

@brentru are there manual install instructions somewhere?

ghost commented 2 years ago

@marnibrewster I had the same experience, LED stopped working after the first attempt to install WipperSnapper

marnibrewster commented 2 years ago

I'm getting an error when trying to install the urequests package in Thonny now:

"This doesn't look like MicroPython/CircuitPython package. Are you sure you want to install it?"

marnibrewster commented 2 years ago

I just received my second c3 and attempted the wippersnapper install on it. LEDs working when I initially plugged it in. Held boot, pressed reset, let go of boot. Was able to find the port on the wippersnapper install page. Installation seemingly succeeded and I was told to reset. The LED was green! I reset the c3 with the reset button. Nothing happened (device didn't show up in my device list). I tried resetting by unplugging and replugging. Nothing. It was using: wippersnapper.qtpy_esp32c3.littlefs.1.0.0-beta.45.combined.bin Quite frustrating!

marnibrewster commented 2 years ago

@brentru I can try re-installing wippersnapper on my feather huzzah esp8266 tonight and will get back to you

ghost commented 2 years ago

@marnibrewster I guess there is something messed up with the WipperSnapper for ESP32-C3

marnibrewster commented 2 years ago

@sanramaraj I should add that while I didn't hear the noises you heard, I did notice something weird after a seemingly successful install of wippersnapper. If I reset the board, go back to the wippersnapper install page, and click 'connect', the c3's port flashes on and then off repeatedly.

brentru commented 2 years ago

@marnibrewster @sanramaraj Ok, thank you both for the info. This was previously an issue preventing us from adding C3 in the first place, it has been fixed in the latest BSP (https://github.com/espressif/arduino-esp32/issues/6862#issuecomment-1175926313) and there are similar issues in other libraries.

@marnibrewster There are manual installation instructions on this page: https://learn.adafruit.com/how-to-add-a-new-board-to-wippersnapper/build-wippersnapper

I've added this to the top of my stack for next week and will look at it after the USA holiday.

marnibrewster commented 2 years ago

@brentru Thank you!

I tried the wippersnapper manual install and was hitting littlefs issues 🤔 I was able to get my project working (using the qt py with a scd4x temp/humidity/co2 sensor, pushing data to adafruit io, and then using the data in homebridge to make it available on my homekit) using adafruitio mqtt and the sensirion library for now.

Let me know if there's anything I can contribute / test next week.

marnibrewster commented 2 years ago

@brentru I was unable to update my huzzah esp8266 to the latest beta (same experience: the upload succeeded, I was told to reset my device, but the same version was on it and it wouldn't connect to IO). After removing it as a device in IO, I can no longer upload wippersnapper via the web tool. Edited: I was able to follow the steps for adding a new device that you linked to, in order to flash the .bin to my huzzah. It succeeded and now my board is showing up in IO. It looks like it's v1.0.0-beta.45 fwiw. Line 298 of build_platform.py was throwing errors as the paths did not match. One included /Documents/... and one did not. Once I added /Documents to the front of that check, the command worked (this could also be an issue with my paths). I also uninstalled Arduino IDE, and removed the Arduino15 folder which seemed to help (maybe some cache issues?)

ghost commented 2 years ago

@brentru , do you have an estimate of when this bug may be resolved?

brentru commented 2 years ago

@sanramaraj I do not have an estimate, it's the next item on my list after https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/issues/321 (and associated refactoring around i2c, updating documentation) is done today.

brentru commented 2 years ago

@marnibrewster @sanramaraj This issue should be resolved as of #326. We patched a line of code causing ESPTool to merge the binary for the ESP32 platform as a target, instead of the ESP32C3 platform. This should be resolved going forwards.

I tested this with my QT Py ESP32C3 and did not get the boot loop when using the web uploader.

Please re-open this issue if you are still experiencing the C3 boot-looping.

ghost commented 2 years ago

It works!!

marnibrewster commented 2 years ago

I can't wait to try it out tonight, thank you so much for the fast resolution on this!