Aspire :: OSGi Bundles :: RXTX



Goal

This bundle packages the java classes and shared libraries (.so, .dll) of the RXTX project. The RXTX project enables to send and to receive data to/from serial or parallel devices (RFID readers, smartcards readers, modems, gsm, nmea0183 gps, onewire adapter, bluetooth serial port, PIC/AVR boards like Arduino ...).

The artifact is org.ow2.aspirerfid:rxtx

RXTX Command

This command for the Felix shell enables to to send and to receive data to/from serial or parallel devices for:
  • debugging programs using gnu.io
  • dumping serial port (raw or formatted) output (GPS, RFID reader, ...)
The options are:
rxtx list                  : list the available ports
rxtx open <portname> <baudrate> <flowctrlin> <flowctrlout> <databits> <stopbits> <parity>
                               flowctrl=None,Xon/XoffOut,Xon/XoffIn,RTS/CTSIn,RTS/CTSOut
                               databits=5,6,7,8
                               stopbits=1,1.5,2
                               parity=None,Odd,Even
                           : open a serial port
rxtx close                 : close the current opened port
rxtx send <bytes in hexa>  : send message bytes
rxtx binary                : switch IO in hex
rxtx ascii                 : switch IO in ascii
rxtx buffersize <size>     : set IO buffer size
rxtx sendurl <url>         : send bytes contained at the url
rxtx logfile <filepath>    : log received bytes in the file
rxtx iowrapper <classname> : set a wrapper for IO parsing and printing. The class could be exported by a external bundle
rxtx help                  : display this help

The option iowrapper loads a java class implementing the interface IOWrapper in order

  • to encode the messages sent to the port
  • to format the message received from the port
Examples

Sample usage

RXTX 2.2-pre

A pre-release if 2.2 version is available at : RXTX Download page. It seems to correct some incapacitating bugs on Linux 2.6 kernels.

Build the bundle

  1. Download the latest RXTX 2.2 binary version : RXTX Download page.
  2. Extract all Windows, Linux and Mac OS files and place them according to the existing folder structure in the bundle ./src/main/resources folder.
  3. An extra file may be needed for the i386 version : rxtxParallel.dll. It can be found in the latest RXTX 2.1 binary release.
  4. Build and install with Maven.