Com port access denied

Win 10, Uno R3...… I was uploading no problem probably more than a 1/2 dozen times and finally figured out a code error and then on an upload attempt the upload failed and hasn't worked since. Error message as follows:

Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 930 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM3": Access is denied.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

////////////////////////////////////////////////////////////////

I have since tried all of the easy fixes. Different usb cable, numerous restarts ,reload drivers ect. I grabbed a new from package UNO and I can't even load blink on it. The UNO powers up, is recognized on the com port, and returns the board info when requested from under the "tools" heading. I just cant get win 10 to let me use the com port to upload a program.

I hate win 10 with a passion because connecting anything other than a g-d cellphone is usually an enormous exercise in frustration. Arduino has happily been an exception until this happened in the middle of an otherwise (and up until) successful session of writing and uploading code. Win10 forced an update a few days ago.... don't get me started.... but has been uploading without issues since the update, right up until it no longer will.

I'd like to make sure that the com port settings are all correct but trying to google any relevant string of those terms doesn't lead to joy, so if someone can point me to the correct BPS, data bits, parity, stop bits and flow control settings that would be swell. Any other ideas are greatly welcomed as well. Thanks in advance.

This error is usually caused by some other application having the COM port open. The COM port can only be open in one application at a time. The tricky thing is that sometimes it might be something like a poorly designed Bluetooth driver that indiscriminately opens ports.

duxthe1:
if someone can point me to the correct BPS, data bits, parity, stop bits and flow control settings that would be swell.

I very much doubt any of that could possibly cause this error.

Sounds very similar to this post.

But rather than just skip to the end maybe start at the beginning and work through JIC yours is easier to fix.

Bob.

pert:
This error is usually caused by some other application having the COM port open. The COM port can only be open in one application at a time. The tricky thing is that sometimes it might be something like a poorly designed Bluetooth driver that indiscriminately opens ports.
I very much doubt any of that could possibly cause this error.

Any advice on how to find and fix the theoretical BT offender?

I'd still like to double check the port settings if anyone has a list or link to what they should be. I seem to recall having to futz with them before to get an ftdi adaptor to talk to a pro mini.

ballscrewbob:
Sounds very similar to this post.

But rather than just skip to the end maybe start at the beginning and work through JIC yours is easier to fix.

I'm not looking to reinstall my operating system. I already have two machines I keep in service because WIN10 can be bothered to be a decent enough OPsys to perform the tasks relegated to said machines.

Calling up TASK MANAGER can be a good start to finding errant apps such as BT etc.
Processes and services are the ones I would probably start to look at.
ALWAYS read the description for the item first before you shut something down.

If you are using a BT enabled mouse or keyboard you might accidentally shut down that but easy enough to reboot and regain control.

IMHO there are plenty of methods that do NOT require an OS re-install and that should be an absolute final and very drastic measure.

I would start with the more common steps.
Ensure a USB 2.0 port is used wherever possible, insert a powered USB 2.0 hub between the Arduino and the computer, swap out USB cables for known working ones, disable any additional security such as antivirus etc for testing only, and as Per says check for an errant app that may be causing a conflict.

Bob.

I check but didn't find anything obvious. I don't have any bt perripherals or use bt for anything at all.

I did notice that my cell phone has trouble connecting to the usb now, too. It did manage to pull a picture off the phone but really slowly compared to normal with several instances of "trouble connecting" warnings.

What are the chances that my USB got damaged?

I'd also still appreciate the proper com port settings if someone can point to them.

You did not mention if you are using USB 2.0 or 3.0 ?

I find USB 3.0 quicker for transfers form the phone but more prone to random faults.
Yet on an external hard drive I have zero issues with speed and reliability.

Bob.

Looks like 3.0.... but I really don't know. Its been plug and play over the course of several projects excluding the pro mini, but even that wasn't a big deal. I can do a fair bit with electroncis but am not overly computer literate.

It looks like one of a few options..

My laptop's usb is fried

or

Windows update broke usb

or

There is a setting buried somewhere preventing functionality that mysteriously popped up in the middle of a session of editing and uploading code.

Windows has the ability to ROLL BACK updates.
You may want to start there.

Check what the update is first and if it is hardware related then try roll it back to what it was before.

Bob.

I’ve been leaning away from the update because it worked for a few days after the update. Went ahead and rolled back the latest update and sure enough that was it. Great job Windows! You’re the best!

I appreciate the time everybody spent to respond. Thanks

Glad you got it figured out duxthe1

You might want to check the manufacturers site for your computer/ motherboard as there may actually be an update for the USB.

Wherever possible that is the route I take and almost always ignore windows of versions of driver update.
MS updates in the driver area are often fraught with issues as MS often make modifications without due respect to the actual hardware itself.

Bob.

@ Cartoga the board was a UNO and not a NANO.
Two very distinct boards.

Bob.