Page 1 of 1

about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Tue Feb 12, 2019 9:45 am
by peter882363
I want to make flash my code to esp32_devkitc_v4 board. But appear the following error.
"A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header"
What happened?

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Tue Feb 12, 2019 11:42 am
by ESP_Sprite
Can't really tell, that is the most generic 'can't communicate with ESP' error you can get. Can you post a bit more; what toolchain/SDK are you using and what OS?

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Wed Feb 13, 2019 2:04 am
by peter882363
I used win7+msys32 to work. I am a novice.
I try simple example with esp32-devkit board.
first connect usb cable and run "make menuconfig" to setup serial port(COM20).
Then run "make flash" to build and burn flash.But got fail. The message as attached file.
Sometime I click boot button when appear Connecting... message. Maybe can succeed.
Why?

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Wed Feb 13, 2019 3:21 am
by ESP_Sprite
Could be that your computer setup has some odd timings wrd the handshake signals that reset the board into the bootloader... Can you try this: as soon as the prompt 'Connecting...' appears, hold the 'boot' button and press the 'reset' button once. You can release the boot button as soon as the flashing begins. That should work more consistently.

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Wed Feb 13, 2019 8:36 am
by peter882363
I have used this method, but it is not convenient.And I tried 10 pieces of it all.
I suspect that there is a problem with esp32-devkitc-v4's programming circuit design.
Because the same method is used on other brand boards, it is normal.
Are there other ways or suggestions for improvement?

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Wed Feb 13, 2019 9:07 pm
by Andreas_Mainz
Hi, i am using a Development board with ch340 usb driver Chip instead of ch2102. All my Connection problems disappered. You should also update to the latest flashtool Version.

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Thu Feb 14, 2019 3:02 am
by peter882363
So when the esp32-devkitc-v4 board burns, must it press the boot button. No way to automate?

Re: about "A fatal error occurred: Failed to connect to ESP32..."error message

Posted: Thu Feb 14, 2019 4:55 pm
by Andreas_Mainz
If the flashing works correctly you do Not need to press any buttom