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

DuyTran96
Posts: 2
Joined: Wed Apr 12, 2017 1:22 am

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

Postby DuyTran96 » Wed Apr 12, 2017 3:15 am

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.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

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

Postby ESP_Angus » Wed Apr 12, 2017 6:01 am

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?

DuyTran96
Posts: 2
Joined: Wed Apr 12, 2017 1:22 am

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

Postby DuyTran96 » Fri Apr 14, 2017 6:26 am

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

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

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

Postby f.h-f.s. » Fri Apr 14, 2017 11:39 pm

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.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 89 guests