none
UMDF driver development for USB composite with multiple interfaces RRS feed

  • Question

  • Here's the situation: I've got a USB camera which needs custom USB drivers because it's not compatible with Windows (only Android, but doesn't matter here). The camera is identified as "composite device" by Windows device manager and the generic usbccgp.sys drivers are used by Windows. The USB device has three different interfaces.

    I've got working drivers for Windows XP from a third-party developer (built on WDK). All in all three different drivers (inf/sys files), for each interface a specific driver. In Windows XP the device is listed with all three interfaces in the device manager. I can choose to install a seperate driver for each interface. However, in the Windows 7 device manager the device is only listed as "composite USB device" without sub-devices as in Windows XP. I can only choose a single driver for the composite device.

    I'd like to rewrite the XP drivers and use them in Windows 7. I've got them compiled for Windows 7 already and I've access to the source code. My question is: How can I use three different driver files for the composite USB device on Windows 7? And if that's not possible, how can I build a single driver package based on the source of the three single drivers?


    Thursday, October 19, 2017 1:09 PM

All replies

  • Have you looked at this link that describes how composite devices are enumerated by windows?

    https://msdn.microsoft.com/en-us/library/windows/hardware/ff537109(v=vs.85).aspx

    -kumar


    kumar -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 19, 2017 2:34 PM
  • I did.

    As I have the drivers ready and my problem is about the INF files and interface selection: Is it sufficient to create a INF file which adds the interfaces using the AddInterface Directive?

    It should be noted that I don't have experience in Windows driver development. I try to figure out what is necessary to get the device running on Windows 7 (like it does on Windows XP). The driver is compiled for Windows 7 (.sys files) so I guess I just need to create a INF file with all needed informationen for the composite device. If someone want to take a look, here's the source code: https://github.com/da-nie/FlirOneDrivers with the XP drivers (inf & sys) and the Windows 7 drivers (sys).

    Edit: A UMDF driver sample for a USB device with multiple interfaces would probably help me.
    Thursday, October 19, 2017 3:19 PM
  • Here's the difference as image. The first one ist from my XP Virtual PC and it lists all interfaces. I can choose a driver for each interface. The second image is from Windows 7. I can't see the interfaces and can only choose a single driver for the composite device.

    https://imgur.com/a/9zwKq

    Thursday, October 19, 2017 5:39 PM
  • The Windows 7 image shows an exclamation mark for the device, which means some sort of error has occurred.  If you open the device in Device Manager there should be a problem code listed.  What is that problem code?

    -Martin
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, October 19, 2017 5:55 PM
  • "This device cannot start (Code 10)".

    So the difference between XP and 7 is that usbccgp.sys can't start the device on Windows 7 (and thus not showing the interfaces?) but Windows XP can start the device - and then show the interfaces? Here are properties from USBDeview from XP and Windows 7:

    https://imgur.com/a/b9NnM

    Another note here: If I load WinUSB or libusb drivers for this composite device, the device can be started. However, it doesn't change anything as no interfaces are listed again. I guess I need the usbccgp driver to work for that.


    Thursday, October 19, 2017 6:39 PM
  • Do other composite devices work OK on Windows 7?  For example a USB keyboard is typically a composite device.

    Could you provide a listing of the device's descriptors?

    -Martin
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, October 19, 2017 7:18 PM
  • No problems with other devices. This isn't something specific to my PC. It doesn't list the interfaces on any Windows 7 or higher PC.

    Sure. Here are some infos I took last week using USBTrace:

    https://www.dropbox.com/s/x9llksel7kj0qh2/usb-device-information.html?dl=1





    Friday, October 20, 2017 10:38 AM
  • Nothing obviously wrong with the descriptors.  If you have a system running Windows 8 (or preferably Windows 10), capturing traces USB trace logs would be useful.  Instructions can be found here:

     https://blogs.msdn.microsoft.com/usbcoreblog/2014/09/02/capturing-usb-debug-traces/

    Put the traces in a zip file and share them and I will take a look.

    -Martin
    This posting is provided "AS IS" with no warranties, and confers no rights. 
    Monday, October 23, 2017 7:11 PM