Uploading Issue For Arduino 2560

I tried a sample code to test my board before use everytime,
this time this error appeared:
Sketch uses 1536 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can't open device "\.\COM6": Access is denied.

avrdude: ser_drain(): read error: The handle is invalid.

avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
does not exist or your board is not connected

I have researched online and found that I can download a driver CHE341 to help (It already downloaded), I can change the cable (which I did and did nothing), I can connect a power source aside from the programming cable (and did nothing) i know my board is not fried because the lights are on.. Dont know what to do anymore. Please HELP

The "Access is denied" error happens when the port is open in another application.

Make sure you have selected the port of your Arduino board from the Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don't know which port is your Arduino board, you can find it like this:

  1. Unplug your Arduino board from the computer.
  2. Select Tools > Port from the Arduino IDE's menus.
  3. Note the ports, if any, listed in the menu.
  4. Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Plug your Arduino board into the computer.
  6. Select Tools > Port from the Arduino IDE's menus. The new port listed in the menu is your Arduino board.

Make sure you don't have any other applications running that might have the port open. Only one application can have a serial port open at a time. That can even include having it open in a different Arduino IDE window.

Try restarting your computer. Sometimes a glitch causes the port to get stuck open and restarting fixes that.

Lights being on only means that they are getting power. There are plenty of ways a board could be "fried" with lights still on.

Wouldn't that usually result in a "port busy" message?

It can also be something on your system (e.g. antivirus) that blocks access; or permissions. For the AV, you can try to temporarily disable it.

Other check to do is to check what happens in Windows device manager. COM6 might not be your Arduino. Does the COM6 disappear from the IDE (tools->ports) and Windows device manager (Ports (COM & LPT) if you disconnect it?

I think there might be different error messages, perhaps depending on which board and/or OS you are using. However, this is definitely one. You can check for yourself:

  1. Start the Arduino IDE
  2. Select a port from the Tools > Port menu.
  3. Open Serial Monitor
    The current instance of the Arduino IDE now has the port open, which will deny any other access to the port until it has been closed by that instance of the IDE.
  4. Start the Arduino IDE
    This opens a separate instance from the first one that has control of the port.
  5. Select the same port from the Tools > Port menu.
  6. Attempt an upload

When I do this with an Arduino Mega, I get this:

Arduino: 1.8.16 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 662 bytes (0%) of program storage space. Maximum is 253952 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.

An error occurred while uploading the sketch

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




avrdude: ser_drain(): read error: The handle is invalid.




avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: The handle is invalid.




avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer



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

Does it look familiar?

Yes, should have checked it myself :frowning: Just tried it with a Nano with CH340.