Failed to connect to ESP32: Timed out
Espressif ESP32
Severity: ModerateWhat Does This Error Mean?
Failed to connect means the upload tool cannot put the ESP32 into bootloader mode. You usually need to hold the BOOT button while the upload starts. Some boards require holding BOOT, clicking upload, then releasing BOOT when the upload begins.
Affected Models
- ESP32-DevKitC
- ESP32-WROOM-32
- ESP32-S3
- ESP32-C3
- ESP32-CAM
- Wemos D1 Mini ESP32
Common Causes
- Board did not enter bootloader mode — BOOT button not pressed
- Wrong board selected in the Arduino IDE or PlatformIO
- USB cable is charge-only (no data lines)
- Wrong COM port selected
- Missing CP2102 or CH340 USB driver
How to Fix It
-
Hold the BOOT button during upload.
Click Upload in the IDE. When you see Connecting... in the output, hold the BOOT button on the ESP32. Release it when uploading starts. Some boards need you to also briefly press EN (reset) while holding BOOT.
-
Check that the correct board is selected in the IDE.
In Arduino IDE: Tools > Board > ESP32 > select your exact model. ESP32, ESP32-S3, and ESP32-C3 are different chips that need different settings.
-
Try a different USB cable.
Data-capable USB cables are essential. Charge-only cables will not work. The ESP32-CAM is especially notorious for cable issues because it has no built-in USB.
-
Install the ESP32 board package in the Arduino IDE.
Go to File > Preferences and add the Espressif board manager URL. Then Tools > Board > Board Manager > search ESP32 and install.
Frequently Asked Questions
Why does the ESP32 need the BOOT button?
The ESP32 normally boots from flash memory. To upload new code, it must enter bootloader mode. Holding BOOT (GPIO0 low) during reset tells the ESP32 to wait for a serial upload instead of running the existing program.
Do all ESP32 boards need the BOOT button?
No. Some newer boards (like the ESP32-S3-DevKitC) have auto-reset circuitry that enters bootloader mode automatically. Older or cheaper boards often require manual button pressing.