在Delphi截取串口数据
Intercept serial port data in Delphi
我知道如何使用 TComPort 通过串行端口进行通信,但我想查看进出虚拟 (USB<=>RSR232) COM 端口的数据,而无需中断传输和(显然)打开港口。准确地说,我想查看来自 USB GPS 接收器的 GPS 数据。
问题是我需要同时使用相同数据的应用程序。我的 Delphi 应用程序和导航软件。另一种选择是拥有带有欧洲地图的体面的 PC 导航软件(打开街道地图也可以,但找不到任何体面的汽车导航软件)具有良好的 API whci 可以 return GPS 位置。
欢迎任何想法! :)
谢谢!
G.
您可以使用 Mark Russinovich 的 PortMon 实用程序
将 com0com 设备驱动程序与 hub4com 结合使用。
In conjunction with the com0com driver the hub4com allows to
- handle data and signals from a single real serial device by a number of
different applications. For example, several applications can share data
from one GPS device;
示例:
GPS hub
You have a GPS device that connected to your computer via a physical COM1
port and you'd like to handle its data by two GPS applications. You can
do it this way:
With the com0com's Setup Command Prompt create COM5<->CNCB0 and
COM6<->CNCB1 virtual COM port pairs (see com0com's ReadMe.txt for
more info). For example:
command> install 0 PortName=COM5 -
command> install 1 PortName=COM6 -
Start the hub4com.exe on COM1, CNCB0 and CNCB1 ports:
hub4com \.\COM1 \.\CNCB0 \.\CNCB1
It will send data received from COM1 port to CNCB0 and CNCB1 ports
and it will send data received from CNCB0 port to COM1 port.
Start the GPS applications on COM5 and COM6 ports.
Advanced Serial Port Monitor 也可以监控 USB COM 端口并在 Windows 7,8 64 位 .
上工作
http://www.aggsoft.com/serial-port-monitor.htm
注意:您应该在 ASPM 中使用 SPY 模式。
我知道如何使用 TComPort 通过串行端口进行通信,但我想查看进出虚拟 (USB<=>RSR232) COM 端口的数据,而无需中断传输和(显然)打开港口。准确地说,我想查看来自 USB GPS 接收器的 GPS 数据。 问题是我需要同时使用相同数据的应用程序。我的 Delphi 应用程序和导航软件。另一种选择是拥有带有欧洲地图的体面的 PC 导航软件(打开街道地图也可以,但找不到任何体面的汽车导航软件)具有良好的 API whci 可以 return GPS 位置。
欢迎任何想法! :)
谢谢! G.
您可以使用 Mark Russinovich 的 PortMon 实用程序
将 com0com 设备驱动程序与 hub4com 结合使用。
In conjunction with the com0com driver the hub4com allows to
- handle data and signals from a single real serial device by a number of different applications. For example, several applications can share data from one GPS device;
示例:
GPS hub
You have a GPS device that connected to your computer via a physical COM1 port and you'd like to handle its data by two GPS applications. You can do it this way:
With the com0com's Setup Command Prompt create COM5<->CNCB0 and COM6<->CNCB1 virtual COM port pairs (see com0com's ReadMe.txt for more info). For example:
command> install 0 PortName=COM5 - command> install 1 PortName=COM6 -
Start the hub4com.exe on COM1, CNCB0 and CNCB1 ports:
hub4com \.\COM1 \.\CNCB0 \.\CNCB1
It will send data received from COM1 port to CNCB0 and CNCB1 ports and it will send data received from CNCB0 port to COM1 port.
Start the GPS applications on COM5 and COM6 ports.
Advanced Serial Port Monitor 也可以监控 USB COM 端口并在 Windows 7,8 64 位 .
上工作http://www.aggsoft.com/serial-port-monitor.htm
注意:您应该在 ASPM 中使用 SPY 模式。