Creating Virtual COM Port Devices Dynamically

Hi,

We are currently working on a project to develop a Ethernet to RS-232 device. It is basically connected to the computer through ethernet and there are multiple COM ports that users can use. It is same as the MOXA's NPort 5600 or VS-COM's NetCom Plus.

Both MOXA and VSCOM provide a software either to search for devices to create COM ports dynamically or manually creating COM ports by providing IP addresses.

I understand how serial driver will operate, I think I need to use WinSock kernel API to communicate with device in the driver. What I don't understand is that how does MOXA's Driver Manager creates COM port devices dynamically.

I am a bit confused, I thought of creating a software driver to create COM port devices using WdfDeviceCreate on IOCTL requests, but I am not sure if it will work. I examined the toaster sample of Windows but it is a bus driver and I am not sure if I can go with that sample for my project. Neither MOXA or VSCOM uses a bus driver to create devices though.

Any help is appreciated about which approach should I use.

Edit: I think I should add a screenshot of MOXA's driver manager. When you click "Add" and set IP address of the device, it creates COM port devices.

image

See this sample: https://github.com/microsoft/Windows-driver-samples/tree/main/serial/VirtualSerial2