FAQ

From Rxtx

Revision as of 14:29, 11 July 2007 by DavidSchmidt (Talk | contribs)
Jump to: navigation, search

Contents

General

What is this?

A place to put frequently asked questions.

Where can I find information about how to write apps using RXTX?

Take a look at the Examples

What does RXTX install where?

The RXTX installation procedures installs files directly underneath $JAVA_HOME, i.e. directly into the JDK distribution.

In case you are using the Sun JDK:

The 'gnu.io' Java .class files are all packed into:

  $JAVA_HOME/jre/lib/ext/RXTXcomm.jar

The Shared Object files necessary to access OS-level functionality can be found underneath:

  $JAVA_HOME/jre/lib/<architecture>/

and they are:

 librxtxI2C-2.1-7.so
 librxtxI2C.la
 librxtxI2C.so -> librxtxI2C-2.1-7.so
 librxtxParallel-2.1-7.so
 librxtxParallel.la
 librxtxParallel.so -> librxtxParallel-2.1-7.so
 librxtxRaw-2.1-7.so
 librxtxRaw.la
 librxtxRaw.so -> librxtxRaw-2.1-7.so
 librxtxRS485-2.1-7.so
 librxtxRS485.la
 librxtxRS485.so -> librxtxRS485-2.1-7.so
 librxtxSerial-2.1-7.so
 librxtxSerial.la
 librxtxSerial.so -> librxtxSerial-2.1-7.so

Problems and Workarounds

On MacOS X I get a 'PortInUseException', even though it isn't?

Versions prior to 2.1-8 use lock files, which is not the MacOS X way of doing things, and therefore has issues. For this reason make sure that you have version 2.1-8 or higher, which makes use of I/O Kit. At this point in time 2.1-8 is only availble from CVS, in source form. See the section Retrieving Source Code, on getting the latest code - be sure to get the code from the 'gnu.io' branch.

'TODO': Can anyone who knows how please make an easy download available like the 2.1-7 version?

RXTX does not find my device, what's wrong?

There may be a number of reasons, but most often it is because your operating system can't find it either. RXTX is built upon the functionality provided by your operating system, and therefore is dependent on its limitations. For this reason find out whether your system can find the port, if it can and you still can't work what is going on, then there may be some help on the RXTX mailing-list.

RXTX installation fails with JDK 1.6

This applies to the source package of RXTX 2.1-7r2.

After having run ./configure; make; make install, the following message appears:

 make  all-am
 make[1]: Entering directory `/<mumble mumble your directory>/rxtx-2.1-7r2'
 make[1]: Nothing to be done for `all-am'.
 make[1]: Leaving directory `/<mumble mumble your directory>/rxtx-2.1-7r2'
 libtool: install: `x86_64-unknown-linux-gnu/librxtxRS485.la' is not a directory
 Try `libtool --help --mode=install' for more information.
 make: *** [install] Error 1

This is caused by a missing case in the 'configure' script generated from 'configure.in', which causes the variable RXTX_PATH to not be set which causes the above confusion. You can change the 'configure' script directly. Look for the case instruction that matches JDK version strings:

 1.2*|1.3*|1.4*|1.5*

and extend it to

 1.2*|1.3*|1.4*|1.5*|1.6*

Note that there are matches for Linux, BSD, Solaris and Win32.

Then run ./configure; make; make install as usual.

RXTX and the Equinox SST-4P/LP multiport card

A note for those who want to install an Equinox board (in this case "SST-4P/LP") and try to run it with RXTX under Linux (in this case, Red Hat ES 4)

Get the driver source from the www.equinox.com driver page and compile it as described therein.

The four serial ports of the Equinox SST-4P are available as the device files:

  /dev/ttyQ1a1 ... /dev/ttyQ1a4

These device files are created by the 'ssmkn' (alias 'make device nodes') executable.

In order to make things work, you have to:

Modify the 'eqnx' startup script '/etc/rc.d/init.d/eqnx' and make it set the permissions of the devices files in the 'start' section, immediately after the call to 'ssmkn':

       # create device files
       /usr/bin/ssmkn
       # fix rights on device files
       LIST=`ls /dev/ttyQ*`
       for DEV in $LIST; do
         chown root.uucp $DEV
         chmod 660 $DEV
       done

Modify 'src/RXTXCommDriver.java' in the RXTX distribution. Add the 'ttyQ1a' radical to the list of port radicals that RXTX checks:

       if(osName.equals("Linux"))
       {
          String[] Temp = {
               "ttyS", // linux Serial Ports
               "ttySA", // for the IPAQs
               "ttyUSB", // for USB frobs
               "ttyQ1a" // Equinox
          };
          CandidatePortPrefixes=Temp;
       }

Then recompile and reinstall.

Personal tools