[Solved ] 'Serial Port COMX already in Use'. Experts?

*EDIT: The issue seems to be caused by a driver patch from FTDI, this thread details a solution: see Indyaner's post
*
*

Hello,

I'm on 64 bit Windows 7, with an ATmega328 Nano. When I try to upload I get the following error message:

"Serial port COM1 already in use. Try quitting any programs that may be using it"

With the stack trace:

Binary sketch size: 444 bytes (of a 30,720 byte maximum)
Estimated used SRAM memory: 9 bytes (of a 2048 byte maximum)
processing.app.SerialException: Serial port 'COM1' already in use. Try quiting any programs that may be using it.
at processing.app.Serial.(Serial.java:171)
at processing.app.Serial.(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:179)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:71)
at processing.app.Sketch.upload(Sketch.java:1716)
at processing.app.Sketch.exportApplet(Sketch.java:1628)
at processing.app.Sketch.exportApplet(Sketch.java:1600)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2471)
at java.lang.Thread.run(Unknown Source)
processing.app.debug.RunnerException: Serial port 'COM1' already in use. Try quiting any programs that may be using it.
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:101)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:179)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:71)
at processing.app.Sketch.upload(Sketch.java:1716)
at processing.app.Sketch.exportApplet(Sketch.java:1628)
at processing.app.Sketch.exportApplet(Sketch.java:1600)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2471)
at java.lang.Thread.run(Unknown Source)

Things I've checked and tried :

  • Made sure the COM port in Arduino IDE actually matches that in device manager

  • Switching to different USB ports, and assigning the Nano to different COM ports in the driver settings

  • Updated to latest FTDI drivers, which are listed in the driver installation tool as "USB Serial Port Version: 2.12.0 [8/26/2014]". Past versions of the drivers didn't work either

  • Checked for hidden COM ports in device manager

  • Uploading with Arduino Enhanced Release, ver. 1.0.5

  • Restarting computer N number of times...

With the FTDI drivers, the Nano shows up as 'USB Serial Port', without drivers it shows up as 'F232R USB UART'. I've tried playing with the driver settings, such as flow control or baud rate but that doesn't seem to make a difference. I thought maybe I had some software that was scanning the COM ports, but not quite sure how to check this (I tried killing all of the non-system processes but that didn't do anything).

I've been trying to debug this for the last two days, any suggestions are really appreciated!!

EDIT: OH, I almost forgot to mention that I successfully programmed the Nano once, the very first time it was plugged in. I remember the drivers automatically installed as the FTDI driver I mentioned above, but after I unplugged it the issue began.

HI, do you have anything else plugged into USB that could be using COM1, looks like you have not got driver loaded for the Arduino USB.

Tom..... :slight_smile:

I'm not sure, since the Arduino documentation here (http://arduino.cc/en/guide/windows#toc4) says "USB Serial Port" is what the Nano is supposed to show up as in device manager.

Installing drivers for the Arduino Duemilanove, Nano, or Diecimila with Windows7, Vista, or XP:

When asked Can Windows connect to Windows Update to search for software? select No, not this time. Click next.
Select Install from a list or specified location (Advanced) and click next.
Make sure that Search for the best driver in these locations is checked; uncheck Search removable media; check Include this location in the search and browse to the drivers/FTDI USB Drivers directory of the Arduino distribution. (The latest version of the drivers can be found on the FTDI website.) Click next.
The wizard will search for the driver and then tell you that a "USB Serial Converter" was found. Click finish.
The new hardware wizard will appear again. Go through the same steps and select the same options and location to search. This time, a "USB Serial Port" will be found.

You can check that the drivers have been installed by opening the Windows Device Mananger (in the Hardware tab of System control panel). Look for a "USB Serial Port" in the Ports section; that's the Arduino board.

It looks like the Uno, and Mega 2560 will show up in device manager with their names, but not other devices :confused: I don't have any other peripherals or USB devices plugged in.

Although, when I don't select the FTDI drivers manually the "Search for best driver in these locations" tool says that no drivers were found, even when I select the Arduino drivers folder as the location to search. Should I get screenshots of the driver wizard, and exact drivers that were selected?

After browsing recent threads it looks like the issue might stem from a counterfeit FTDI chip (I am using a Tinkervault Nano clone).

I'll poke around more for a solution later tonight, it looks like some people in this thread (Unable to get FT232R drivers loaded under Windows 7 64bit - Installation & Troubleshooting - Arduino Forum) had similar issues

Go into the properties of COM1 in Device Manager and under Advanced you can change the port. Try COM2 and see if that helps.

I once had an issue where a "Ballpoint Serial Mouse" hijacked a COM port which I was using with an FTDI USB Arduino. I recall reading some web threads about how under certain circumstances Windows 7 thinks the FTDI is a Ballpoint Serial Mouse and installs the driver and that results in the same error message you see.

Check in Device Manager, View, Show Hidden Devices, Mice and other pointing devices. If you see Microsoft Serial Ballpoint Mouse connected disable the driver.

I think this is the same as the following Registry change which I made to disable the driver

Open Regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SerMouse, and change the value "Start" from 3 to 4. Reboot."

Go into the properties of COM1 in Device Manager and under Advanced you can change the port. Try COM2 and see if that helps.

I did try that on COM ports 1-8 with no luck. Thanks for the suggestion though.

I once had an issue where a "Ballpoint Serial Mouse" hijacked a COM port which I was using with an FTDI USB Arduino. I recall reading some web threads about how under certain circumstances Windows 7 thinks the FTDI is a Ballpoint Serial Mouse and installs the driver and that results in the same error message you see.

Check in Device Manager, View, Show Hidden Devices, Mice and other pointing devices. If you see Microsoft Serial Ballpoint Mouse connected disable the driver.

I think this is the same as the following Registry change which I made to disable the driver

Open Regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SerMouse, and change the value "Start" from 3 to 4. Reboot."

Wow, that's pretty weird! I checked the 'Hidden Devices', disabled everything except the Nano with no success. I'm not at home right now so I can't try it, but I'm 80% sure it's the FTDI counterfeit issue that I described above. I'll be home in a couple hours so I'll be able to give an update soon. Thanks for the suggestion.