Arduino Nano not able to upload (COMX port access denied)

I've tried everything to try and fix the COMX port access denied issue when uploading sketches. It only happens when I try upload to a Nano. Here are some of the things I've tried:

  1. different nano boards
  2. different USB cables
  3. different ports
  4. different PCs
  5. different operating systems (mac osx & windows 11)
  6. different versions of windows (couldn't rollback an update so I updated anyway)

I have also tried just about every solution suggested on many different forums online;

  1. downloading drivers for chinese version of the board (CH340)
  2. reinstalling IDE (v2.0.3)
  3. changing COM port through device manager
  4. turning off all BT devices (I don't have any anyway)
  5. forcing bootloader upload
  6. Finding and stopping process using port with process explorer tool (no process found)

I think it may be a driver issue as in device manager the Nano shows up as "USB Serial Port COM9". No matter what I try I get errors like either

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt <n> of 10: not in sync

or

avrdude: ser_open(): can’t open device <port>: access is denied

My arduino nano worked when I first started out with arduino, but only for the first 2 hours of use. I have since bought a new nano and still have the exact same issues. Arduino UNO works without issue.

*Just tested it on a different PC, first two or three uploads worked, then I get the COMX access denied error, for both boards.

Same exact thing with nano happened to me as of today. Yesterday I could access the port and upload sketches without a problem. My windows downloaded some updates overnight, and today I get the same error with you :

avrdude: ser_open(): can't open device "\.\COM1": Access is denied.

The port of course cannot be busy, and I 've tried most of the things you mention.
I 've had this issue again in the past, and had to downgrade my windows from 11 to 10. No idea what's happening here. Please someone help

Were these 2 different Nano boards bought together from the same supplier? Then chances are high that both of the boards are bad.

That will only work if you use a programmer. Did you use a programmer.

Did you disable bluetooth on your PC?

COM1 is hardly ever the Arduino. Does the port disappear when you disconnect the board. Which version of the IDE are you using?

True. I manually changed the port from COM3 to COM1 hoping for better results. Nothing.

Also, @bidrohini this happened to many boards from the same supplier. However, the day before, the same boards worked just fine. This issue has only occurred with arduino nano boards.

Do your other boards use the same TTL-to-USB chip as you Nano? Which TTL-to-USB converter on your Nano?

What is the number of the COM port that appears in Windows Device Manager when you plug the Nano in ?

This issue also occurs with Pro Mini boards. I still do not have any solution for the problem.

@tmkane, a Pro Mini does not have a TTL-to-USB adapter onboard. So what are you using to upload? Upload using programmer? Which one?
Or an adapter? What is the chip on the TTL-to-USB adapter that you use?

Which operating system? Did this start after a Windows update?
Which version of the IDE?

By the way, I see that you have your own topic about this. Let's not waste time on it here.

  1. yes I used a programmer board
  2. yes, BT is disabled

Possible, but I don't want to go and buy yet another board just to get the same issue ;(

  1. followed this process using an Uno to burn onto the Nano

  2. Windows 11, issues occurred not after any particular update. I was using the board for two hours or so perfectly fine until I started encountering weird errors and eventually com port access denied errors.

  3. IDE v 2.0.3

Hi @rjandersson. Please check to see whether you have the Serial Monitor tab open in the bottom panel of the Arduino IDE window. If so, click the X icon to close it:

image

If you have the Serial Plotter window open, close that also.

After doing that, try uploading again.

Arduino IDE automatically closes the port in Serial Monitor and Serial Plotter when uploading, so you should be able to upload without any problems even with them open, but it is worth checking just to be absolutely certain they are not interfering with the upload.

I am using the CH340G usb to TTL. It's cheap and I have heard there have been problems with the drivers. But this shouldn't affect our case.

@UKHeliBob the port that appeared when I plugged the Nano board was COM3. I have checked if the port is used by any other software, and it's not. So no idea what's going on

@ptillisch While the serial monitor is open, I get COM port access denied error, wheras while it is closed it times out while uploading and I get this error;

avrdude: stk500_getsync() attempt <n> of 10: not in sync

I just tried uploading with the serial monitor closed and switched to the old bootloader (tools -> processor -> ATmega328P (old bootloader) ) and it works. Don't know if to count this as a solution, but uploading seems to work as long as the serial monitor is closed.

Hi @rjandersson. Thanks for taking the time you report your results.

There is a formal bug report that looks similar:

I did some experimentation and found I am able to reproduce the fault.

Please tell me which USB chip your Nano board has. The chip is usually located on the bottom of the board on the end nearest the USB socket.

The common chips:

FTDI FT232R

WCH CH340

(that picture is of the chip on an Uno board, but the chip on the Nano board would have the same markings and package as shown in the picture)

Hi @ptillisch thanks for your support -- both Nano boards I have have the FTDI FT232R chips

Just checked the thread you linked, if it helps -- I also started experiencing this issue around the 22nd of December, about 5 hours after I first started using the Nano.