Go Down

Topic: avrdude: ser_open(): can't open device "\\.\COM7": Access denied. (Read 6559 times) previous topic - next topic

AZuccotto

Hi everybody,


I recently bought an arduino pro from sparkfun.com in order to play a little bit with the avago ADPS RGB and gesture recognition sensor,.
I have downloaded the IDE and basically followed the instruction on the website, that you can find at this link: https://learn.sparkfun.com/tutorials/apds-9960-rgb-and-gesture-sensor-hookup-guide.
I bought all the stuff from the website, so that my setup is exactly the same.

Despite following the guide I have a problem uploading the example code from the library (which is also downloadable at the previous link) to the board (an Arduino Pro).
I checked in the toolbar if I had actually the right seup, and it seems ok to me, since I can see the serial port from the IDE, have the ATmega328(3.3V. 8Mhz), the Arduino Pro selected and the drivers installed.
When I try to upload the code to the board I get this problem "avrdude: ser_open(): can't open device "\\.\COM7": Access Denied".
So far I tried unplugging and plugging again the USB cable but there's no difference.
I'm using windows 10 on my laptop.
I saw that there are a lot of topics similar to this one, but they all were not useful for me, so I'm trying to have some good information on my own.

Do you have any suggestion?Anything that I can try?
Thank you for your attenction in this matter.


DrAzzy

Access denied typically means something else is trying to access the serial port

There's a bug in 1.6.8 of the IDE under windows that can cause Access Denied errors when trying to upload due to a defect in serial port treatment. 1.6.7 works, and I've heard the 1.6.9 hourly builds have had it fixed for a while. I personally recommend 1.6.5r5 though, as that avoids some compiler bugs that effect some users on 1.6.6 and 1.6.7.

There also exist a number of programs that assume any serial port connected to the computer is for whatever that program was meant to work with, and automatically connects to the serial port and tries to communicate with it as if it were that other device (for example, people have had things running in the background for a modem that assumes any serial port is a modem, and connects to it and starts sending modem control AT commands).

Finally, a few people have reported that error being caused by driver issues (which usually result in the port not showing up at all)

ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

AZuccotto

Ok I'll try with the 1.6.5, since i didn't have things running in background.
Thank you very much, I'll let you know if it works!!

dalsquared

Hello,
I am having the almost identical problem the OP had, with the added wrinkle that my 'COM7' only appears for a second in Device Manager, and then disappears immediately.  I tried the fix you all recommended to him (switching to v. 1.6.5) but that didn't seem to do anything different.  So, I told my Arduino clone to connect to COM1 (the only option available) but when I do nothing (and I mean nothing) happens on the board.  I am simply trying to run the 'reset' program (you know, the empty 'setup' and 'loop' methods and nothing else) but when I do all I get is the following errors (pls see attached).

This is an Arduino Mega 2560 R3 Clone, apparently from China, bought as part of a 3d printer kit from Folger Technologies.  I am suspecting that the boot loader isn't installed, but I can't get it to do more than blink once or twice on the power and pin 13 leds, then give up the ghost.  There is also a RAMPS v 1.4 board originally attached to the Arduino (which I disconnected in order to be able to find out what was happening), might this have something to do with it?  I am very confused on which direction to go, maybe to contact the people at Folger Tech?  Any clarity you can give would be very much appreciated.

Oh, I'm running a Windows 7 Pro machine with the following stats:

Processor Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz 6.5 3.5
Memory (RAM) 4.00 GB 5.9
Graphics Intel(R) Q45/Q43 Express Chipset 3.9
Gaming graphics 1655 MB Total available graphics memory 3.5
Primary hard disk 238GB Free (466GB Total) 5.9

Thank you very much in advance.

dalsquared

Had a problem uploading my error message earlier (saved it as an rtf file only to discover they aren't allowed) so I'm trying to upload them again here:

dalsquared

Holy smokes!  It's allasudden working!  I have no idea what I did, though I did reboot the computer, did that do it?  It sux being a newbie.  I will await somebody's response after they read the error message before I head on to the next step.

pert

I will await somebody's response after they read the error message before I head on to the next step.
If it's working keep on going. I've had problems like that where the serial port stopped working and rebooting the computer fixed it. It could also be a bad USB cable or jack. If the problem comes back then you can look for the cause more but otherwise I say don't worry about it. Enjoy! Per

dalsquared

Thanks for your reply, Pert, and it is generally excellent advice (if it ain't broke, don't fix it) unless you are speaking with a rank newbie, which I'm afraid, is the case here.  Since I don't have any idea of what I did to fix my setup before, I also don't have any idea of how or why it broke again, with the same symptoms, when the house lost power yesterday and I was forced to reboot windows7 yet again.  This time, it came back non-functional (at least as far as the Arduino is concerned).  So, I copied down the error messages-yet again-in hopes of some sort of clarity on this thing.  I sure seems to have something to do with Windows ports, since when I first plug the board into the USB (I have a couple of different cables and in either case it does the same thing) the COM7 appears in device manager for a split second, then disappears, leaving me with only COM1 as an option to choose in the Arduino software.  This is the option I chose in trying to get my board to emit a peep (which it didn't).  I am very confused :smiley-confuse: , and would be grateful for any help you all could offer.

alborhauer-fcpsschools-net

I know that this is a late posting to this topic.

I was looking for a way to solve avrdude: ser_open(): can't open device "\\.\COM7": Access denied.

It turns out that the breadboard I was using (long) for my arduino did not have a continuous feed of power for either side positive or negative. Once I switched to a "hot" section of the board the com error went away.

Gibba-

If it's working keep on going. I've had problems like that where the serial port stopped working and rebooting the computer fixed it. It could also be a bad USB cable or jack. If the problem comes back then you can look for the cause more but otherwise I say don't worry about it. Enjoy! Per
Pretty damn late but i just had the same problem and rebooting my pc did infact fix the problem!

Go Up