I first tried to use javax.comm to connect to the serial port (COM4). It did not even open the serial port.
Then I tried to use rxtx libraries (rxtx-2.2pre2) to connect. It connects and writes the data but does not read any data from the serial port.
Is there any JDK/platform dependency to use javax.comm or rxtx libraries?
I am using:
- Windows XP SP3,
- JDK 1.6.0_22,
- rxtx-2.2pre2,
- USB to Serial adapter,
- Portmon (by Microsoft) - to monitor activity on serial ports
- Hyperterminal - to check if the COM port really works.
- http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port - sample code used to check read and write