# ESP8266 Flashing Problem-A fatal error occurred: Timed out waiting for packet header

I have been having some issues with flashing the firmware to my ESP8266 wifi module.I am using Linux OS and using the method illustrated Here to flash the the esp8266. The following are the connections between the esp8266 and FTDI board:

  FTDI (Rx)<--ESP(Tx)
FTDI(Tx) -->ESP(Rx)
Common ground between the FTDI, ESP and external 3.3 power supply.
ESP(GPIO0)-->Ground (While Flashing)
ESP(CH_PD)-->VCC (3.3V)


I have researched online and have verified all my connections to be fine. But some observations I have made are as follows:

1. The ESP does not respond to any AT commands or display any garbage data on the serial monitor, when restarted with the GPIO 0 pin connected to ground.

2. The ESP responds to AT command as OK and works fine while displaying some garbage data followed by "ready" on the serial monitor, when powered up with the GPIO 0 pin floating.

3.Shows ERROR for the command AT+CIOBAUD?

1. Have also read that, there are some duplicate FTDI hardwares floating around in the market and online stores, that may be one of the reasons for this flashing problem.

Coming to the problem i.e. whenever I try to flash the esp8266 using the esptool.phy, the flashing begins and at around 8% to 12%, it gets stuck displaying the error

 A fatal error occurred: Timed out waiting for packet header


I have stated my observations above, so that it would be easy for the fellow members to address the issues with the flashing. Looking forward to response from people who have faced, solved, encountered or have any opinions/suggestions regarding this problem.

Try -b 57600
python esptool.py -b 57600 -p /dev/ttyUSB0 write_flash 0x000000 "firm0.bin"
• Welcome to EE.SE! If you're providing instructions for commands to use, please consider using the code formatting using either the  key for fixed-width formatting` or indenting by 4 spaces in a paragraph for multi-line code. Jul 12 '16 at 23:00