Listening to Serial Com Ports that are In use

后端 未结 4 891
不思量自难忘°
不思量自难忘° 2020-12-09 10:18

I\'m dealing with some legacy systems that are using RS232 to communicate with peripherals. I\'m not very experienced with COM interfacing. I have some code that can open an

4条回答
  •  醉话见心
    2020-12-09 10:47

    Is there any way to "middle man"

    Yes, there are many. Strongly supported in Windows through the concept of a "filter driver". Such a driver can be inserted ahead of a driver that get I/O requests and sees everything that passes by. Normally intended to alter I/O requests but also very suitable for simply monitoring the requests. Man in the middle.

    The canonical example of such a driver is the venerable SysInternals' PortMon utility. Shows you everything that an app sends and receives to/from a serial port, including configuration and data. There are many such apps, just Google "serial port filter driver" (heavy on source code samples) and "serial port monitor".

    One footnote with this, you do tend to have a problem on a 64-bit version of Windows. The vast majority of these apps, including PortMon, only work on the 32-bit version. The 64-bit version only allows certified drivers to be installed, there is very little money in selling these apps to justify the expense. Beware of this when you shop.

提交回复
热议问题