[NTLUG:Discuss] serial communications

Paul Ingendorf pauldy at wantek.net
Sun Nov 14 10:59:34 CST 2004


Sorry, for linux you need rxtx from http://www.rxtx.org/.  I am curently
using it on a FC3 machine and a custom app I wrote to control a radioman
am/fm radio.  I've used rxtx for interfacing with a lot of equipment and I
haven't had any issues yet.

-----Original Message-----
From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
Behalf Of Stephen Davidson
Sent: Saturday, November 13, 2004 12:22 PM
To: NTLUG Discussion List
Subject: Re: [NTLUG:Discuss] serial communications


Hi Paul.

I ran into an issue where that package did not work on Linux > 2.2 (or
maybe 2.0?).  Solved it by writing a primitive JNI wrapper for the
serial port itself (basically, made a Stream Implementation or a channel
implementation for the port - I forget now), then using straight Java
Calls on the app side.  The App thought it was talking to a Java Stream
channel.  I am willing to redo and Open Source this solution if needed.
It only took me a couple of hours to knock out the first time.  And I
probably will need it again in the future.  The old propietary code was
pre JDK 1.4 anyways, so it should have an update/overhaul if it were to
be published (which I doubt the owners would agree to).  It was also not
an implementation of the java.comm package.  Bottom line, if I did in
1.4, it would have to be a "clean implementation", so there would be no
issues with a previous work that I have done.

Regards,
Steve

Paul Ingendorf wrote:

>It can be made non blocking in java by spawning a send thread and receive
>thread and creating the appropriate event listener to handle an event
thrown
>by the receive thread to handle incoming data. You can get javax.comm from
>java.sun.com it has an example of a simpleReader/Writer in it.  With that
>you can eliminate the need for the c code and I'm sure by eliminating the
>need to multiple disciplines in what your doing it will be a little easier
>to get to where you want with it.
>
>
>
--
Java/J2EE Developer/Integrator
Stephen Davidson and Associates, Inc.
Past Chair, Dallas/FortWorth J2EE Sig
214-724-7741



_______________________________________________
https://ntlug.org/mailman/listinfo/discuss




More information about the Discuss mailing list