A fatal error occurred: Failed to connect to ESP32


#1

Hello!

I’m getting the following error during the device registration process:

[info] Starting device registration

[info] Burning bootloader…

[info] Burning bin

[info] esptool.py v2.0

[info] Connecting…

[info]

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

[error] Can’t burn bootloader! --> esptool.py v2.0

Connecting…

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

The board is detected correctly - OLIMEX ESP32 GATEWAY - on COM9, connected to a Pc with Win7 via USB2.0.

Any help would be very appreciated. I have seen various posts with this same problem, but none seems to give any solution.

Thanks in advance!


#2

There are many different reasons that can lead to this problem.

A problem on TX/RX serial pins?

The board is rebooting really fast?

One thing you can try is fully erasing flash memory of the board from Zerynth Studio:

Click the “i” button on the right of the device selection:
image

Then, Erase flash button
image

if it’s still not working you can try pressing the reset button of your board just when the “Connecting…” message appears on the bottom console.

Also try another USB cable or another USB port just to be sure.

If you still have problems there probably are some problems on your board serial port.


#3

Thanks for the quick answer!

I have tried the flash erase, with the same results:

image

image

[info] > Starting erasing flash…

[info] esptool.py v2.0

[info] Connecting…

[info]

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

[error] Can’t erase flash! --> esptool.py v2.0

Connecting…

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

I have also tried different USB ports, and pushing RST1 button, pushing BUT1 button, and both of them during the process too with no luck.


#4

I worked! I pushed - and released- the reset button during the process and suddenly the registration happened.

Silly of me, I was holding down the button the whole time during the previous tries.

Thank you very much!


#5

I’m glad to hear that :smile:

Have fun with Zerynth!