Matt
Matt

Reputation: 211

Reading Serial Port pins in C#

I have a device connected to my computer via RS232 to USB. This device hold times for eight tanning beds. I want to get the data from the pins on the serial port to see how it is connecting with the device, to see how the times are being displayed. I am hoping to do this is C#, but I'm not sure exactly where I need to start. I have thought about probing the pins on an oscilloscope, but that seems very tedious. Any thoughts?

Upvotes: 0

Views: 1762

Answers (1)

Scott Chamberlain
Scott Chamberlain

Reputation: 127543

I just ran in to this my self. If you are not using a 64 bit version of windows I would recommend using PortMon, save the log file, then do offline parsing of your log file. There are libraries that let you hook in to the stream via code but I think using PortMon you may not even need to write any code at all and you may be able to just figure out the protocol by visual inspection.

If you are using a 64 bit version of windows your choices are severely limited. I could not find a free program that was compatible with windows 7 x64, The only program I heard that works (but I did not buy it and the free version did not work) is Serial Port Monitor by HHD.

You can also try running the software in XP Mode to get the 32 bit monitoring programs running, it worked for me.

Upvotes: 1

Related Questions