Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


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

lokichittilokichitti Member Posts: 70

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

Comments

  • matt_sykesmatt_sykes Member - All Emails Posts: 290

    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.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,403

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • lokichittilokichitti Member Posts: 70
    edited May 7

    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.

    Post edited by lokichitti on
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,403

    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.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • lokichittilokichitti Member Posts: 70
    edited May 7

    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.

    Post edited by lokichitti on
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,403

    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.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • lokichittilokichitti Member Posts: 70
    edited May 8

    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?"

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,403

    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.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • lokichittilokichitti Member Posts: 70

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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA