7

I went to upload my sketch to my Uno (r3), but unusually, the Upload Console returned this error:

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

Just started seeing this, cannot upload.

Avamander
  • 624
  • 2
  • 11
  • 35
samiles1995
  • 71
  • 1
  • 1
  • 2
  • 1
    I had Ultimaker Cura open, this seemed to be hogging the com ports. Make sure your other apps aren't using them. – aaa Dec 29 '19 at 23:51
  • I can confirm here that for me it was also Ultimaker Cura. Once closed, COM port was free again. I think it's worth a try, if all the other things look ok (i.e. checking the device manager). – marco May 02 '21 at 02:23

3 Answers3

6

There might be another device has already connected to that port. It could even be a terminal emulator which is left connected from last debugging session.

Otherwise, make sure that your UNO is really presented on COM4 by checking with "Device Manager". if not, change the port where it is available.

Sener
  • 394
  • 2
  • 12
1

I'm using a windows 10 and had this happen randomly. I closed several other applications and it started working again.

cagney
  • 111
  • 1
0

You have selected the wrong COM port. Go to Tools -> Port -> Select the right port. If you do not know the port number disconnect the Arduino, open the same menu again and look what is listed there, write down if you can't remember, now plug your Arduino back in and select the option that wasn't there before.

Avamander
  • 624
  • 2
  • 11
  • 35