rxtx

RXTX serial port library on Android

泪湿孤枕 提交于 2020-01-05 04:33:08
问题 I am using the rxtx library in my Java project to read the serial data coming from my gps chip. Now, I try to port this to my android device, a rooted Galaxy Nexus with an Android 4.0.3 stock rom. I already created a project and ported my classes to an android version. It uses the rxtx library for android like this: public void init() { try { Enumeration portIdentifiers = CommPortIdentifier.getPortIdentifiers(); // / See what ports are available. and latch on desired port while

Do you know an alternative site for RXTX download?

萝らか妹 提交于 2020-01-02 06:23:46
问题 RXTX site http://rxtx.qbang.org/wiki/index.php/Download has been down for a while. Do you know an alternative site to download the latest rxtx lib for windows, linux and raspberry pi? Thanks, 回答1: Here's 2 working links : http://www.jcontrol.org/download/rxtx_en.html http://java2s.com/Code/Jar/r/Downloadrxtx22jar.htm Cheers !! 回答2: You can download binaries from the bellow link https://code.google.com/p/c328r-java/downloads/detail?name=rxtx-2.1-7-bins-r2.zip&can=2&q= 来源: https://stackoverflow

gnu.io.PortInUseException: Unknown Application?

淺唱寂寞╮ 提交于 2019-12-31 22:43:32
问题 void connect ( String portName ) throws Exception { CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); if ( portIdentifier.isCurrentlyOwned() ) { System.out.println("Error: Port is currently in use"); } else { System.out.println(portIdentifier.getCurrentOwner()); CommPort commPort = portIdentifier.open(this.getClass().getName(),2000); if ( commPort instanceof SerialPort ) { SerialPort serialPort = (SerialPort) commPort; serialPort.setSerialPortParams(115200

Handling handshake lines in RS232 DB9 using rxtxComm

≯℡__Kan透↙ 提交于 2019-12-25 08:58:30
问题 I used rxtxComm to communicate(send and receive data) with Arduino (USB-Serial port). How do i handle the handshake lines like DTR using the rxtxComm library? Can you give me some tutorial on this or some sample code??? Note: I use win7 OS. I bought a USB-Serial(DB9) adapter today(21-4-2012); planning to connect a led array directly to rs232... 回答1: I guess you have all the libraries installed. change to your port defaultPort = "COM24"; Try the standard code package serialtest; import java

Unloading dll rxtx before exit to avoid jvm crashes or hide hs_err_pid.log files

情到浓时终转凉″ 提交于 2019-12-25 05:25:12
问题 Well, I'm on a project that uses rxtxSerial.dll (very buggy by the way). Anyway, I made a modification on the GUI to make it more user-friendly, initially the program shows up the main window and it's possible to open some other frames where the user can monitor certain devices designed by the company I work for. So when the user wanted to close the hole program and any windows where openend it showed up a dialog asking for the user close the oppened windows himself and then close the program

RXTX gnu.io.PortInUseException: & WARNING: RXTX Version mismatch

妖精的绣舞 提交于 2019-12-23 21:04:31
问题 I am trying to get GPS data from a NMEA 0183 GPS via the Java Marine API, using the RXTX API. Running the Java Marine supplied SerialPortExample.java, I return the two errors. Perhaps they are related and so I am bundling them together into this question. gnu.io.PortInUseException: Unknown Application I believe this is caused by the RXTX API. A search reveals that OSX often is missing the required var/lock folder, which one would rectify by with sudo mkdir /var/lock (full details: https:/

RXTX not working in ubuntu

这一生的挚爱 提交于 2019-12-22 09:37:55
问题 Finally managed to read from rxtx in windows but now I just cannot make it work in Ubuntu.I get the rxtx libs using apt-get ,but when i run the application,i can not see anything,tried a couple of try-catch blocks and i don't even get the exceptions,and since Ubuntu based debugging is not possible for now, i can not pinpoint the problem. (Ubuntu is 12.04 64 bit). import gnu.io.*; import java.io.*; import javax.swing.JOptionPane; public class ReadComPort { public static void main(String[] s) {

Installing rxtx bundle in my Raspberry

老子叫甜甜 提交于 2019-12-20 06:15:32
问题 I want to install an rxtx bundle on my Raspberry Pi the bundle will be running on KURA platform (Equinox is the OSGi container for Kura) I installed the rxtx native library using: sudo apt-get install librxtx-java the .so was installed on the directory: /usr/lib/jni/ pi@raspberrypi /usr/lib/jni $ ls librxtxI2C-2.2pre1.so librxtxParallel.so librxtxRS485-2.2pre1.so librxtxSerial-2.2pre1.so librxtxI2C.so librxtxRaw-2.2pre1.so librxtxRS485.so librxtxSerial.so librxtxParallel-2.2pre1.so librxtxRaw

Thread interrupt not ending blocking call on input stream read

痞子三分冷 提交于 2019-12-18 21:17:27
问题 I'm using RXTX to read data from a serial port. The reading is done within a thread spawned in the following manner: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(port); CommPort comm = portIdentifier.open("Whatever", 2000); SerialPort serial = (SerialPort)comm; ...settings Thread t = new Thread(new SerialReader(serial.getInputStream())); t.start(); The SerialReader class implements Runnable and just loops indefinitely, reading from the port and constructing the

RxTx installation on windows java.lang.NoClassDefFoundError: gnu/io/CommPort

泄露秘密 提交于 2019-12-18 07:07:30
问题 I put rxtxcomm.jar into jre/lib/ext folder, but I still get NoClassDefFoundError Isn't this folder automatically taken into the global classpath? Thanks 回答1: yes it is taken automatically to classpath, but RXTXcomm uses JNI /native external libraries (.so and .dll files), you must provide the path to them when running your program in command line: java -jar yourprogram.jar -Djava.library.path="PATH_TO_EXTERNAL_LIBRARIES" for linux: suppose you unpacked the rxtx.zip to /home/user/ if you have