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:
different nano boards
different USB cables
different ports
different PCs
different operating systems (mac osx & windows 11)
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;
downloading drivers for chinese version of the board (CH340)
reinstalling IDE (v2.0.3)
changing COM port through device manager
turning off all BT devices (I don't have any anyway)
forcing bootloader upload
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
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.
@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.
followed this process using an Uno to burn onto the Nano
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.
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:
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.
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.