Download virtual serial port software, Baidu search "virtual serial port software", the first one is Chinese version, just download and install it.
2
Open the virtual serial port software, serial port types are divided into three categories. The first category is "physical port", which refers to the physical serial port and is the actual serial port; The second category is "virtual port" virtual serial port; The third category represents other types of serial ports, which are generally not used.
three
Adding virtual serial ports is done in pairs. First, choose two virtual serial numbers, generally do not choose com 1 and com2. You can set it up from com3. Select com3 and com4 here, and then click "Add Serial Port".
four
Open com3 and com4, and you can see the serial port information in the drop-down bar, including serial port open status, baud rate and the number of bytes sent and received.
five
Open the device manager to view the virtual serial port, and you can see that there are two more serial ports, com3 and com4, which are corresponding. Data sent by com3 is received by com4, and data sent by com4 is received by com3.
six
Test the serial port function:
1, open serial debugging software, and open two windows to facilitate sending and receiving each other.
2. Set parameters such as baud rate, and the baud rates of the two serial ports should be consistent.
3. Open com3 and COM 4; respectively;
4. Send the data to see if the other party can receive it.
seven
At this time, we can see what has happened to the virtual serial port software, and we can see that the serial port information of both of them has been updated, and the number of bytes sent and received can be displayed.
eight
If you don't need a virtual serial port, you can delete the virtual serial port, but you should remove the use status of the serial port, close the serial port in the debugging software, and then delete the serial port in the virtual serial port software.
Just add it with software when you need it in the future.