R: [Rxtx] Pulling out USB Devices

Christopher Dawes christopher.Dawes at ants.me.uk
Sun May 15 05:06:09 MDT 2005


Trent Jarvi <taj at www.linux.org.uk>
Sent by: rxtx-bounces at mail.linuxgrrls.org
15/05/2005 01:47 CETPlease respond toJava RXTX discussion 

 To   Java RXTX discussion <rxtx at mail.linuxgrrls.org>
 cc   
 bcc   
 Subject   Re: [Rxtx] Pulling out USB Devices [Virus Checked]
  



On Sun, 15 May 2005, Botond Kardos wrote:

>     Hi,
>     which version do you use? In the latest releases (2-0-7-pre1 and
> above I think) the IOLock handling in RXTXPort.java is broken. The
> nativeAvailable(...) routine will throw an exception when you pull out
> the device and the read routines will exit with IOLock asserted.
> Subsequent read attempts will further increase the value of IOLock.
And
> the close(...) routine will simply fail because IOLock is positive. If
> you catch those exceptions in the read routines and reset IOLock to 0
> before throwing the same exception again the close(...) routine will
> work just fine.
>     Your debug messages are unfamiliar to me but maybe I gave a clue.
>     Cheers,
>     Botond


The debug messages are specific to the w32 termios implementation in
rxtx.

I see you used evolution which is not a w32 email program...

--

Trent Jarvi
taj at www.linux.org.uk
_______________________________________________
Rxtx mailing list
Rxtx at mail.linuxgrrls.org
http://mail.linuxgrrls.org/mailman/listinfo/rxtx


Hello, thanks for your support with this, currently i have a monitor
thread which scans to see if the device has arrived however when
disconnects i use IOExceptions to detect this then close the port. The
exception is thrown so i terminate processing and hand control back to
the monitor routine which proceeds to close the port as the device may
be serial or i may have a bug in my code so the system is told to
restart itself.  

When i call close the system has the behaviour previously described
however I'm afraid i wasn't very clear; it never exits the close()
function so i'm not at all concerned about the messages being displayed
it's that the close() funtion never returns control. I'm hoping to
recompile th rxtx-2.1-7pre17 sources with debug switched on and then run
against those to see if i can get some more information out however at
the moment it loops around these lines:


> GetCommMOdemStatus failed!
> Error 0x5 at /home/bob/rxtx-devel/src/termios.c(488): Access is denied.
> 
> 
> Error 0x5 at /home/bob/rxtx-devel/src/termios.c(488): Access is denied.
> 
> 
> Error 0x5 at /home/bob/rxtx-devel/src/termios.c(488): Access is denied.


Thanks

Christopher

-------------------------------------------
Consultant Engineer
Retail Logic Limited
Fleet
GU51 3TZ
Tel: +44 (0)1252 644377
Mob: +44 (0)7967 598625
Fax: +44 (0)1252 776708






More information about the Rxtx mailing list