Saturday, November 29, 2008

Writing to the Serial Port

Decided to go with Java for this project (mostly because the tools I'm using are free).

First Roadblock - Apparently the Java support for javax.comm has been EOLed per this thread. I found a link to an older version of the jar file at Rick's Blog, but and it seems to work for Windows XP, but doubt that it will work in future versions of Windows. I found a good reference to get me started understanding how to use the API. Circuit Negma had good information on getting the javax comm libaries working.  If this doesn't work I'll probably either read more on the RxTx website or try to just write my own implementation for Windows. Another HOW TO Serial with RxTx.

It appears that if I am going to write my own implementation I would have to use JNI and write it in C or C++ for windows, here is a thread that describes the win 32 apis. Here is an example from the MSDN. Awesome implementation - http://www.codeproject.com/KB/system/serial.aspx. Another interseting link - http://www.fogma.co.uk/foggylog/archive/140.html.

No comments: