adafruit / Adafruit_WebSerial_ESPTool

A Web Serial tool for updating your ESP bootloader.
https://adafruit.github.io/Adafruit_WebSerial_ESPTool/
MIT License
130 stars 64 forks source link

Problem with running stub on various ESP32-S3 boards #269

Closed samblenny closed 2 months ago

samblenny commented 3 months ago

After a discussion on #help-with-circuitpython, Dan suggested I file an issue here. Anyhow, I'm getting the error message below when I try to connect to 3 different ESP32-S3 boards. Same error happens with two different USB cables, using two different macs, with different versions of macOS and Chrome. The boards I tried are Adafruit Feather TFT ESP32-S3, Adafruit QT Py ESP32-S3 (8 flash / 0 psram), and Adafruit QT Py ESP32-S3 (4 flash / 2 psram).

This is the error:

ESP Web Flasher loaded.
Connecting...
Connected successfully.
Try hard reset.
Chip type ESP32-S3
Connected to ESP32-S3
MAC Address: [redacted]
Uploading stub...
Running stub...
[Object.debug:191] Finished read loop
Error: Invalid head of packet (0x47)

screenshots: invalid-head-of-packet-0x47

js-console-screenshot

brentru commented 3 months ago

@makermelissa We are seeing this SlipReadError on ESP32-based boards for WipperSnapper's web flasher, too

makermelissa commented 3 months ago

Unfortunately, I don't have an ESP32-S3 board with me at the moment. I can take a look next week when I'm back home.

timbuktwo commented 3 months ago

I'm seeing the same issue here. 2 days ago this issue wasn't present, I think as of this update, things are broken (I think). The CLI based tool still works though.

dhalbert commented 3 months ago

@makermelissa Do you think it's worth reverting the latest release? I guess that will break other things.

dhalbert commented 3 months ago

Maybe https://adafruit.github.io/Adafruit_WebSerial_ESPTool/ deserves a beta site too.

makermelissa commented 3 months ago

@makermelissa Do you think it's worth reverting the latest release? I guess that will break other things.

Yeah, it'll break the ESP32-C6. I'm not sure what is a better approach, but I'm ok with either.

dhalbert commented 3 months ago

@samblenny We made an update to add ESP32-C6 support and fix other things, and I think we don't want to revert, despite the regresion. Sorry that it broke ESP32-S3. Espressif has its own webtool which you could try: https://espressif.github.io/esptool-js/, while you wait for a fix.

samblenny commented 3 months ago

@dhalbert Thanks for looking into it!

dhalbert commented 3 months ago

@makermelissa A couple of people over the weekend got stuck with the current WebSerial tool for ESP32-S2 and ESP32-S3 and we referred them to the espressif tool. I tried the Espressif tool with Feather ESP32-C6 but it got a Timeout when trying to change the baud, but it works at 115200. Also the offset should be set to 0 for the Espressif tool.

makermelissa commented 3 months ago

Ok. Thank you.

On Sun, Sep 1, 2024 at 6:43 PM Dan Halbert @.***> wrote:

@makermelissa https://github.com/makermelissa A couple of people over the weekend got stuck with the current WebSerial tool for ESP32-S2 and ESP32-S3 and we referred them to the espressif tool. I tried the Espressif tool with Feather ESP32-C6 but it got a Timeout when trying to change the baud, but it works at 115200. Also the offset should be set to 0 for the Espressif tool.

— Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_WebSerial_ESPTool/issues/269#issuecomment-2323617303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUOUSKUSP2XPYEU4SMOV2LZUO7E7AVCNFSM6AAAAABNJICCUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGYYTOMZQGM . You are receiving this because you were mentioned.Message ID: @.***>

brentru commented 2 months ago

@makermelissa Getting this same issue on an ESP32-S3 Feather Reverse TFT as well.

Connecting...
Connected successfully.
Try hard reset.
Chip type ESP32-S3
Connected to ESP32-S3
MAC Address: 24:58:7C:DB:D7:70
Uploading stub...
Running stub...
[Object.debug:191] Finished read loop
Error: Invalid head of packet (0x47)

image

brentru commented 2 months ago

The Espressif tool can connect and upload to the ESP32-S3 without showing this error.

image

makermelissa commented 2 months ago

Looks like there was a bad stub. I have a PR to fix it. I just copied over from esptool, which conveniently uses the same format I made up for this tool.