As a followup to my LogSer application, I had a need to send data to the serial port. I came up with the following solution, which works for Windows only (b/c 90% of the interesting code is the low level serial interface, it would be totally different on Linux).

The code can be downloaded in either Source Code form, or as a Compiled EXE . To compile the source for yourself, simply run cl ToSer.cpp to compile with MS’s Visual Studio command line compilers.

Anything sent to stdin will simply be dumped to the designed serial port.

Run toser.exe <com port> <options> where options are:

  • -b Specify the bitrate
  • -p Specify parity settings (8n1, 7e2, etc)


Leave a Reply

Your email address will not be published. Required fields are marked *