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.

3 Likes

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.

1 Like

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

2 Likes

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

i am currently getting this error, compiles fine but wont push to my esp32

ive tried even a simple hello world and it wont push

Hi @droopyboy. I'm going to ask you to provide the full verbose output from an upload attempt.


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


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

4 posts were split to a new topic: Upload to ESP32 board fails: "No serial data received."

I solved this problem by changing the USB cable. I'm using Windows 10. Not all USB cables are wired to carry data. Some are for power-only. I tried 4 usb cables and none worked. I checked each of those with a multimeter and found that only 2 of the 4 wires on the USB-A end were connected to pins on the Micro-USB end. Those 4 are surely power-only cables but there is no marking to indicate that. Then I finally found a 5th cable that worked the first time I tried it. I checked that cable with a multimeter and sure enough all four pins of the USB-A are connected to pins in the Micro-USB.

Prior to solving this, I installed the F231x FTDI driver and the CP210x driver so I have no way of knowing whether either of these drivers was necessary for my setup - they could have already been there for all I know.

The process is also dependent on pushing the "0" button at the right time and for long enough. The "right time" is just after you see "Connecting ..." in the Output window of Auduino IDE. "Long enough" is 1-3 seconds - i.e. more than just a momentary bump.

More info - Windows 10 will make a chime sound when a USB device gets connected. The ESP32 will generally emit some text to the serial/usb when it is reset or powered on. If you don't hear a windows chime when you plug in your ESP32 board, it means that Windows is not recognizing that a USB device has been connected. The issue could be the lack of a driver or use of a power-only cable rather than a data cable.

If you hear the windows chime when you plug in your ESP32 board, you can open the serial monitor in Arduino IDE and check whether the device emitted startup text. If there is text, you know you have a working USB/serial connection and most likely uploading a program will work as long as you press the 0 button at the right time for long enough. If it still doesn't upload, at least you know the problem is NOT the USB/serial connection.

2 Likes

A post was split to a new topic: Upload to ESP32 board fails: "Possible serial noise or corruption"

this is definitely true as well; you have to make sure your cable is for transferring data; but I actually ended up burning a couple chips up haha

I had the same problem but what worked for me is to reset everything and connect everything now make sure you are using ESP32S3 Dev Module and connected to the correct port

Manually Reset the ESP32-S3
Sometimes, manually resetting the board can help:

Press and hold the "BOOT" button on the ESP32-S3.
Press the "EN" (reset) button while still holding "BOOT".
Release the "EN" button first, then release the "BOOT" button after a second.

if there is a test program on esp32 of RGB light where it turns on all colors or similar lights, you will see after you have done this that it turns red, meaning that it has gone, and you will also see that your port was changed for me If you do it in the beginning, I had that problem on COM17. After the reset it becomes COM19, so pay attention to that too

if your ESP32S3 dev module is not included in boards make sure you download via this link and make sure you follow that instruction the link:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide


Update

watch this video if the above things didn't work
link : https://www.youtube.com/watch?v=rWpuTCoPGaU

for the people who are afraid to press the link:
the video says that while uploading when those points start coming you have to press the boot button until those points stop and then it works fine


1 Like