Pages: [1]   Go Down
Author Topic: Getting an error - Serial port COM3 already in use  (Read 4687 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm new to this and was testing a few sketches. Things were working fine and my sketches included serial communications. I tried to upload a new one and the software froze up.   When I try to upload sketches now, the software freezes up or I get the following message in the serial monitor:

processing.app.SerialException: Serial port 'COM3' already in use.  Try quiting any programs that may be using it.

I tried rebooting, and pressing the reset button (on my Duemilanove). I also went to device manager and uninstalled and reinstalled the arduino but I have had no luck.  Help!

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm having the same problem on "port in use" but my program didn't freeze.  The only way to get uploading up again is by disabling the serial port, reboot, and enable the port again.

I realized that this problem occurred when I pull out the usb cable and plug it back again.

The following is what I copied from the output.  Hope someone can help:

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Binary sketch size: 2930 bytes (of a 14336 byte maximum)
Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(860): Access is den
ied.


processing.app.SerialException: Serial port 'COM13' already in use.  Try quiting
 any programs that may be using it.
        at processing.app.Serial.<init>(Serial.java:140)
        at processing.app.Serial.<init>(Serial.java:72)
        at processing.app.Uploader.flushSerialBuffer(Uploader.java:66)
        at processing.app.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.ja
va:73)
        at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader
.java:48)
        at processing.app.Sketch.upload(Sketch.java:1632)
        at processing.app.Sketch.exportApplet(Sketch.java:1701)
        at processing.app.Editor$41.run(Editor.java:2004)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)


« Last Edit: March 03, 2009, 11:06:26 am by wongster » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I realised one thing while trying to figure out the port already in use problem.  After getting it to work following the cumbersome way of disabling, rebooting and enabling the serial port, I realised that it may be the ide refusing to release it hold on the port (pardon me if I am technically incorrect with terms and jargons here).

When I quite the IDE and started it again, the uploading works ok.  Once I plugged out the USB cable and plug it back again, the problem starts.  This occurs regardless of whether I unplug the usb cable with IDE running or after I shutdown the IDE.

So it seems to me that the device still hanging on to the serial port is the IDE than any other program.

Anyone has any solution or things I can try with?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found out my problem, I had a wire connected to the serial in (RX) that was sending data while I uploaded the sketch.  This seemed to cause the problem since when I stopped the serial data transfer during the upload process and waited to start the data transfer after it worked fine
Logged

Pages: [1]   Go Up
Jump to: