Nano esp32 upload problems. Driver not working windows 10

Hi there,

first of all, mention that I have tried to find my issue reading through many different topics, but can’t fid it. I have a brand new nano esp32 official from Arduino. Onmy first run, tried uploading a “Hello word” sketch. I am using IDE 2.3.6. It says it can’t upload the sketch because adriver problem. I will paste the error here:

Sketch uses 295015 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20688 bytes (6%) of dynamic memory, leaving 306992 bytes for local variables. Maximum is 327680 bytes.
esptool v5.0.0
Serial port COM21:
Connecting...
A serial exception error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.

For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool latest documentation
Failed uploading: uploading error: exit status 1

I’ve tried to update the dirver to the one recomended from SiliconLabs:

Silicon Labs CP210x USB to UART Bridge; no success, windows says this is a faulty driver (code 10). I’ve tried on windows 10 and 11, same results.

Then went back to using plain Windows driver, tried uploading while pressing the boot button and I got this error:

A fatal error occurred: Could not open COM21, the port is busy or doesn't exist.
(could not open port 'COM21': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2))

Hint: Check if the port is correct and ESP connected

esptool v5.0.0
Serial port COM21:
Failed uploading: uploading error: exit status 2

The board seems to have a built in sketch which seems to be running, illuminating the RGB led through all three colours.

BIG CLUE. The fix is to CLOSE ALL open copies of the IDE and monitors except the one you are directly interfacing with.

Yes the factory loaded sketch is running oroving the board is ok, this is a windows error.
Also make sure you are in 'Arduino Boot Loader Mode'. See documentation at
https://docs.arduino.cc/tutorials/nano-esp32/cheat-sheet/

Hi @cyber-k.

This indicates that you have a misconfiguration in Arduino IDE.

Select Tools > Board > Arduino ESP32 Boards > Arduino Nano ESP32 from the Arduino IDE menus and then try uploading again. If the upload still fails after that, post the output from the upload and we'll investigate further.

That is not appropriate for the Arduino Nano ESP32 board. The driver is only relevant for boards that use a Silicon Labs USB to serial adapter chip. The Nano ESP32 board does not use such a chip, so it is expected that you won't be able to install the Silicon Labs driver for the USB device created by this board.

You may find the apps and info listed here useful to check your connection

Hello guys, thanks very much for your help. Problem solved. I was using library esp32 from Espressif. Moved to Arduino ESP32 library and now everything works :slight_smile:

You are welcome. I'm glad it is working now.

Regards, Per