[Rxtx] USB using RXTX

Trent Jarvi tjarvi at qbang.org
Tue May 1 19:09:24 MDT 2007


On Tue, 1 May 2007, Tommy Schell wrote:

> Hi,
>
> Am I correct in assuming that RXTX can be used to
> communicate with a standard USB device that follows
> one of the USB device class specifications?
>
>
> In my case I want to send commands back and forth to
> a device which (I believe) will follow the USB communication
> class specs, appearing as a modem on the USB port.
>
> Basically I want to be able to update the firmware on the device,
> by sending various control commands and chunks of data to the
> device and then get appropriate responses, over USB.
>
>
> Is this possible with RXTX on the mac and pc?
> From perusing the archives this appears to be the case, but I'm not
> sure.
>
> As far as I know the low level drivers already exist on the mac
> and pc for USB communication class devices, it is just
> a matter of accessing them from user space (with java preferably),
> which RXTX appears
> to be able to do.
> Can the dll and jnilib associated with RXTX talk
> to specified pre-existing USB low level drivers?
>
>
> Also I'm not clear about the documentation for the java classes
> in RXTX.  I noticed in an archive email that the Java commAPI
> JavaDocs is what is recommended?
>
> And is it a bad idea to install RXTX on a pc that already has
> javax.comm?
> I think I saw this mentioned in the archives.
>
> And then this is probably asking too much but is there any
> sample code out there for communicating with a USB device with RXTX?
>
>

Hi Tommy

rxtx is looking for traditional serial ports.   Some USB devices have 
kernel drivers that allow them to appear as a serial port.  If you want to 
talk USB you should investigate JSR80.  That can communicate at lower 
levels.

The Sun javax.com version 2 will work with rxtx 2.0 but thats more of an 
exercise than anything now.  RXTX 2.1 and Sun CommAPI 3.0 are no longer 
synergistic and are in different namespaces.  rxtx continues to follow the 
Sun CommAPI 2 javadocs with few and documented [in the source] exceptions.
  There are examples in the contrib directory but it sounds like you may be 
looking for the functionality of JSR80 which does have a reference 
implementation on Linux and possibly other systems now.

--
Trent Jarvi
tjarvi at qbang.org



More information about the Rxtx mailing list