Let's assume that you are the software developer. You have two computers. On the first computer (developer machine) you do not have any real COM ports. On the second computer (test machine) you do have real COM1 port with some hardware connected to it. You want:
- Open COM5 on your developer machine and send some commands. Hardware on the test machine should receive these commands, answer to them. Of course, you need to get response from COM5 port on developer machine.
- You want to save all data to file to analyze it later (or maybe just in case).
Well, the main idea is to create virtual port COM5 on the developer computer, connect it via TCP socket with test computer and log traffic to the file. To do it, you should create the following configurations:
- On the developer machine
- Create Connector device (COM5)
- Create TcpClient device (source port COM5, remote TCP host - test machine IP, port 5555 as an example).
- Create Spy device: VSPE device index = 1 (this is TcpClient we have just created, Destination stream=File, Output path=c:\output.txt)
- On the test machine
- Create TcpServer device (COM1, port 5555)
That's it, now you will be able to send/receive data from the remote COM port using COM5 on the developer machine. All the data will be logged to file c:\output.txt.
- See also:
- Spy device