Can't upload Blink sketch to ESP32 dev board

When trying to upload sketch using Arduino IDE, I get “Timed out waiting for packet header” error in text window at bottom of IDE screen. I have pressed “boot” and “EN” buttons as advised for the upload. I have also downloaded a serial driver recommended by the dev board manufacturer. Also the following (?significant?) text string appears in a green bar as the last line in the bottom of the IDE screen: “ESP32S2 Dev Module, Disabled, Disabled, Disabled, UART0, Disabled, Defasult 4MB with spiffs (1.2MB APP/1/5MB SPIFFS), 240MHz (WiFi), OIO, 80MHz 4MB (32MB), 921600, None on COM1”.

FYI, when using a NANO dev board, an additional COM port (COM6) appears and is selected in the IDE for the NANO. For the ESP32S2 board only COM1 is available for selection.

Any help will be appreciated. Thanks

This forum is focused on the Fritzing application and part files. That overlaps with ESP and Arduino for creating projects, but your problem would be better posted to an Arduino (IDE) or ESP32 forum.

That said, make sure that you have the correct ‘board’ configuration selected in the Arduino IDE. Also, not all the world uses Windows. The information about the COM port allows me to infer you are using Windows, but when posting about problems, is is a good idea to explicitly state which OS and application versions you are using.

I agree 100% with everything microMerlin said. But I will add my 2 cents…

When using the Arduino IDE on WinXP and Win10 machines, I usually have 2 ports listed, (COM1 & COM3 on Win10). When I plug a board in, a third port is added in that menu option of the IDE. Additionally, when I plug a board in, the computer will emit a short sound to indicate a new USB device has been plugged in. In fact, every board I’ve ever used, once plugged into the computer, causes the computer to make the ‘new USB device’ sound.

But yeah, the arduino forum is where you should be posting this…


[SOLVED]. I was using a USB cable that had no “data” lines. I used a different USB cable and all is well.

BTW, I agree with microMerlin also. Sorry for my naivete.

I am writing down the best possible ways to solve this problem -

How to fix the Error?

To make your ESP32 board go into flashing/uploading mode automatically, you can connect a 10 uF electrolytic capacitor between the EN pin and GND.

You may want to test this setup first on a breadboard to make sure it works for your ESP32 development board.

If it works, then you can solder the 10 uF electrolytic capacitor to the board. Since the EN and GND pins are far apart from each other, you can simply connect the capacitor between the EN and the GND of the ESP32 chip

Before trying to upload a new code, you should check the connections with a multimeter in continuity mode – check that you haven’t inadvertently solder anything to the next pin.

If everything is soldered properly, you won’t need to press the BOOT button when uploading new code. You also won’t get the Fatal Error Occurred: “Failed to connect to ESP32: Timed out waiting for packet header”.

Another way you can solve this issue -

After installing the ESP32 add-on, if you open the Arduino IDE and it fails to compile code to your ESP32 board, we recommend re-running the Arduino IDE ESP32 add-on installation. Basically, at first, I want to add all of my data on erp software implementation.

Note: Windows PCs often have multiple Arduino IDE versions installed (portable and local installations). Make sure you are running the Arduino IDE where you installed the ESP32 add-on.

When you try to upload a new sketch to your ESP32 and it fails to connect to your board, it means that your ESP32 is not in flashing/uploading mode.

Having the right board name and COM por selected, follow these steps:

  • Hold-down the “ BOOT ” button in your ESP32 board

That’s it. Your ESP32 should have the new sketch running. With those boards/with that setup, after uploading a new sketch, press the “ ENABLE ” button to restart the ESP32 and run the new uploaded sketch.

You’ll also have to repeat that button sequence every time you want to upload a new sketch. But if you want to solve this issue once for all without the need to press the BOOT button, follow the suggestions in the next guide:

To be honest we’re not sure why that happens with the newer boards. We don’t have any ESP32 board with that behaviour. We think there might be something different with your specific board or the Arduino IDE fails to send the right command sequence to put the ESP32 automatically in flashing/uploading mode.

Hope this solution helps you properly.

If you read the full thread, you should find that the problem was an unrelated hardware problem. The USB cable was power only. A charging cable.