We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › windows xp sp2 gnu.io.PortInUseExcept with arduino
Page Index Toggle Pages: 1
windows xp sp2 gnu.io.PortInUseExcept with arduino (Read 1972 times)
windows xp sp2 gnu.io.PortInUseExcept with arduino
Jan 13th, 2008, 7:56am
 
Hi,

This error has been replicated on 3 laptop pcs running windows xp sp 2.  Any help would be appreciated

Arduino is working fine with COM7 and is sending data back when checked with arduino ide.

when connected to processing 1.35 with the following program:

--------
import processing.serial.*;

String portname = "COM7"; // Change to your port
Serial port;  // Create object from Serial class

int val=100;  // Data received from the serial port, with an initial value

void setup()
{
 // Open the port the board is connected to
 port = new Serial(this, portname, 19200);
 
 colorMode(HSB, 255);
 size(400, 400);
 ellipseMode(CENTER);   // draw from center out
 noStroke();
 frameRate(30);
 smooth();
}

void draw()
{
 if (port.available() > 0) {  // If data is available,
   val = port.read();         // read it and store it in val
 }
 background(99);
 // Draw the shape
 fill(val,255,255);  // we're in HSB mode, so first value is color
 ellipse(width/2, height/2, 250,250);
}

--------

The following error is produced:

Stable Library

=========================================

Native lib Version = RXTX-2.1-7

Java lib Version   = RXTX-2.1-7


gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)

or a more verbose version of this error is produced:

gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
java.lang.RuntimeException: Error inside Serial.<init>()
at processing.serial.Serial.errorMessage(Serial.java:583)
at processing.serial.Serial.<init>(Serial.java:148)
at processing.serial.Serial.<init>(Serial.java:102)
at Temporary_6315_8225.setup(Temporary_6315_8225.java:20)
at processing.core.PApplet.handleDisplay(PApplet.java:1390)
at processing.core.PGraphics.requestDisplay(PGraphics.java:690)
at processing.core.PApplet.run(PApplet.java:1562)
at java.lang.Thread.run(Unknown Source)

----------------------------

same exact program works fine on apple computers when correct com port info is inserted.  HELP!!!

Thanks in advance.  

Sincerely,

John
Re: windows xp sp2 gnu.io.PortInUseExcept with ard
Reply #1 - Mar 3rd, 2008, 2:49pm
 
Which ARDUINO version are u using? (BT, USB, SERIAL?)

If you are using a ARDUINOBT, u may be experiencing the same problem as me.
I have the same error message as you, and the guys in ARDUINO forum told me that the problem was probably in the way I was pairing the ARDUINO (I was using a TOSHIBA MANAGER, that I thing is the one that usually comes with windows XP SP2 notebooks). I still couldn't find how to solve it, as I have little notion of BLUETOOTH, and I dont know how I could pair it without using that manager in windows XP. (Anyone here knows, or have any idea how could I fix it?)

If you are not using the BT version, I've seen also in the ARDUINO forum that you should verify if there isn't any program in your computer that scans all serial ports, like PDA sync applications, Bluetooth-USB drivers, virtual daemon tools, etc.

If it still couldn't help, try visiting the ARDUINO troubleshooting page:
http://www.arduino.cc/en/Guide/Troubleshooting#toc2

If u solve your problem, please let us know.. =)
Page Index Toggle Pages: 1