Can we use USBSER.sys on both Host side as well as Device side

Hello Experts,
Is it possible to use USBSER.SYS as both HOST class driver as well as DEVICE class driver?
Here in my case USB Device(running on win IoT Core) and Host PC(Running on Win10) connected via usb(2.0) cable.
Is it possible to communicate Both side by using any COM port application like Teraterm/Hyperterminal?
In case USBSER.sys could be used on both side, what changes could be needed on the INF file to use IT on the DEVICE side.

Regards
Lokesh

Usbser.sys is just a USB CDC to serial port converter, you can use it on any USB CDC device. It is a generic standard.

1 Like

No. USBSER.SYS is only for the host side.

1 Like

Hello Tim
Thank you for the response. Is there any other generic class driver which supports on device side as CDC class driver? Finally I need to carry text messages from device to host. Host should enumerate my device(IOT Core) as a Virtual COM port.

@matt_sykes said:
Usbser.sys is just a USB CDC to serial port converter, you can use it on any USB CDC device. It is a generic standard.
@matt_sykes,
Can you please elaborate a little, how can it be used on device side(on IOT Core) as a CDC class driver. Do we require any INF modification as such.?
Actually my requirement is I need a class driver which should run on Win IOT Core device. And when I connect the IOT Core device to a HOST win 10 PC through USB, it should enumerate itself as a COM port device.

It cannot be used on the device side. Matt, like basically everyone on this list, is accustomed to thinking about the host side.

The generic class driver, as you know, is GenericUsbFn.sys You still haven’t said what you want to do, but if you’re just looking to feed data through a single endpoint, that may be all you need. From the device side, there’s nothing magical about the USB device classes. It all gets down to endpoints. You need to handle control requests, and you need to send data through the appropriate endpoint. But YOU have to understand what to send. You are building a USB device, and that means you absolutely have to read and understand the USB Specification and the USB CDC Specification. I’m guessing you haven’t done that.

Creating a device is not as simple as creating a simple host driver, and because so few people have done it, there aren’t as many support tools or samples. Again, I don’t really understand why one would choose Windows for this. There are easier ways to build a USB device.

1 Like

Hello Tim,
Thanks for the response. Let me explain my query in details. The whole purpose is to enable my board as device on Windows IOT Core so we are not going on the other path i.e. using Linux OSes . We were able to make the device through Linux.

Coming to the Windows IOT Core as USB Device, as we have gone through the Microsoft architecture document, and utilizing the in-box Synopsis driver as Function controller driver which works with UFX1000.sys.
On the End point, as per the Microsoft architecture document (https://docs.microsoft.com/en-us/windows/iot-core/learn-about-hardware/usb-support) there are few approaches / options to implement the Endpoint

• Windows Service to implement the GenericUSBFn.sys IOCTL Handling
• Use the Windows Provided MTP Service along with WinUSB.sys for the device side to handle the Endpoint. Our Endpoint needs to work as Serial Communication data parsing from application on the device side.

Since WinUSB.sys is mentioned as generic USB Function class driver and USBSer.sys is specifically for CDC function class, we are looking at possibility of using USBSer.sys on device as endpoint data handling through the custom Service. If this is not the option then MTP Service with WINUSB.sys configuration is the one we are looking at to use the endpoint data handling.
Please advise if the approach has any issue here.

Please advise if the approach has any issue here.

Yes, it has serious issues. The Windows MTP service and WinUSB are both HOST services, not DEVICE services. Neither of things will help you one bit in handling your endpoint as a device.

1 Like

Hello Tim,
We are really greatful to hear the timely responses from you and thank you for that.
“I meant, MTP service and WinUSB on host side, and MTP service using GenericUSBFn on device side. Is this a possible approach?”

There is an MTP Responder driver available on Windows 10 Mobile. I believe it is a separate driver from GenericUSBFn.

But why are you looking at MTP? I thought you wanted to be a CDC device emulating a simple serial port. MTP is a totally separate USB device class.

Hello Tim,
Thank you for the response, Yeah I got it now.
Regards
Lokesh