Hi forum,
when uploading from arduino ide I repeatedly get this error:
"avrdude: ser_open(): can't open device "\.\COM21": Access is denied."
So far I have uninstalled the IDE and reinstalled (v 1,8,19)
and have deinstalled and reinstalled the ch340 driver
and have moved the arduino device (4duino 2.4) to different ports on the pc
and have changed the serial cable.
Yet, still I get the error - the errored port number is always one higher than the actual port to where the device is connected.
I have checked gloggle for the error and have done everything suggested (all of the above) and similarly this forum.
All other boards upload without error - uno, mega, mega esp8266, esp32, esp8266, nano, micro, yun.
And so, could I have forums thoughts please and any pointers as the 4duino site is of no help with this particular difficulty.
Many thanks
pip
I don't know why you get the access denied message.
The 4duino uses the 32U4 processor with native USB; the bootloader of the 32U4 is on a different port than the normal operating situation so a different port number during upload is normal and expected.
This "Access is denied." error happens when some other application has the port open. This is unusual in this situation where the port has only existed for some seconds during the upload process.
There have been some problems like this in the past where some device driver makes the assumption that any serial port on the computer is its device and opens the port. I think the culprit was usually for some sort of a Bluetooth device. This was even mentioned in the old official troubleshooting guide
Can you think of any application on your computer that might be misbehaving in this manner?
No. and the device is actually on port 20 and no matter which port I attach it to, Arduino IDE returns the error at one port higher than the one in use.
The Arduino IDE is getting more and more like the old plug&play (plug it in and play around for hours trying to get it to work). There seems to be no regulation of libraries / versions and the install saves bits and pieces all over the windows system and unless you have many hours spare to study the thing to degree level, you may as well pee into the wind. (excuse my French/Italian) I'm hacked-off with Arduino just now. I'll be ok tomorrow.
I'll have a cup of tea, that usually sorts these things out.