web-flasher icon indicating copy to clipboard operation
web-flasher copied to clipboard

Uploading custom firmware.factory.bin and selecting full erase and flash results in bad flash

Open jp-bennett opened this issue 1 year ago • 1 comments

While playing around with the slipstreaming stuff, I noticed that uploading a tbeam firmware.factory.bin to the flasher, and doing a full erase and install results in a non-booting device.

The error message coming over serial is invalid header: 0xa8120c42, and those bytes are not consistent between builds. The initial thought is the the ota and ble firmware bits are not fetched by the flasher in this case.

jp-bennett avatar Oct 07 '24 18:10 jp-bennett

I'm having a similar issue. I've built custom event firmware, and have been able to flash the resulting firmware.bin using the Web flasher. Any attempt at flashing firmware.factory.bin using the same method has rendered the device useless: black screen, blinking orange light. Flashing with esptool v4.10.0 works fine.

I'm using a Heltec v3.2 with this firmware: https://github.com/Cool-Consulting-LLC/meshtastic-bsides-pdx-2025.

esptool.js
Serial port WebSerial VendorID 0x10c4 ProductID 0xea60
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: Wi-Fi,BLE,Embedded Flash 8MB (GD)
Crystal is 40MHz
MAC: ...
Uploading stub...
Running stub...
Stub running...
Compressed 2035456 bytes to 1260331...
Writing at 0x10000... (1%)
Writing at 0x1fb6ab... (100%)
Wrote 2035456 bytes (1260331 compressed) at 0x10000 in 112.04 seconds.
Leaving...
> .\esptool.exe --chip esp32-s3 write_flash 0x0 firmware.factory.bin
esptool.py v4.10.0
Found 2 serial ports
Serial port COM3
Connecting....
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded Flash 8MB (GD)
Crystal is 40MHz
MAC: ...
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x001f0fff...
Compressed 2035456 bytes to 1260331...
Wrote 2035456 bytes (1260331 compressed) at 0x00000000 in 115.7 seconds (effective 140.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

I'm not super duper in embedded programming nor ESP32 so if you need more debugging information, let me know.

slavaaaaaaaaaa avatar Oct 11 '25 21:10 slavaaaaaaaaaa