Hello,
RXTX is not very stable under Linux.
Elegant solution is to use ser2net package. RS232/TCP server.
If you need to use the structure of RXTX, here is my version:
https://sourceforge.net/projects/rxtxser2net/
Has been running for one year in nuclear /power plant, in modbus data
acquisition //without any problems.. ;)
Arsi
/
------------------------------------------------------------------------
*From:* Simon Platten <[email protected]>
*Sent:* Saturday, May 17, 2014 12:51PM
*To:* [email protected]
*Subject:* [beagleboard] RXTX Java library with JRE 1.7.0_55
Hello,
I am using RXTX:
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
I have configured several UARTS, ttyO0, ttyO4 and ttyO5. When I try to
open any of the serial devices using the RXTX libary I get:
Online connect to device is not available, device not ready!
I also wrote a libary in C which opens the serial port and communicates
to another Beaglebone Black. This works fine and I have bi-directional
communication.
I can't see why the RXTX java library isn't working, any suggestions,
here is a snippet of the java code, with additional test lines in.
[code]
public static CommPortIdentifier validateDevice(String strDev) {
CommPortIdentifier portId = null;
System.out.println("Validating: " + strDev);
try {
portId = CommPortIdentifier.getPortIdentifier(strDev);
System.out.println("portId: " + ((portId ==
null)?"null":"ok"));
SerialPort serialPort = (SerialPort)portId.open("Demo
application", 5000);
System.out.println("serialPort: " + ((serialPort ==
null)?"null":"ok"));
int intPortType = portId.getPortType();
System.out.print("port type: " + intPortType + "...");
if ( intPortType == CommPortIdentifier.PORT_SERIAL ) {
// The port is valid on this system
System.out.println("ok");
return portId;
}
} catch( Exception ex ) {
portId = null;
System.out.println(strDev + " ... could not validate");
}
return null;
}
[/code]
I pass the routine "/dev/ttyO5", but it doesn't get as far as the second
println statement.
Thank you,
Simon
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.