How to create a virtual port Com1 in windows?

I am developing a mobile application for working on pocketpc. We have a mobile printer and card napkins that use com1 to send and receive information. I am using a device emulator and want to test it without a printer. How to create a virtual port com1 for access and reading? I tried com0com, but the device emulator did not set it as serial 0.

+3
source share
4 answers

This is not a direct answer, but if you are desperate enough, I used a Detours friend to redirect the output related to COM interfaces where he wanted when he could not edit another program source.

+1
source

2 (USB- ), - , , Hyperterminal. .

+1

2 GPS. , , - .

0

, , . COM- , .

Now, if you ask how you can just open the COM port and read and write without anything, it is much more complicated. The letter is simple - I would simply disengage from the level of communication and spank along with a mock class, and then I have nowhere to write. Reading is much more difficult, since you have to write some kind of simulator to present the data in the same way as your peripheral device.

IMO, you should still do this abstraction so that in any case you can write unit tests and software integration.

0
source

Source: https://habr.com/ru/post/1698362/


All Articles