What kind of driver do I need to duplicate a USB com port

Xavier Junqué i de Fortuny 20 Reputation points

There is a device receiving and transmitting data via a USB port. This data are simple string commands. There is a second device that only receives data via USB CDC com port. The data it manages is a restricted part of the string commands and the only data it sends back is a OK confirmation. My question is what kind of driver could intercept the data being sent to the first device and send it to the second. Could it be a UMDF one? Is there any example?

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,567 questions
0 comments No comments
{count} votes

Accepted answer
  1. VasimTamboli 4,785 Reputation points

    Yes, it is possible to use a UMDF driver to intercept and redirect data between two USB CDC COM ports. The driver would need to create two virtual COM ports, one for the source device and one for the target device. The driver would then read the data from the source COM port and redirect it to the target COM port.

    There are several examples of how to create a virtual COM port using UMDF, such as the Microsoft WinUSB Sample on GitHub. This sample demonstrates how to create a virtual COM port and communicate with a USB device using the WinUSB driver.

    Once you have created the virtual COM ports, you can use standard serial communication APIs in your application to read and write data to the virtual COM ports, just as you would with a physical COM port.

    0 comments No comments

0 additional answers

Sort by: Most helpful