3

I am trying to flash the AT firmware in esp8266 but I am always getting the error of timed out waiting for packet header.

Note : I am using esptool.py to flash the the chip and I already have some code uploaded to it, which I uploaded using Arduino IDE

Here is the error which i am getting while writing flash:

root@mayank-HP-Notebook:/home/mayank/Desktop# esptool.py -b 115200 -p /dev/ttyACM0 
write_flash 0x000000 "ESP_8266_BIN0.92.bin" esptool.py v1.2-dev 
Connecting... Running Cesanta flasher stub...

A fatal error occurred: Timed out waiting for packet header

cagdas
  • 1,634
  • 2
  • 14
  • 27
Mayank Pal
  • 31
  • 1
  • 1
  • 4

6 Answers6

4

Had the same issue while connected via USB to my desktop. Tried everything: changed even the cable but eventually I've put the USB cable in another USB slot and it worked !! Seems that the non-working USB slot in front of my desktop is an extension of the USB on motherboard, only the native slots in the back of my desktop are working for ESP-flash. Never experienced other issues with it.

Mario
  • 41
  • 2
  • Same here, had to use change cables, I picked a shorter one and it stopped timing out. – Karim Agha Oct 11 '19 at 00:21
  • Same here. I find some cables work, some don't. Also, moving to the other usb port on my MacBook Air. – Dave Dec 07 '19 at 01:23
  • After reading this I tried with different USB slot of my laptop and it worked. I have been debugging the circuit from hours.. Thanks a lot!!! – 51k Oct 01 '20 at 17:22
3

Most likely the ESP is not being put into flash mode. If it has buttons, hold flash, and then press reset, then run the tool.

But you haven't mentioned which ESP module you use, and in what setup.

bluemind
  • 1,591
  • 11
  • 16
  • i fixed that issue i was not grounding the gpio0 before flashing. Even if you do everything correct you may get error but keep on trying. in between i was working on esp8266. – Mayank Pal Jun 23 '16 at 18:16
1

The chip may not be able to automatically enter the correct bootloader mode. On most development boards, esptools.py automatically selects bootloader mode. I was using a NodeMCU model. The following link helped a lot. https://github.com/espressif/esptool/wiki/ESP8266-Boot-Mode-Selection

1

I had the same problem and solved it following that steps:

  1. Connect the GPIO0(Pin 5) to the GND(Pin 7) with a wire.
  2. Restart the board(Power off/Power on).
  3. Run the command:

sudo python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 /opt/desarrollo/ESP8266/My_Firmware.ino.bin

Where:

ttyUSB0 is the computer port on the ESP is connected.

/opt/desarrollo/ESP8266/My_Firmware.ino.bin is the path of the compiled firmware.

Hope it helps someone :)

hfunes.com
  • 168
  • 1
  • 3
  • 11
0

use external power, ESP8266 models usually very sensitive to power

0

Most likely you may have fried the whole microcontroller or some pins you are using. Try to run a simple blink code if that works then either some pin on your microcontroller is short or some of the sensors/actuators may have some issue.

This error is hardware related error, so check on your hardware.

YAP
  • 1
  • 1