Содержание

RXTXcomm

Downloading

Official site download page http://rxtx.qbang.org/wiki/index.php/Download.
At the moment RXTX 2.1 is the main development branch for RXTX.

Installing on Ubuntu 10.04 (x86)

Copy libraries to your java dir from binary pack (rxtx-2.1-7-bins-r2.zip):

sudo cp rxtx-2.1-7-bins-r2/Linux/i686-unknown-linux-gnu/*.* /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386
sudo cp rxtx-2.1-7-bins-r2/RXTXcomm.jar /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/ext

Adding support for MOXA on Linux

  1. Download sources pack (rxtx-2.1-7r2.zip) and unpack it somewhere
  2. Open and add changes to the rxtx-2.1-7r2/src/RXTXCommDriver.java
            private void registerScannedPorts(int PortType)
            {
            ...
                                            if(osName.equals("Linux"))
                                            {
                                                    String[] Temp = {
                                                    "ttyS", // linux Serial Ports
                                                    "ttyMI", // linux MOXA Serial Ports  - ADD THIS LINE!
                                                    "ttySA", // for the IPAQs
                                                    "ttyUSB" // for USB frobs
                                                    };
                                                    CandidatePortPrefixes=Temp;
                                            }
            ...
            }
  3. compile sources
      sh ./configure 
      make
  4. copy RXTXcomm.jar to your java place:
      sudo cp rxtx-2.1-7r2/RXTXcomm.jar /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/ext
  5. Look into INSTALL manual, section «Q. How does rxtx detect ports? Can I override it?» for more information.