I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial.
My application has several threads and one of my biggest problems is that out of nowhere, I seem to be getting one to two extra bytes on my stream. I can't figure out where they co...
I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial.
One of my biggest problems is that the RxTx SerialPortEvent.OUTPUT_BUFFER_EMPTY does not work on linux over usbserial.
How do I know when I should write to the stream? Any indicators...
I have followed the instructions to setup rxtx on windows from http://www.jcontrol.org/download/readme_rxtx_en.html.
What I did exactly was copy rxtxSerial.dll to "C:\Program Files\Java\jdk1.6.0_07\jre\bin"
and copied RXTXcomm.jar to "C:\Program Files\Java\jdk1.6.0_07\jre\lib\ext"
(my JAVA_HOME variable is set to C:\Program Files\Java\j...
Hi everyone, i'm trying to use the rxtx 2.0 jars and dll to use the java comm api in windows xp, i copied the RXTXcomm.jar to jre\ext and rxtxSerial.dll and rxtxParallel.dll to jre\bin
When I run the program I got the following error:
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library....
According to the java api, the InputStream.read() is described as:
If no byte is available because the
end of the stream has been reached,
the value -1 is returned. This method
blocks until input data is available,
the end of the stream is detected, or
an exception is thrown.
I have a while(true) loop doing a read and I a...
I am trying to write a Java applet that will read from a user's serial port. For this I am using the Java Comm API in conjuction with the RXTX library. I've successfully managed to read data through a local Java application but I can't seem to do the same from within an applet. The problem is that the RXTX library is a native library and...
Hi, I have two computers running this code:
import java.io.;
import java.util.;
import gnu.io.*;
public class Deb implements SerialPortEventListener, Runnable{
public static final int TIMEOUTSECONDS = 30;
public static final int BAUD = 9600;
static String telefono;
static Boolean llamar = false;
CommPortIdentifier cpiModem = null;
...
Hi,
I have a modem in a computer where there is running a program that dials a number or waits for a call. When dialing a number the modem works fine, but I doesn't detect the Ring event when it's the one being called. My program is in java and it works perfectly on my laptop with its modem. When I use the modem to receive a fax, it wor...
Hi, I am using rxtx api to read data from a GPS device over a com port. Right now I'm finding the correct com port by reading a config file and looking for the port listed. The problem that I'm having is that if the device is unplugged the com port could change then the user has to know to change the config file. I wrote an app similar t...
Serial Port Not getting closed. I want to release the COM port ...
Below is my code....
import java.io.*;
import java.util.*;
import gnu.io.*;
public class ReadCommPort implements SerialPortEventListener {
static CommPortIdentifier portId;
static Enumeration portList;
InputStream inputStrea...
I've been using RXTX for about a year now, without too many problems. I just started a new program to interact with a new piece of hardware, so I reused the connect() method I've used on my other projects, but I have a weird problem I've never seen before.
The Problem
The device works fine, because when I connect with hyperterminal, I...
While trying to figure out this problem (any help there is appreciated), I ran RXTX while monitoring its activity using PortMon and noticed that RXTX constantly checks if data is available, even when the Java client reads from the gnu.io.SerialPort object only through a SerialPortEventListener.
Why is this? Is it a poor implementation ...
I'm trying to communicate between my PC (Windows 7 using Netbeans and RXTX) with an Arduino Pro, using the serial port. The Arduino is actually connected to the PC using an FTDI cable.
The code is based on the Java SimpleRead.Java found here.
Currently the Arduino simply prints out a string when it starts up. My Java program should pr...
I am playing with the Firmata protocol which allows you to control Arduino through a serial protocol. I am reading sensor values using SerialPortEventListener listening for DATA_AVAILABLE event. But i notice a lot of latency it takes a second for the updated sensor values to be registered by my application, protocol runs at a baud rate o...
Hi I'm trying to write a java application that accesses the usb ports to some read and writes to a device connected through usb. The problem I face is that I don't know what exactly to use in java to do such a thing. I searched online a found something called jusb but all the post seem fairly old. Currently I'm using the RXTX librarie...
I'm using rxtx for serial I/O handling in Java with an FTDI2232H that provides a USB comm port. It works great, with one exception: if I unplug the USB cable, so that the COM port disappears at runtime, it spews exceptions left and right:
java.io.IOException: No error in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
...
Hi everybody.
I'm writing an RXTX based code in order to detect the plug and unlug of a USB serial device on linux/windows.
public class PortMonitor implements Runnable
{
String portname;
boolean life = false;
CommPort p = null;
public PortMonitor(String name)
{
this.portname = name;
}
public void s...
Background: Windows Server 2003 R2,Wire Service virtual serial port created with RealPort software,
Serial Port configured as COM5, 9600 baud,8 data bits, no parity bits, 1 stop bit, no flow control,
Using RXTX 2.1-7.
The port COM5 is found, the serial port is created using the portId.open method and port parameters and flow control ar...
Hi Guys,
I'm currently testing a Java/MySQL POS system I've written for a small bar, and am having problems with the cash draw.
The cash drawer has an RJ11 plug connected via a USB->Serial box, and writing any data to the device triggers the draw to open.
I'm having problems with RXTX, and wasn't sure if it was my code, the library or...
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 SerialRea...