[kaffe] Using RXTX with kaffe to manipulate serial ports

Trent Jarvi taj@www.linux.org.uk
Tue Mar 16 13:39:02 2004


On Tue, 16 Mar 2004, Dalibor Topic wrote:

> Hi Marcos, Hello Trent,
>=20
> Marcos Lois Berm=FAdez wrote:
> > Hello, kaffe is great, i want to contribute to get kaffe working.
>=20
> Thanks!
>=20
> > I test it with SWT and work great, :), my problem is now RXTX lib, I=20
> > want migrate some Win32 terminals, to Linux, they are embedded system=
=20
> > based on ia32.
>=20
> I always wanted to merge RXTX in, since it is a very nice library, and=20
> may make sense to have in the embedded linux context as well. I'd like=20
> to have it as an implementation of javax.comm apis. I've worked with=20
> Trent Jarvi (CC:ed) briefly on it, but didn't have enought time to=20
> complete it [1], so it ended up on the big pile of things I wanted to do=
=20
> one fine day, given enough time.
>=20
> My old archive is at=20
> http://www.kaffe.org/~robilad/kaffe-1.1.x-cvs-comm.tar.gz and it hasn't=
=20
> been updated in the last 9 months :(
>=20
> Now that Trent is part of the ClasspathX project, and RXTX is going to=20
> be contributed to Classpath, I hope we'll get rxtx running on kaffe.
>=20
> > I get some troubles to get RXTX working under kaffe, it's essential for=
=20
> > me, becouse i have some serial devices connected to other interfaces. I=
=20
> > test the RXTX 2.1-6 in Sun JDK and work good, but in kaffe i get some=
=20
> > extrange beaibor.
>=20
> 2.1-7 seems to be the latest stuff. I can try to merge that in, and then=
=20
> we may be able to debug that together, if you're interested.
>=20
> cheers,
> dalibor topic
>=20
> [1] Which means I went silent, since I was busy with somethig else.=20
> Sorry about that, Trent.
>=20


The classpathx project is also merging rxtx.  Somehow we will get rxtx=20
into kaffe :)

What the classpathx project is doing is writing the wrapper classes like=20
kaffe has so rxtx is in javax.comm.    RXTX 2.0 will drop in under those=20
classes.  So It should be possible to do the same in kaffe or just use the=
=20
classpathx project.  Either direction would work for me.

I suspect there is a problem in rxtx that will need attention.  I stored=20
pointers to java variables and methods in rxtx.  Some jvm's have no=20
problem with this.  But others (notably the bsd jre) blow up.  So I=20
suspect the native code will have to be reworked to get around this.

I have a patch that does ~1/2 of the changes.  I'd be happy to share it. =
=20
I'm not sure when I'll be able to finish it myself.

--=20
Trent Jarvi
taj@www.linux.org.uk