A fatal error occurred: Failed to connect to ESP32: No serial data received

Hi guys, I want to upload only basic code to esp32 from Arduino Ide but I uploaded it from my computer but when I tried to upload company computer I got some issues like::

my dev-kit esp-32S
my code:

int LED_BUILTIN = 2;
void setup() {
pinMode (LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}

Hi @bilaltan. Please try this:

  1. Select Sketch > Upload from the Arduino IDE menus.
  2. Watch the black output panel at the bottom of the Arduino IDE window until you see this text printed:
    Connecting...
    
  3. Press and hold the button on your ESP32 board.
    if your board has multiple buttons, you might have to do some trial and error to determine which is the one you need to press.
  4. Wait about one second.
  5. Release the button.

The upload should now finish successfully.

1 Like

thanks for your response but this method does not solve the problem Board has 2 buttons I tried all combinations of buttons when printing "connecting...." or not printing. I got the same problem again

1 Like

This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.

Please perform this experiment to verify that the port you have selected is your Arduino board:

With some boards, the port will be labeled with the board name in the menu (e.g., "COM42 (Arduino Uno)"). In this case, you can be fairly confident that you have identified the port. But for other boards the port will not be labeled. You can positively identify the port using this procedure:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Select Tools > Port from the Arduino IDE menus.
  3. Take note of the ports, if any, listed in the menu.
  4. Close the Tools menu.
    :exclamation: The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Connect the Arduino board to your computer with a USB cable.
  6. Select Tools > Port from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.

Select that port from the menu and try uploading again.

If the upload still fails, or if no new port appeared after you plugged the Arduino board into your computer, add a reply here to let us know and we'll investigate the problem further.

I plugged the ESP board into my computer I don't see new port appear

Please try this troubleshooting procedure and then report your results in a reply on this forum thread:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Open the Windows Device Manager.
  2. Select View > Devices by type from the Device Manager menus.
  3. Open the "View" menu.
  4. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  5. Disconnect the USB cable of the Arduino board from your computer.
  6. Take note of the contents of the "Other devices" and "Ports (COM & LPT)" sections of the Device Manager tree.
  7. Connect the Arduino board to your computer with a USB cable.
  8. Select Action > Scan for hardware changes" from the Device Manager menus.

Did you see any new device appear in the Device Manager tree after doing this? If so, please tell us where it is located in the tree and what it is named.

You can repeat steps 5-8 multiple times if you are not sure.

I don't have permission to access the device manager.When I plugged esp board to my computer I see it other device section and It see like :

I think I have to download the driver

OK, that information is just as good as what I hoped to learn from Device Manager.

As you guessed, you need to install the driver for the Silicon Labs CP2102 USB to serial converter chip on the ESP32 board. you can get that from the website of Silicon Labs (the manufacturer of the chip):

Unfortunately I think that if you don't have permission to access Device Manager, you also won't have permission to install the driver. But at least you know the cause for the upload problem now.

I'm having the same issue:

A fatal error occured: Failed to connect to ESP32: No serial data received

I'm working on Ubuntu running on a Virtual Machine and I already installed the CP210x drivers.
The problem is not related to hardware, as I tried the cable and the ESP32 with Windows and it did work.

I can see that the USB cable is detected and I choose it in the Port section in the Arduino IDE as:
/dev/ttyS0

I have also tried to press the Boot and Enable buttons during the "Connecting..." at multiply combinations but anything worked.

I have tried literally everything that it is said on every forum but nothing worked.

If anyone knows what could do, please let me know.

:slight_smile:

Did you find any way to solve the problem? Because I have the same problem. I tried everything too, like add a capacitor, buttons combination. I need someone to inspire me with anything else.

I downloaded the CP2102 driver and the problem solved

1 Like

another solution is plug tx to rx and rx to tx i followed this video https://youtu.be/y3RcDDzeXDM?si=9nL5HW7CAFsj1TR7

but you want to plug rx to tx tx to rx