Monday, December 31, 2007

Win32 client to read serial data

After trying the perl client on Win32 I realized it is not going to work (will not work easily). First of all installing all perl accessories was a pain in the neck on windows ( ActivePerl + Win32::API + Win32::SerialPort ) and most probably no user will venture into that. I did and soon realized that the Win32::SerialPort library is not working the same way as Device::SerialPort on linux. Instead of finding out why this is happening, I wrote a standalone Win32 executable that is not dependent on complicated installations.

I was looking for a free C/C++ compiler for Windows and I found that a version of VC++ was free. After some googling I wrote a client that reads the serial port and dumps the data on the console. As with the perl client my TODO list includes logging and sending data to a web server. Current code is available in the projects CVS repository. Usage example:

si_reader.exe com4

The si_reader.exe client reads both the serial and USB inputs (from a virtual com port), although they are different for the same SI card (both main stations are in autosend mode). Hope this mystery will be revealed soon, for now I am in urgent need of some web/database application that receives and understand raw data.

No comments: