a fatal error occurred: failed to connect to esp32: timed out waiting for packet header

Ashutosh's picture

Offline

Joined: Aug 27, 2018

Replies: 25
a fatal error occurred: failed to connect to esp32: timed out waiting for packet header
November 16, 2021 - 12:55pm

Hi,

Does anyone know how to solve the following Error on ESP32 "Fatal Error Occurred: “Failed to connect to ESP32: Timed out waiting for packet header”"

I am new to ESP32 Development boards and this is my first sketch that I am tryign to upload, but by Arduino IDE showd the following error. The tutorial I am following is this one https://circuitdigest.com/microcontroller-projects/getting-started-with-esp32-with-arduino-ide 

The code is nothing special, I am just uploading the sample blink sketch for ESP32 boards. But if you are still wanna see the code check below 

 

int LED_BUILTIN = 2;

void setup() {

pinMode (LED_BUILTIN, OUTPUT);

}

void loop() {

digitalWrite(LED_BUILTIN, HIGH);

delay(1000);

digitalWrite(LED_BUILTIN, LOW);

delay(1000);

}

 

 

 

 

JOYDIP DUTTA's picture

Offline

Joined: Jun 22, 2021

Replies: 2

I think this error occurs when Arduino IDE fails to connect to the board. In ESP32 you should try to PUSH and HOLD the BOOT or FLASH button while uploading the code.

 

Ashish Choudhary's picture

Offline

Joined: Mar 04, 2019

Replies: 23

What is the flashing speed? Could you try to lower the flashing speed to 115200.