Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Summary of question: Using virtual serial ports connected to simple secondary application, is it possible to modify or inject data from a physical com port before it is received by a primary application?

Put another way: Is there is a method to modify incoming RS-232 data between the port and its normal destination?

The desired process would perhaps resemble the following steps:
1) External transmitting device connected to COM2 physical port writes a "3"
2) Before this "3" reaches the primary application, listening on COM3, it is intercepted and re-directed to secondary application.
3) Secondary application performs some modification, say "3"^2 results in 9.
4) Secondary application now writes modified data to primary application.
5) Steps 1 through 4 repeat continuously.

The rules:
a) transmitting device and the primary application must communicate through COM2.
b) incoming data must be intercepted and modified by secondary application.
c) primary application must only see data after being modified by secondary application
d) virtual COM ports and virtual re-direction of COM traffic are allowed.

VSPE's example:
I have looked at vspe's claim that data can be changed using the combination of their objects: (http://www.eterlogic.com/help/vspe/ConnectorAndMapper.html) But do not understand how once a COM port is mapped to a virtual port, how data can ever make it through to the primary application (in this example) That is, once COM 2 is mapped to vCOM3 and into the secondary application connected to vCOM3, The data can be modified, but how will it ever be written to COM2. After all, COM2 is mapped to vCOM3. Would data written to COM2 from the secondary application just be looped back into vCOM3?

Thanks in advance,
Ryykker
Posted
Updated 15-Nov-11 11:41am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900