I suspect that Sun's javax.comm driver has other problems in bit stuffing (or related). I found out this by sending an array of bytes including 0xd in it, to another computer over a serial link (NULL modem cable), and the perticular byte (0xd) was recieved as 0xa while all other bytes being transmitted properly just as in the form they were originated at the source. I think this is a bit stuffing problem in the driver provided with Sun's javax.comm.
It is quite noteworthy to mention that this perticular problem can be solved by using rxtxComm, as an alternative to Sun's javax.comm. This is an open source comm API for java, all you have to do is changing the "import javax.comm.*" in to "import gnu.io.*" in your source codes and set CLASSPATH and LD_LIBRARY_PATH accordingly on Unix platforms.
No comments:
Post a Comment