16

I've looked around quite a bit, but I have yet to find a free way to monitor a serial port (without opening or blocking it from other applications), that works on Windows 7 64-bit.

Even Microsoft's own Portmon does not work. A few posts have talked about running it in compatibility mode, but it doesn't work for me. I've tried compatibility mode for Windows XP service pack 2 and 3 (the only ones available on the drop-down list), and neither allow it to function.

So yeah, is there any way of monitoring a serial port for Windows 7 64-bit?

1
  • 2
    PortMon from MS/Sysinternals would not work because the driver depends on the bitness of the OS. Unlike with usermode programs which can use WOW64 to run a 32bit app on a x64 system. – 0xC0000022L Jun 2 '12 at 0:00
1

I just tried Advanced Serial Port Monitor. "Spy" mode does just what you want.

It's only free to try. However, you have to pay for a permanent solution.

1

A workaround I have used in the past when I was in the exact same situation as you was to use a 32-bit VM.

It's not the greatest solution, but it does work and has no cost (other than any costs associated in setting up your VM Environment).

3
  • What would be an example of a VM? – Peter Mortensen Apr 6 '18 at 16:22
  • So you’re saying that (a process on) a VM can monitor a port on the host without blocking it from applications on the host?  I thought that host devices could be accessible by the host or the guest, but not both. – Scott Apr 7 '18 at 5:57
  • 1
    @Scott He's suggesting that PortMon running in a 32 bit VM could monitor the VM's serial connection. – jpaugh Dec 6 '18 at 14:36
1

If you have another computer, I recommend running a POSIX OS and using socat to "pipe" the data from one port to another while logging the traffic. This is basically like a hardware-based solution, but it's using general purpose hardware instead of something special. e.g. something like this:

sudo socat -x -v -d /dev/ttyUSB0,b115200,rawer,cr /dev/ttyUSB1,b115200,rawer,cr

What's really neat about this program is that it's super flexible as far as what you can connect to what. You can use TCP/IP sockets, files/streams, etc. transform baud rates, change line endings, etc. Introductory article (dated 2009 but still useful) is available here.

Edit: Just to clarify, instead of having a hardware configuration like this:

Main computer serial port <--> Device serial port

It'd be like this:

Main computer serial port <--> sniffer computer serial port 1 Device serial port <--> sniffer computer serial port 2

4
  • True, but it will allow one to observe all data that is sent or received on the physical port. Since the OP did not specify whether the "port" was abstract/software or physical/hardware I think this is still a fair answer. – jacobq Dec 12 '18 at 15:08
  • @jpaugh I don't understand what you mean. What "isn't running"? This solution allows use of any software or hardware as long as the data flows through a physical port. Just attach an additional computer / device inline with the connection and run socat to forward the data while logging it. I'll add a simple diagram to the answer in the hope of clearing this up. – jacobq Dec 14 '18 at 18:38
  • Okay. Yeah, I misunderstood. Now that I understand it, I don't think you said anything wrong. Originally, I came here trying to deal with a virtual serial device a la USB, so of course this would not make sense for that case. Sorry about taht. – jpaugh Dec 14 '18 at 21:27
  • 1
    For USB connection debugging I highly recommend these: desowin.org/usbpcap wiki.wireshark.org/CaptureSetup/USB – jacobq Dec 14 '18 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.