[Rxtx] Problem on Mac OS X
Colin Canfield
colin at exsoft.com.au
Wed Mar 8 16:10:46 MST 2006
Michael,
The port in use exception comes because of the lock directory. The old RXTX
version used the /var/spool/uucp directory for the lock files,where the new
library uses /var/lock. You need to create the directory, make sure you are in
group uucp and it has group write permissions.
For some strange reason you also need to delete any left over lock files in
the previous /var/spool/uucp directory, perhaps something in the code is not
paying attention to the #define?
Colin
--
Colin Canfield
Business Analyst
Explorative Software Pty Ltd
0412 197 943
colin at exsoft.com.au
---------- Original Message -----------
From: Trent Jarvi <tjarvi at qbang.org>
To: RXTX Developers and Users <rxtx at qbang.org>
Sent: Wed, 8 Mar 2006 11:18:34 -0700 (MST)
Subject: Re: [Rxtx] Problem on Mac OS X
> On Wed, 8 Mar 2006, Michael Rice wrote:
>
> > I'm trying to port an application that uses the javax.comm package to OS X
> > 10.4.5. I'm using a Keyspan USA-19HS USB->Serial adapter, Java 1.4.2_09, and
> > RXTX 2.1-7r2. I always get a PortInUseException when I call
> > CommPortIdentifier.open(); the exception message is "Unknown Application".
> > The Keyspan diags say the port is OK and available.
> >
> > I am able to enumerate the ports using
> > CommPortIdentifier.getPortIdentifiers(). The port names I get are:
> > /dev/cu.KeySerial1
> > /dev/tty.KeySerail1
> >
>
> The "Unknown Application" must be the locking code failing. The
> intent is so say which application has the port locked but the code
> is a stub for that. Did you make sure you setup the lockfiles?
> Also some have noted when you add a user to group lock, it does not
> work until they rebooted. I assume thats something to do with
> security on the Mac like SELinux on Linux.
>
> You will get the "Unknown Application" when there is a lockfile
> already there that cannot be removed due to permissions or perhaps
> some other program is still using the port (maybe even your Keyspan
> diags).
>
> Perhaps you jumped to and from privileged user status and a lockfile
> remains?
>
> --
> Trent Jarvi
> tjarvi at qbang.org
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
------- End of Original Message -------
More information about the Rxtx
mailing list