1
\$\begingroup\$

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.

asked Jun 27, 2016 at 11:32
\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

Try -b 57600

This will take time but flash it fine:

python esptool.py -b 57600 -p /dev/ttyUSB0 write_flash 0x000000 "firm0.bin"

answered Jul 12, 2016 at 21:01
\$\endgroup\$
3
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Jul 12, 2016 at 23:00
  • \$\begingroup\$ Counterfeit FTDI chips cant be used for flashing firmware. I don't know if you have tried it with that. Between this issue is long solved, like I have mentioned in my answer. \$\endgroup\$ Commented Jul 14, 2016 at 6:05
  • \$\begingroup\$ My ESP 12F won't query/program at anything other than 115200 (any other baud rate results in connection failure) - any idea why this might be the case? \$\endgroup\$ Commented Aug 7, 2017 at 1:21
0
\$\begingroup\$

The problem is fixed. As a last resort, I decided to try flashing the firmware with a different serial to usb converter as suggested by some folks online. So I bought the CP2102 Serial to USB converter from amazon and this worked!!!. So, the problem was with the FTDI hardware, I believe it was a dupe and could not handle transfer at high baud rates. I hope this answer may help someone in the future facing the same issue, trying to flash firmwares using the fake FTDI hardwares.

answered Jun 29, 2016 at 16:01
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.