esptool.FatalError: Timed out waiting for packet header.


In my project i’m using Lolin ver 0.1 nodemcu v3 with CH340G driver, and baut rate of 9600 and 115200 both. for reading data from water meter using rs485 mod-bus protocol.

But after few times of uploading code we get some trouble in flashing it, and my code will run max 2 times only and after that i will throwing error like this…
Even though i am not able to flash a simple code (blinky led or message display etc.) v2.6
2.6 v2.6
Serial port COM11
Chip is ESP8266EX
Features: WiFi
MAC: 2c:f4:32:20:bc:95
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Auto-detected Flash size: 4MB
Compressed 261856 bytes to 191262…

Writing at 0x00000000… (8 %)
Writing at 0x00004000… (16 %)
Writing at 0x00008000… (25 %)Traceback (most recent call last):
File “C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/”, line 25, in
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 2698, in main
operation_func(esp, args)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 2158, in write_flash
esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio * 2)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 104, in inner
return func(*args, **kwargs)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 632, in flash_defl_block
self.ESP_FLASH_DEFL_DATA, struct.pack(’<IIII’, len(data), seq, 0, 0) + data, self.checksum(data), timeout=timeout)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 354, in check_command
val, data = self.command(op, data, chk, timeout=timeout)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 332, in command
p =
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 277, in read
return next(self._slip_reader)
File “C:/Users/User/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\”, line 1877, in slip_reader
raise FatalError(“Timed out waiting for packet %s” % waiting_for)
esptool.FatalError: Timed out waiting for packet header

esptool.FatalError: Timed out waiting for packet header

This is not an Arduino programming problem. The ESP8266 and ESP32 are not Arduino boards.

When I search for esptool.FatalError: Timed out waiting for packet header with DDG I get lots of hits. I presume the same will be true with Google.


Do you have the RS485 chip connected to the board when you are trying to upload ?


i will checked out both the conditions ie flashing with rs485 connection or without rs485. means that removing all the connections as well.

Active connections to the serial-port should be removed, as well as connections that could interfere with the boot mode.