[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rxtx
Subject:    Re: [Rxtx] Rxtx Digest, Vol 40, Issue 6
From:       Jason Sachs <jmsachs () gmail ! com>
Date:       2010-12-07 20:39:40
Message-ID: AANLkTinNZ3q2SxPu=0BFE1qUfMKDG4KaT41QkaeY3-0e () mail ! gmail ! com
[Download RAW message or body]

> Message: 2
> Date: Tue, 7 Dec 2010 07:00:14 +0100
> From: "M.Dec-GM" <mariusz.dec@gmail.com>
> To: <rxtx@qbang.org>
> Subject: Re: [Rxtx] rxtx hang on RIM virtual serial port
> Message-ID: <74A73AEF87F04CCC8253D7FDE4EA7A35@mdam3>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>        reply-type=original
>
> Hi,
> Me and friends here have several times discussed about closing port in RXTX
> and recovering connection.
> I have published several times example which shows way to recovery
> connection.
> It works with 2.2 pre and have helped several times.
> Look for this and try, especially in simple back-loop connection.
> It should show proper (or not) work of the drivers.
> Generally - change RXTX to 2.2 pre.
> Regards
> Mariusz

Please note that Mariusz's solution -- which essentially amounts to
careful supervision of the RXTX input/output streams, e.g. closing the
streams when a disconnect is detected, and no further reading/writing
to the streams once a disconnect is detected -- may help but is not
guaranteed to work, and is likely to fail at high data rates.

There is a small but finite probability of the serial port
disappearing (=disconnection for USB) while the RXTX library itself is
in the middle of a write() call, and you can get a JVM crash this way.

About a month ago I had developed a test harness for investigating
this issue, to see under which conditions but had to abandon work on
it due to an extended vacation + other time commitments (e.g. my real
job). If I have time within the next few weeks I'll post my code.

I would just request that if people are interested in solving the RXTX
USB disconnect issue, that you put your efforts towards fixing the
problem (preventing JVM crashes + printf() calls, and instead passing
exceptions to Java) and producing precompiled binaries for the major
platforms.

--Jason
_______________________________________________
Rxtx mailing list
Rxtx@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic