« Adding a column to an existing RRD database... | Video Card ATI HD3300 » |
Javelin terminal is sending information on an RS-232 protocol, but at 28800 bauds. This is not a standard rate and you migh face some troubles to configure it under Linux.
I wasted 2 days searching how to make it works, so here is the result.
First you have to configure your serial port to be at 115200, but with a divisor at 4. So 4 * 28 800 = 115300.
This is done by:
setserial /dev/ttyS0 baud_base 115200 spd_cust divisor 4
Then I used stty to configure the port, but since after I'm using java to read the data, I'm not 100% sur if it's require.
However, the line is:
stty -F /dev/ttyS0 38400
Then on the Java side, using javax.comm API, set the port with:
serialPort.setSerialPortParams(38400, SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
And that's all. Simply use the javax.comm example (SimpleRead.java) and update it with your needs.
JM