Need help please -> Out of things to check
I've read through the arduino forums and found similar questions asked. I followed their recommendations but the issue did not resolve.
Error:
avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.
The script has only uploaded two times. It has failed on every upload attempt after that.
It fails with error "access denied error".
It seems odd that even after the error occurs the Serial Monitor is still showing data constantly updating on the screen.
Outstanding questions:
- Is there a better way to find what ports are currently in use (I'm using Process Explorer; see below).
- don't know how to tell a 3rd party software package or a device to disconnect from a COM port (I don't think another process is using the COM port; see below)
- Do not understand if downloading FTDI Virtual COM Port Driver is required.
- I didn't understand what a post meant by reinstalling the avrdude and avr-gcc compiler processes so I uninstalled everything and reinstalled.
Things I've checked and tried:
-
Only other things connected to PC over USB are the keyboard and mouse. These use different connector slots.
link: arduino uno - Access denied when Uploading - Arduino Stack Exchange -
checked cable connections and condition
-
visually double checked the Arduino IDE Board and COM port used and then confirmed it with the device manager Port (COM&LPT) setting
-
Pressed the Arduino Reset button:
- Once
- Twice
-
Changed the baud rate from 9600 to 115200
When it did initially upload the baud rate was at 9600. After the error I changed it to 115200. It made no difference so I put it back to 9600- link: uploading - "avrdude: stk500_getsync(): not in sync: resp=0x00," aka Some Dude Named Avr Won't Let Me Upload My Program - Arduino Stack Exchange
- I did not know what he meant by reinstalling processes Avrdude and avr-gcc compiler. So I uninstalled everything and reinstalled.
-
Downloaded "Process Explorer" to see if anything else is using the port. Went through the recommended instruction steps (link below). The Find -> Find Handle or DLL search on FTSER2K returned nothing.
I assume nothing found means no other process is using the same COM port.DevMgr Port:
USB Serial Port (COM3)
Service: FTSER2K- References:
- If there's a better way to do this please let me know
-
Changing COM ports
- Tried about 20 different COMs randomly from 3 to 255.
using device mgr and then verifying the match in Arduino IDE tools->ports
..Tried both unplugging Arduino USB to computer and leaving it connected.
..Tried restarting and not restarting the Arduino IDE
..Tried both rebooting and not rebooting computer
In all cases the Sketch failed to upload after every change - Reference: https://youtube.com/watch?v=MkPJD_6PjDc
- Tried about 20 different COMs randomly from 3 to 255.
-
manually updated drivers on DevMgr Ports -> USB Serial Port (COM3)
Windows said they were up to date
Sketch still would not upload -
Uninstalled Arduino software and reinstalled software
Sketch failed on upload -
Rebooted machine; after the restart let it sit for about 15 minutes before launching Arduino
Failed on upload -
Rebooted machine; immediately started Arduino
Failed on upload -
FTDI Virtual COM Port Driver
Do not understand if downloading FTDI Virtual COM Port Driver is required.
The sketch did upload one time before beginning to fail upload so it must have a compatible driver
Reference: VCP Drivers - FTDI -
Windows Task Manager shows Multiple Arduino Processes
11 arduino processes running:- arduino-cli.exe
- arduino-language-server.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
- Arduino IDE.exe
-
Only have Windows Defender installed and running.
Article says to turn off 3rd party anti-virus.
Reference: Seeing the Arduino upload error? Fix it easily in 8 steps -
On Device Manger top level shows 3 COM ports listed
DevMgr Ports (COM&LPT)- communications Port (COM1)
- Printer Port (LPT1)
- USB Serial Port (COM3)
digging down through COM3 port Settings > Advanced, COM Port Number lists 256 COM ports only COM1 says is "(in use)"
Reference: Access Denied - #4 by DrAzzy
I don't see any other recommendations on the web or arduino forum and don't know what else to check. I must be missing something.
Please help.
Other Details
Upload Error:
Sketch uses 3410 bytes (10%) of program storage space. Maximum is 32256 bytes.
Global variables use 210 bytes (10%) of dynamic memory, leaving 1838 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\alvin\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\alvin\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -carduino "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\alvin\AppData\Local\Temp\arduino-sketch-7220689F9C89389A1651842C05EF6474/BasicTemperature.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\alvin\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1
Script (basic temperature)
int lm35Pin = A0;
void setup() {
Serial.begin(115200);
}
void loop() {
int analogValue;
float temperature;
analogValue = analogRead(lm35Pin);
temperature = float(analogValue) / 1023;
temperature = temperature * 500;
Serial.print("Temp: ");
Serial.print(temperature);
Serial.println(" C");
delay(1000);
}
Arduino IDE
Version: 2.0.3
Date: 2022-12-05T09:30:25.331Z
CLI Version: 0.29.0 [76251df9]
Copyright © 2022 Arduino SA
Arduino Uno Board Info
From Arduino IDE:
BN: Arduino Uno
VID: 0x2341
PID: 0x0043
From Board:
OSEPP Uno R3 Plus
Rev 3.8
PC
Processor Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz 3.70 GHz
Installed RAM 16.0 GB
System type 64-bit operating system, x64-based processor
OS (current: no updates pending)
Edition Windows 11 Pro
Version 22H2
Installed on 10/5/2022
OS build 22621.963
Experience Windows Feature Experience Pack 1000.22638.1000.0
Arduino Port Used
-- COM3
Device Mgr Ports (COM &LPT)
-- USB Serial Port (COM3)