I am using RXTXcomm.jar to communicate and read data from a digital compass (OS5000 - US). The compass is connected to COM-2.
When the port COM 2 is read using Microsoft Hyperterminal, I get data in readable
string format.
Example : $OHPR,130.3,-17.9,173.0,36.3,0.0000,201.85,185.69,-65.13,44.93,0.989,-0.305,0.11
9,-0.933,91.43,91.43,0.00,6300*29
(this is an acceptable format).
However, when I connect to the same port using
Java (via RXTXcomm.jar) , I get all gibberish output.
Example : ÈNŒHŽJNlʈ , Šˆ.NŒHŽJNLʈÈL .... etc.
(unacceptable)
What is happening? Is this a string format related issue? Please help.
++++++++++++++++++++++++++++++++++++++++++++++++
The piece of code which I use to read this data is :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++