Upload to ESP32 fails: "Timed out waiting for packet content"

Continuing the discussion from Upload Error: exit status 2:


My problem also same Please Help Me Thanks! SOS

I am also getting this issue. Sometimes if i restart my computer it will allow me upload a new sketch. Is this related to the serial monitor somehow? Seems like it was working fine before I enabled the "USB CDC on BOOT" and started trying to recieve serial data. I also have tried with Platform IO and I am getting the same issue, exit status 2.

Try this:

Disconnect USB
Push down boot button
While boot button is pushed, connect usb to computer
Release boot button
Upload the code

The code will not start right after download. Nothing will happen. Unplug the board and connect to usb again.The board will now boot the code.

4 Likes

Remove all connections from the board and upload program now it will upload

1 Like

Worked for me, thanks!

Some ESP32 boards don’t go correctly in flashing/download mode.

  • Try to holding-down the “BOOT/FLASH” button in your ESP32 board while uploading.

  • If this work it is possible to automate this by connecting a 10 uF electrolytic capacitor between the EN pin and GND.

This work for me.

Credit for this solution to : This web site.

https://randomnerdtutorials.com/solved-failed-to-connect-to-esp32-timed-out-waiting-for-packet-header/

1 Like

Guys to solve the "Failed uploading: uploading error: exit status 2" problem, when he starts printing "Connecting........__" just hold-press the "Boot" button on your esp32.

2 Likes

@ccoultas -- Thank you!

Of all the suggestions so far, this one was the only one that worked.

BTW, for me at least it tends to happen after I have successfully uploaded a program that has an infinite loop of serial output like: loop(){ print("xyz"); }

It's like the serial channel is saturated or something.

For whatever reason, i needed to do the unplug/hold-down-boot/plug-back-in routine; but ALSO needed to hit the Reset button afterwards.

Thanks again

it works! Thank you!

hey i created an account just to thank you for this

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.