COM Port in Use

I'm trying to upload a sketch to an Arduino Mega 2560 using Marlin 1.05 and 1.06, but I keep getting "COM Port already in use. I've tried several different boards and different COM ports and get the same result.

Arduino Mega COM port issue.JPG

The only COM port that will work is the COM port that the Mega is connected to. If Mega is plugged in, that port should be identifiable in Control Panel - Device Manager, and it should be consistent whenever that Mega is used. Ensure that the same port is called in the iDE. The other thing that can prevent you uploading is where you have a serial device, like Bluetooth, connected to Mega via Serial pins 0,1, which are shared with the USB port. This is fixed by unplugging the device.

Thanks Nick,

The COM port is being identified. I plugged in one of my Arduino Mega's and it listed as COM8 in Device Manager. The other Arduino Mega I plugged in identified as COM9. When I try to upload to either one, I get the same error about the COM port already being in use.

Another application on your computer is using the serial port, exit that program or tell it to disconnect. Sometimes programs meant to work with modems assume any serial port is a modem

So I found a thread that showed how to clear up reserved COM ports and did this:

  1. Open Device Manager

  2. From the View menu, select 'Show Hidden Devices'

  3. Expand 'Ports (COM & LPT)' category from the list

  4. Right-click on all the devices and remove them (no need to tick to delete the driver)

  5. From the Action menu, select 'Scan for New Devices'

  6. Viola! All the actual devices will be re-allocated from COM1

I was able to free up a bunch of COM ports. I rebooted the PC and connected the Arduino. Now it showed up as COM5. Unfortunately I still got the same error saying the COM port is already in use.

This is more or less what I was telling you above, but I was not aware of those menu items. You can do it by expanding on the list. The same menu enables you to disable the port. You might try cycling through that. Are you quite sure you have nothing else running that might hijack the port? Task Manager might reveal something.

Some phone sync software can intercept COM ports and although a long time since I have seen it so could some security software.

Resetting the COM ports should not have been needed and COM 1 under a windows system is a defacto port held in reserve with COM 2 for windows so if all the boards are now trying to use those ports you have another problem somewhere.

When doing a full COM reset you should always disconnect things as far as is possible with the exception of the mouse and keyboard.