ESP32 will not flash: "Failed to connect" or no COM port

What to check, in order, when the board does not appear as a serial port or the upload stops with “Timed out waiting for packet header”.

Nine times out of ten the board is fine and one link between your computer and the chip is missing. Work through the links in order.

1. Is the port there at all?

Plug the board in and look for a new serial port. If nothing appears, the cable is almost certainly charge-only. Swap it for one you know carries data. On Windows, Device Manager shows a new entry under Ports when it works, or an unknown device when a driver is missing.

2. Is the driver installed?

Boards use a USB-to-serial chip: CP210x, CH340, CH9102 or FT232, and the ESP32-C3, S3 and C6 often have USB built in. Windows and macOS sometimes need the chip’s driver, and the Drivers page here lists them. On Linux add your user to the dialout group and log in again; the brltty package can also grab CH340 devices.

3. Is something else using the port?

A serial monitor left open in another window, another IDE or a browser tab holding the port will block the upload. Close them.

4. Is the chip in download mode?

Many boards enter it automatically. If yours does not, hold the BOOT button, tap EN (reset), and release BOOT when the tool says it is connecting. On a few boards a 10 µF capacitor between EN and ground makes the automatic reset reliable.

5. Is a pin holding it in the wrong mode?

GPIO0 must be high at power-up for normal boot and low for flashing. A sensor or button wired to GPIO0, 2, 12 or 15 can interfere. Disconnect everything from the board and try again.

Still nothing?

Try another USB port, avoid hubs, lower the upload speed to 115200, and read the exact error: it usually names the missing step. The web flasher on this site needs Chrome or Edge, because other browsers do not support Web Serial.

Tools that help

  • Web flasher — Flash ESP32 over USB right from Chrome or Edge using Web Serial: pick a ready firmware or upload your own .bin file.
  • USB drivers & connection help — Step-by-step help when the ESP32 is not detected: data vs charge-only cable, CH340 / CP2102 / CH9102 drivers for Windows, macOS and Linux.
  • AI Error Doctor — Paste a Serial Monitor error or a sketch and get a plain-language cause, step-by-step fix and corrected code.

Read next

← All guides

Comments

No comments yet. Share your experience or ask a question.

Comments are moderated.