changed from rxtx to jd2xx

Okey dokey.

I’ve changed from rxtx to jd2xx.  rxtx didn’t support DTR/DSR flow control, which really is an absolute must for my application.  There would have to be hardware changes that I’d be unwilling to make to accomodate anything else (like RTS/CTS)

As I said in an earlier comment, jd2xx is a java wrapper for interfacing to the direct USB drivers for my USB-serial converter.  It allows (almost) native access to the bulk of the functions exported in the .DLL supplied by FTDI.  This is much more direct and native way of communicating through (and to) my USB2SER device.  The source for jd2xx is easy to read, and is pretty straight forward.  The author basically takes a C function and wraps it around a library function call in the DLL.  It uses JNI — I barely know what that is.

The good news is that the entire conversion from rxtx-ish code to jd2xx code took like 15 minutes.  A couple hours longer than that to debug and correct, but it could have been much more painful.  The AFP is now functioning with the jd2xx code.

The bad news is that I broke some parts of my application as a result.  Since I was using Virtual Com Ports (and the associated driver), I had com port selection, saving, etc implemented.  Well now there aren’t really comports.  This is good and this is bad.  This is good because people can’t make a wrong selection by picking their native serial port.  This is bad because the driver and interface is strictly limited to FTDI’s converters.  This is good because their chips are super prevalent everywhere and a LARGE number of different vendors offer FTDI based solutions.

I’ve got to decide what path I’m going to take regarding changing com port selection to USB2SER selection.  Honestly, who is going to have more than one of these on their systems?  I could potentially modify the code or scrap it altogether.  Which, speaking of, I’ll need to seriously clean up.  I’ve potentially broken linux compatibility, but I’m simply not that worried about it right now.  While it is a project goal, I really want to get something usable and workable soon.  There are too many unfinished tasks to worry about the future.  I’ve got to get stuff fairly close to basic completion.

FTDI does offer linux based D2XX drivers, and Ubuntu seems to have integrated the drivers into the OS, automatically, which is awesome.


Amateur Electronics Design Engineer and Hacker

1 comment

  • I forgot that the terminal mode still uses events from rxtx etc. So that will need converted to jd2xx as well.

    Shouldn’t be too hard provided that jd2xx supports events etc