2

tldr: I'm trying to re-flash a previously working Adafruit Huzzah ESP8266 breakout module to use the latest AT firmware. The re-flash doesn't seem to be working and I'm getting rather confused. This is the first time I've re-flashed one of these modules.

What I did:

I installed the latest version of esptool.py using pip, and downloaded the latest Espressif AT firmware from github. With the Huzzah on a breadboard I grounded GPIO0 and connected the serial port header to my PC using a FTDI cable. VC on the cable is 5v. The red power light lit. I then ran the following commands:

esptool.py --port COM4 --baud 115200 write_flash -fm dio -fs 32m 0x00000 boot_v1.1.bin

esptool.py --port COM4 --baud 115200 write_flash -fm dio -fs 32m 0x01000 user1.bin

esptool.py --port COM4 --baud 115200 write_flash -fm dio -fs 32m 0x7C000 esp_init_data_default.bin

esptool.py --port COM4 --baud 115200 write_flash -fm dio -fs 32m 0x7E000 blank.bin

Each upload seemed to complete ok, but I found that I couldn't upload the next until I pressed the reset button on the module first, otherwise I got the error:

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

This doesn't seem right to me.

After uploading all 4 components as above I disconnected GPIO0 and cycled the power on the module. I then tried connecting using putty at 115200 baud but I get no echo back from the module, and it doesn't respond to commands.

Observations:

  • The module previously worked and I could connect to it with putty.
  • If I reset it while connected to putty at 115200, I get a consistent pattern of garbage characters, so my guess is its alive but confused somehow.
  • I've tried connecting at various baud rates: 9600, 14400, 19200, 38400, 57600, as well as 115200. Same result.
  • I've found walkthroughs that show firmware like node.mcu being uploaded as a single binary. Should I be somehow merging the four bin files into one before uploading the the Huzzah?

What am I doing wrong here?

1 Answer 1

2

I'm confident that I've resolved this now. I'll leave the question here in case it is useful to anyone in the future.

The problem was they way I was downloading the individual bin files from the github repo, using right click -> Save As in Chrome. This downloads a file with the correct name, but it is actually the content of the file's html page, not the binary itself. Downloading the repo as a zip file, extracting the bin files, and then uploading them to the Huzzah using a single command gave me a properly flashed device.

What happened was I noticed that esptool can upload multiple files in one go so, with the original bin files, I tried the command:

esptool.py --port COM4 --baud 115200 write_flash -fm dio -fs 32m 0x00000 boot_v1.1.bin 0x01000 user1.bin 0x7C000 esp_init_data_default.bin 0x7E000 blank.bin

and got the following error

esptool write_flash: error: argument : Detected overlap at address: 0x1000 for file: user1.bin

Thats when I noticed that boot_v1.1.bin was way to big to fit in the space between 0x00000 and 0x01000. Examining it in notepad++ revealed that it was html.

A learning experience...

1
  • this just happened to me.. so annoying, never would have thought to open the file contents
    – Alex G
    Oct 3, 2019 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.