none
GenericUSBFN.sys - Host configurations RRS feed

  • Question

  • Hi all,

    I have two Windows machines, one acts as USB host and other as USB device.

    I would like to use GenericUSBFN.sys on USB device machine. But how I can configure the other device to install generic WinUSB driver for this device?

    Thanks.

    With regards,

    Keshava G N

    Thursday, August 1, 2019 4:27 AM

Answers

  • That's how those modules are designed to be used.  As the name implies, GenericUSBFN is designed to let you become a generic USB device.  WinUSB is designed to listen to a generic USB device.  You still have to design the interfaces, endpoints, and protocols you're going to use, but those tools provide the plumbing.

    And just so there is no confusion, GenericUSBFN only works on machines that are designed to be USB devices, like little IoT boards.  You can't use it on your average PC.  They don't have the right hardware.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    • Marked as answer by Keshava GN Tuesday, August 6, 2019 8:50 AM
    Monday, August 5, 2019 6:07 PM

All replies

  • The easy way is to use the Microsoft OS Descriptors in your USB device.  That will automatically load WinUSB on the host.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Thursday, August 1, 2019 5:48 AM
  • Thanks.

    Yes, OS desc I can use to load the WinUSB on host.

    But whether I'll be able to send/receive data using GenericUSBFN driver from the device application to host application which uses WinUSB?

    Regards,

    Keshava G N

     
    Thursday, August 1, 2019 6:23 AM
  • I mean, Is there any additional class driver or user mode service is needed for this data transfer, or it can work this way :

    Device app -> GenericUSBFN -> (USB device) -> (USB Host) -> WinUSB -> Host Application

    Any ideas would be helpful.

    Thanks.

    Monday, August 5, 2019 6:43 AM
  • That's how those modules are designed to be used.  As the name implies, GenericUSBFN is designed to let you become a generic USB device.  WinUSB is designed to listen to a generic USB device.  You still have to design the interfaces, endpoints, and protocols you're going to use, but those tools provide the plumbing.

    And just so there is no confusion, GenericUSBFN only works on machines that are designed to be USB devices, like little IoT boards.  You can't use it on your average PC.  They don't have the right hardware.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    • Marked as answer by Keshava GN Tuesday, August 6, 2019 8:50 AM
    Monday, August 5, 2019 6:07 PM
  • GenericUSBFN was designed for the Windows phone. I tried to get it to work with a my UFX extension driver (for a PLX 3380 chip) on desktop Windows, but there appears to be some glue missing that was present only in phone. I couldn't get Microsoft to provide any assistance other than some vague comments that they're looking into it, so I abandoned using GenericUSBFn and the UFX framework after a few very frustrating weeks

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Monday, August 5, 2019 11:10 PM
    Moderator
  • Understood. Thanks, Tim and Brian.

    And yes, we're intended to use GenericUSBFN on Win 10 IoT Core. Hope it works on IoT core!

    Tuesday, August 6, 2019 4:28 AM
  • Please let us know if you get it to work on IoT

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Thursday, August 8, 2019 12:59 AM
    Moderator
  • Is it not tested on Windows or Windows IoT? This is confusing.

    Thursday, August 8, 2019 7:12 AM
  • I was not able to get it working on big Windows. It clearly works on Phone, and it may work on IoT. I would like to know if it does

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Thursday, August 8, 2019 5:45 PM
    Moderator
  • Is there any sample user mode service/application for this? I mean, there is a small API guide, but a sample would have been more helpful.

    A sample class driver and a sample app to use the generic class driver...

    Tuesday, August 13, 2019 4:27 AM
  • There is a sample client driver in the WDK, in WDK10-Samples\usb\ufxclientsample. It is poorly written, and I wasn't able to get it to work on desktop Windows. I'm not aware of any user-mode samples, but try looking through the SDK samples

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Tuesday, August 13, 2019 4:36 AM
    Moderator
  • This is Client controller driver sample. I was looking for application sample which uses GenericUSBFN IOCTLs.

    Regards,

    Keshava

    Wednesday, August 14, 2019 6:14 AM
  • Yes, I pointed that out. At this point, my recommendation is to open a support incident with Microsoft. Because the docs claim that this functionality works, Microsoft should reverse the charges once they determine that it is indeed broken and they are at fault.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Wednesday, August 14, 2019 7:00 PM
    Moderator