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

peter882363
Posts: 6
Joined: Wed Feb 14, 2018 11:45 am

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

Postby peter882363 » Tue Feb 12, 2019 9:45 am

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?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Tue Feb 12, 2019 11:42 am

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?

peter882363
Posts: 6
Joined: Wed Feb 14, 2018 11:45 am

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

Postby peter882363 » Wed Feb 13, 2019 2:04 am

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?
Attachments
error.jpg
error.jpg (218.84 KiB) Viewed 8172 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Wed Feb 13, 2019 3:21 am

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.

peter882363
Posts: 6
Joined: Wed Feb 14, 2018 11:45 am

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

Postby peter882363 » Wed Feb 13, 2019 8:36 am

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?

Andreas_Mainz
Posts: 4
Joined: Sun Feb 03, 2019 6:47 am

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

Postby Andreas_Mainz » Wed Feb 13, 2019 9:07 pm

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.

peter882363
Posts: 6
Joined: Wed Feb 14, 2018 11:45 am

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

Postby peter882363 » Thu Feb 14, 2019 3:02 am

So when the esp32-devkitc-v4 board burns, must it press the boot button. No way to automate?

Andreas_Mainz
Posts: 4
Joined: Sun Feb 03, 2019 6:47 am

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

Postby Andreas_Mainz » Thu Feb 14, 2019 4:55 pm

If the flashing works correctly you do Not need to press any buttom

Who is online

Users browsing this forum: No registered users and 144 guests