Page 1 of 1

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

Posted: Wed Apr 12, 2017 3:15 am
by DuyTran96
I have just bought an ESP32 module with a white breakout board with 2 buttons RST & FLASH on it. I try some examples through Arduino IDE and they worked well. But later I received the message like this

"A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header"

I tried several times and I worked again. But then the error keeps appearing and now I can't upload any code to my ESP32. I am using CP2102 USB to UART. Is there any way to fix this? Thank you.

Re: A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Posted: Wed Apr 12, 2017 6:01 am
by ESP_Angus
This problem is usually an error with going into reset mode, or failed communications.

Can you double-check all your wiring, and that the rst/flash buttons are still working correctly? IF the CP2102 doesn't connect RTS or DTR to the breakout, then you hold down FLASH and tap RST before starting the flash.

How are you powering the ESP32 module?

Re: A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Posted: Fri Apr 14, 2017 6:26 am
by DuyTran96
ESP_Angus wrote:This problem is usually an error with going into reset mode, or failed communications.

Can you double-check all your wiring, and that the rst/flash buttons are still working correctly? IF the CP2102 doesn't connect RTS or DTR to the breakout, then you hold down FLASH and tap RST before starting the flash.

How are you powering the ESP32 module?
All the buttons are working properly. I power my ESP32 through my CP2102 5V. I tried the FT232RL and it worked well. May be there is a problem with my CP2102.

Can you show me how to connect RST and DTR? I all ways have to press the FLASH and RST buttons. Thank you for your reply

Re: A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Posted: Fri Apr 14, 2017 11:39 pm
by f.h-f.s.
Are you sure you are in download mode?

If so, do the flash reset thing with the serial terminal open. You should see something like:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Then close your serial connection and run the python esptool flash command.