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?

bertieb
  • 7,344
  • 36
  • 42
  • 54
Xantham
  • 271
  • 1
  • 2
  • 5
  • 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 02 '12 at 00:00

3 Answers3

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

jacobq
  • 233
  • 1
  • 3
  • 9
  • 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: https://desowin.org/usbpcap/ https://wiki.wireshark.org/CaptureSetup/USB – jacobq Dec 14 '18 at 22:16
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.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
MARK C
  • 11
  • 1
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).

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Scott Chamberlain
  • 30,694
  • 7
  • 96
  • 109