Questions tagged [rxtx]

RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK).

RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the GNU LGPL license. It is based on the specification for Sun's Java Communications API, though while many of the class descriptions are the same the package used it not, since gnu.io is used instead. A certain amount of compatibility is intended with API, though this project should be considered as a fork and therefore compatible in spirit, but not in implementation.

387 questions
0
votes
0 answers

Reading from serial port stops keyboard and mouse responding

I have written Java code to read sensor data sent from an Arduino to a Mac using USB. I'm using the RXTX library version 2.1.7. Code is: CommPortIdentifier portId = getPortId(); logger.info(PORT_NAME + " has ID " + portId); try { …
Bailz
  • 605
  • 2
  • 8
  • 17
0
votes
0 answers

Connect to serial port in Java using RXTX

I'm using Eclipse to communicate with Arduino, through the Arduino platform. I can open a port using Eclipse or Arduino, but I can't connect to an opened port using Eclipse. I would like to send integers using Eclipse through the Arduino platform,…
Eadgyo
  • 1
  • 1
  • 2
0
votes
1 answer

Synchronizing methods in RXTX

Situation: I'm trying to make the incoming data from SerialPort usefull for my purposes. In one class Processor.java I've implemented several methods - one of them (serialEvent) implements gnu.io.SerialPortEventListener. It stores the information…
Rubid
  • 59
  • 1
  • 1
  • 5
0
votes
1 answer

Strange behaviour with serial connection sending byte[]

I'm using the following code to try and send a byte array to my arduino but I'm getting strange results. Can anyone see what the issue is? I'm trying to make it so that the Arduino will print out the bitstring sent via serial. Debug output below …
LiamRyan
  • 1,892
  • 4
  • 32
  • 61
0
votes
0 answers

Ubuntu Java Failing to identify COM ports

private static void initProgram() { System.out.println("fdsf"); //Must start by setting up the COM port to identify where the arduino is. portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { …
0
votes
1 answer

RXTXComm. Not correct Eclipse behaviour during read from stream []byte

I' creating application that reads/writes to/from com port using RXTXComm library. When I'm trying to read one byte from stream everything goes fine. while ( ( data = in.read() ) > -1 ) Then I tried to read []byte and put breakpoint to this…
vico
  • 17,051
  • 45
  • 159
  • 315
0
votes
2 answers

RXTX with Netty-4.0.0-Beta1-SNAPSHOT

I'm having a hard time figuring out how to properly use the RXTX transport (from Git as of today). I'm able to write inbound handlers which consumes content read from the serial port, decode it, and send some other content to the serial port via a…
jeje
  • 61
  • 4
0
votes
1 answer

RXTX receive error

I'm using RXTX-2.1-7 and am trying to read a COM port in Windows. I see some inconsistencies in the received data compared to the data received by using PuTTY. The data received in PuTTY: a5 5a 0b 05 10 00 00 00 00 27 d4 73 30 ae But the exact…
dhas
  • 81
  • 1
  • 4
0
votes
5 answers

Difference between char (int) and int

I have a piece of code, that receives values from a sensor (Via serialport using rxtx) and displays it. Strangely, the following code int value = in.read(); System.out.print((char) value); Outputs the desired value as: RXTX Warning: Removing stale…
Spaniard89
  • 2,359
  • 4
  • 34
  • 55
0
votes
1 answer

Detect USB CDC device connection/disconnection using Java and RXTX

I have an application that can run either with or without a USB CDC device attached to the machine. This device is programmed to respond to a question with a specific answer so I can detect which serial port is is connected to. The thing is, I need…
0
votes
1 answer

In mac os, use rxtx with an error of java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at…
Keqin Dou
  • 23
  • 7
0
votes
2 answers

Receiving data of RS-232C device using java

I have recently purchased a USB Bar code scanner. It has 3 different interface selection options: RS-232C USB Wand Emulation The requirement is only to receive the scanned bar-code using RS-232C interface with the help of Java (Rxtx API). So as…
Deepak
  • 335
  • 1
  • 7
  • 21
0
votes
0 answers

opening serial port in java on virtual box returns error

I'm using Ubuntu 12.04 on virtual box and tried to do serial communication first with javax.comm and rxtx. In both approaches getPortIdentifiers().toString() just returns "gnu.io.CommPortEnumerator@20d10a" and no actual list of the available…
PogoMips
  • 3,497
  • 8
  • 27
  • 34
0
votes
1 answer

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

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…
HericDenis
  • 1,364
  • 12
  • 28
0
votes
0 answers

How to get a current port no. in which my device is connected...?

I am trying to develop a application in java (Swing) in which I have to get and store that event coming from device in database. I used RXTX to find all port which is in use but I want only that port in which my device is connected . I used a…
Kumar Gaurav
  • 193
  • 6