Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java RS-232 Communication on Windows

Does anyone know of a good Java API for controlling RS-232 devices in a WIN32 enviroment? I've tried RXTX but they don't support RS232, only RS-485.

like image 840
Steve Avatar asked Nov 05 '08 06:11

Steve


People also ask

How can I transfer data from RS-232 to computer?

What do you need to read data from an RS232 serial port? Launch Serial Port Reader and select “Session -> New Session” from the Session menu option. You can also click Ctrl+N. A list of view options is displayed in the “New monitoring session” window.

How do I know if my RS-232 port is working?

By looping the transmit and receive pins, you can test serial cable port communication by checking if the serial ports connections transmit and receive valid information. This is called a loopback test and can be used to test rs232 communication. Use a screwdriver to loop pins for testing.


2 Answers

Without reservation, I recommend Java Serial Port from serialio.com. I had significant stability problems with the Sun, IBM and RxTx serial packages. SerialPort has been rock solid in production for over 2 years 24/7.

They support the standard Java serial API, as well as their own alternative proprietary one. I would stick with the standard API though, unless you really need something theirs has that the standard one doesn't, just to keep your options open.

like image 125
Lawrence Dol Avatar answered Sep 29 '22 17:09

Lawrence Dol


I advise you to try jSSC. This lib support Win32(Win98 - Win7) and Win64. Linux version under construction. Project page on Google code: http://code.google.com/p/java-simple-serial-connector/

like image 27
scream3r Avatar answered Sep 29 '22 17:09

scream3r