COM Port Monitoring

AceInfinity

Emeritus, Contributor
Joined
Feb 21, 2012
Posts
1,728
Location
Canada
I'm writing an overlapped COM port send/receive tool in C, and I have all of the components required for accurately sending and receiving buffered data. Now I need to debug and test my utility however and the problem I'm having is that ATM I don't have a USB to serial adapter for RS-232, and all of the RS-232 controlled devices in my house are more than 30ft away from my desktop tower. I was planning on taking my laptop over to send and receive data through an adapter to test and see if my writes and receives are working as they should, because RS-232 doesn't work that well for polling data if the range exceeds 30ft; I could take my laptop with the adapter and a serial cable to any test device and run the tool with custom strings to send... Until then, I would like another alternative to test my program however.

RS-485 goes much farther, but I don't have any adapters for that currently. Is there a recommended tool you guys have for monitoring incoming and outgoing data on these communications ports?

I'm on Windows 8.1 Pro, and (*edited*) PortMon doesn't seem to be working for me for whatever reason. I know HyperTerminal exists, but I would prefer the suggested solution to be a free one, and I'm looking to weed out all of the junky utilities of this category by asking for an opinion here.

Any help is appreciated. Once I know that this tool is working as expected, maybe I'll write a simple Win32 GUI for this project later on, but this will definitely help in driver development (for numerous embedded control systems for automation purposes) where I need to know if custom RS-232 strings are working or not, or, how they work for a particular device; formatting and modifiable values, etc... Along with seeing what data can be polled from a specific device for informational uses.
 
Last edited:
Have you tried PortMon - another sysinternals tool:

Portmon is a utility that monitors and displays all serial and parallel port activity on a system. It has advanced filtering and search capabilities that make it a powerful tool for exploring the way Windows works, seeing how applications use ports, or tracking down problems in system or application configurations.

Portmon for Windows

Stephen
 
Hmm, I thought I mentioned 'PortMon' already, but I see that I typed 'ProcMon'... :S That initially always meant to say 'PortMon' so yes I have tried it, but it's not what I wanted... (I've now edited my original post.)

Although, I just realized that there is a problem when I tried using Putty. COM ports can't be shared in the same way as fileshares, so even If I open up Putty to read on that communications port, I won't be able to open another handle from my program to send the data anyways. I'm going to need to connect my laptop or some other receiving device that can show me my written data, which would mean testing it directly on the devices I want to test this on, or bring out my laptop and send data to it from my desktop, which in both cases would require that USB to serial adapter anyways... :( I get an "Input/Output Error" when trying to open a handle for read/write access from my program after having Putty open.

Reversely, I can't open Putty to view a write loop invoked by my program on COM1 because a handle is already owned by my program instance:
qlUavvu.png
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top