Skip to content

Lazy CreateFile with WinUSB backend - #1181

Open
Novakov wants to merge 1 commit into
libusb:masterfrom
Novakov:winusb-lazy-create-file
Open

Novakov wants to merge 1 commit into
libusb:masterfrom
Novakov:winusb-lazy-create-file

Conversation

@Novakov

@Novakov Novakov commented Aug 27, 2022 •

Copy link
Copy Markdown

This is work-in-progress, I'm opening PR to get initial feedback/review and possibly be tested by others.

Fixes #1177 and includes changes from #965.

Summary of changes:

  • Include Windows: Add ability to claim multiple associated interfaces for a WINUSBX composite function #965 to get IAD information
  • Make winusbx_open essentially no-op
  • When winusbx_claim_interface is called it ensures that device handle is valid, if not - CreateFile is called.
  • Ref-counting for claimed interfaces
    • For IAD, first interface is used to open WinUSB handle and must be closed after all associated interfaces are released
  • winusbx_release_interface uses refcounting to release WinUSB device and device handle.

I did not test how it behaves with libusb-filter (never used that, so some catching up to do first). With composite device containing several WinUSB devices (some of them grouped in IAD) libusb behaves correctly - CreateFile is delayed until claiming interfaces and handle is closed as soon as last associated interface is released.

Test report https://gist.github.com/Novakov/4b2d4094825b83ef58b23060224660f8

printfs are left on purpose and will be removed before finalizing - I'm dropping recompiled libusb.dll where I can (OpenOCD and Orbuculum mostly) to check if devices are opened/closed as supposed to, having debug printfs available makes it easier.

@mcuee mcuee added the windows label Aug 30, 2022
@Novakov
Novakov force-pushed the winusb-lazy-create-file branch 3 times, most recently from 0872ad3 to 3b373df Compare September 7, 2022 18:47
@Novakov

Novakov commented Sep 7, 2022

Copy link
Copy Markdown
Author

I'm satisfied with current implemention. It's get a little tricky but reasonable. From my perspective it would be nice to get some feedback from someone with better understanding of libusb internals.

I've done some testing with composite and non-composite devices but my plan is to repeat them in more formalized manner before dropping WIP status. However I will be able to do that in ~2 weeks and I wanted to share current status.

There is dependency on PR #965 which waiting for some formatting fixes. If necessary I'm willing to apply them in this PR

@Novakov Novakov changed the title WIP: Lazy CreateFile with WinUSB backend Lazy CreateFile with WinUSB backend Oct 22, 2022
@Novakov

Novakov commented Oct 22, 2022

Copy link
Copy Markdown
Author

I finally managed to properly test these changes - things are working correctly, see test report linked in PR description.

@mcuee mcuee mentioned this pull request Oct 30, 2022
@tormodvolden

Copy link
Copy Markdown
Contributor

It is great that you have included a test report. I would be reassured if we had some more review comments and testing from others as well though. @RyanMetcalfeNovanta what do you think about this PR?

@Novakov
Novakov force-pushed the winusb-lazy-create-file branch from 3b373df to ccac965 Compare January 22, 2023 11:08
@Novakov

Novakov commented Jan 22, 2023

Copy link
Copy Markdown
Author

@tormodvolden @mcuee I've rebased this branch on top of changes in #965 and performed testing again - works as expected, also in real use case where I found this issue in first place

Comment thread libusb/os/windows_winusb.c Resolved
Comment thread libusb/os/windows_winusb.c Resolved
@Novakov
Novakov force-pushed the winusb-lazy-create-file branch from ccac965 to aa60876 Compare January 22, 2023 11:21

@tormodvolden tormodvolden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did just a first quick look at the code. It is a significant behavior change so someone into Windows will need to check it.

Comment thread libusb/os/windows_winusb.c Resolved
Comment thread libusb/os/windows_winusb.c Resolved
@Novakov
Novakov force-pushed the winusb-lazy-create-file branch 2 times, most recently from 177bebf to fe8cae8 Compare January 22, 2023 12:08
Comment thread libusb/os/windows_winusb.c Resolved
Comment thread libusb/os/windows_winusb.c Resolved
Comment thread libusb/os/windows_winusb.c Resolved
Comment thread libusb/os/windows_winusb.c Resolved
@mcuee

mcuee commented Jan 24, 2023

Copy link
Copy Markdown
Member

@Novakov

Is it possible for you to rebase to git master now that #965 has been merged? Thanks. I will see if I can test this PR.

@mcuee

mcuee commented Jan 24, 2023 •

Copy link
Copy Markdown
Member

This is not a test for the purpose of this PR (using two applications to access different interfaces of the same device), but rather to show some behavior differences of this PR with git master.

Test device: Raspberry Pi Pico W with CicrcuitPython FW. I have used WinUSB driver to replace the Mass Storage driver (Interface 2), the CDC-ACM driver (Interface 0/1, with IAD) and the USB Audion Driver (Interface 4/5, no IAD). Interface 3 is using USB HID driver (USB HID Keyboard).

Take note Claiming Interface 5 will fail as it is not using IAD -- therefore PR #965 will not help.

PS C:\work\libusb\libusb_pr1181> .\examples\xusb.exe 239a:8120
Using libusb v1.0.24.11644

Opening device 239A:8120...
libusb: warning [hid_open] could not open HID device in R/W mode (keyboard or mouse?) - trying without

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 3
           VID:PID: 239A:8120
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading BOS descriptor: libusb: info [winusbx_ensure_dev_handle] Late opening device handle for interface 0, path: '\\?\USB#VID_239A&PID_8120&MI_00#7&1F881456&0&0000#{A9CBA50B-208C-BE9A-09AE-21D5FD6C571F}'

libusb: info [winusbx_release_interface] closing device handle '\\?\USB#VID_239A&PID_8120#E66141040387422B#{A5DCBF10-6530-11D2-901F-00C04FB951ED}'

no descriptor

Reading first configuration descriptor:
             nb interfaces: 6
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.00
       endpoint[0].address: 81
           max packet size: 0040
          polling interval: 10
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 02
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 82
           max packet size: 0040
          polling interval: 00
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 83
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 03
           max packet size: 0040
          polling interval: 00
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 03.00.00
       endpoint[0].address: 84
           max packet size: 0040
          polling interval: 08
       endpoint[1].address: 04
           max packet size: 0040
          polling interval: 08
              interface[4]: id = 4
interface[4].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 01.01.00
              interface[5]: id = 5
interface[5].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 01.03.00
       endpoint[0].address: 05
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 85
           max packet size: 0040
          polling interval: 00

Kernel driver attached for interface 0: -12

Claiming interface 0...
libusb: info [winusbx_ensure_dev_handle] Late opening device handle for interface 0, path: '\\?\USB#VID_239A&PID_8120&MI_00#7&1F881456&0&0000#{A9CBA50B-208C-BE9A-09AE-21D5FD6C571F}'


Kernel driver attached for interface 1: -12

Claiming interface 1...

Kernel driver attached for interface 2: -12

Claiming interface 2...
libusb: info [winusbx_ensure_dev_handle] Late opening device handle for interface 2, path: '\\?\USB#VID_239A&PID_8120&MI_02#7&1F881456&0&0002#{7F0E090D-155E-CB25-0AA7-F8FAC1F4F499}'


Kernel driver attached for interface 3: -12

Claiming interface 3...

Kernel driver attached for interface 4: -12

Claiming interface 4...
libusb: info [winusbx_ensure_dev_handle] Late opening device handle for interface 4, path: '\\?\USB#VID_239A&PID_8120&MI_04#7&1F881456&0&0004#{FD46223B-D260-141A-A3B5-B1D9FCF25FDA}'


Kernel driver attached for interface 5: -12

Claiming interface 5...
   Failed.

Reading string descriptors:
   String (0x01): "Raspberry Pi"
   String (0x02): "Pico W"
   String (0x03): "E66141040387422B"

Reading interface association descriptors (IADs) for first configuration:
    nb IADs: 1
      IAD 0:
            bFirstInterface: 0
            bInterfaceCount: 2
             bFunctionClass: 02
          bFunctionSubClass: 02
          bFunctionProtocol: 00
                  iFunction: 0
Reading Max LUN:
   Failed: Pipe error   Max LUN = 154
Sending Inquiry:
   sent 6 CDB bytes
   Operation timed out
   Input/Output Error

PS C:\work\libusb\libusb> .\examples\xusb.exe 239a:8120
Using libusb v1.0.26.11778

Opening device 239A:8120...
libusb: warning [hid_open] could not open HID device in R/W mode (keyboard or mouse?) - trying without

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 3
           VID:PID: 239A:8120
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading BOS descriptor: no descriptor

Reading first configuration descriptor:
              total length: 218
         descriptor length: 9
             nb interfaces: 6
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.00
       endpoint[0].address: 81
           max packet size: 0040
          polling interval: 10
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 02
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 82
           max packet size: 0040
          polling interval: 00
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 83
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 03
           max packet size: 0040
          polling interval: 00
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 03.00.00
       endpoint[0].address: 84
           max packet size: 0040
          polling interval: 08
       endpoint[1].address: 04
           max packet size: 0040
          polling interval: 08
              interface[4]: id = 4
interface[4].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 01.01.00
              interface[5]: id = 5
interface[5].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 01.03.00
       endpoint[0].address: 05
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 85
           max packet size: 0040
          polling interval: 00

Kernel driver attached for interface 0: -12

Claiming interface 0...

Kernel driver attached for interface 1: -12

Claiming interface 1...

Kernel driver attached for interface 2: -12

Claiming interface 2...

Kernel driver attached for interface 3: -12

Claiming interface 3...

Kernel driver attached for interface 4: -12

Claiming interface 4...

Kernel driver attached for interface 5: -12

Claiming interface 5...
   Failed.

Reading string descriptors:
   String (0x01): "Raspberry Pi"
   String (0x02): "Pico W"
   String (0x03): "E66141040387422B"

Reading OS string descriptor: no descriptor

Reading interface association descriptors (IADs) for first configuration:
    nb IADs: 1
      IAD 0:
            bFirstInterface: 0
            bInterfaceCount: 2
             bFunctionClass: 02
          bFunctionSubClass: 02
          bFunctionProtocol: 00
                  iFunction: 0

Reading Max LUN:
   Failed: Pipe error   Max LUN = 10

Sending Inquiry:
   sent 6 CDB bytes
   Operation timed out
   Input/Output Error

@mcuee

mcuee commented Jan 24, 2023

Copy link
Copy Markdown
Member

@Novakov

Please take a look at my test result and see if the differences are expected. Thanks.

@Novakov
Novakov force-pushed the winusb-lazy-create-file branch from fe8cae8 to 26b5740 Compare January 24, 2023 19:40
@Novakov

Novakov commented Jan 24, 2023

Copy link
Copy Markdown
Author

@mcuee Branch rebased with changes as requested by @tormodvolden applied. I still need to do some testing but I would like to at least let you proceed with code review.

I don't see any dangerous differences in outputs you provided. Probably verbosity of logs is a bit to high (will reduce them to debug). Could you re-run xusb with rebased branch? I assume that lack of "Reading OS string descriptor" is caused by not-including something that was added recently. I don't quite understand what Max LUN is and why it is different (it should be the same?)

@Novakov
Novakov force-pushed the winusb-lazy-create-file branch from 26b5740 to d67cf68 Compare January 24, 2023 19:52
@mcuee

mcuee commented Jan 25, 2023

Copy link
Copy Markdown
Member

@Novakov

Great. Now I do not see differences between git master and this PR. Ignore the MAX LUN number as it seems to be random -- it seems to me the USB Mass Storage in this Circuit Python FW is not compliant and the number is random.

PS C:\work\libusb> .\libusb_pr1181\examples\xusb.exe 239a:8120
Using libusb v1.0.26.11778

Opening device 239A:8120...
libusb: warning [hid_open] could not open HID device in R/W mode (keyboard or mouse?) - trying without

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 3
           VID:PID: 239A:8120
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading BOS descriptor: no descriptor

Reading first configuration descriptor:
              total length: 218
         descriptor length: 9
             nb interfaces: 6
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.00
       endpoint[0].address: 81
           max packet size: 0040
          polling interval: 10
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 02
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 82
           max packet size: 0040
          polling interval: 00
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 83
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 03
           max packet size: 0040
          polling interval: 00
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 03.00.00
       endpoint[0].address: 84
           max packet size: 0040
          polling interval: 08
       endpoint[1].address: 04
           max packet size: 0040
          polling interval: 08
              interface[4]: id = 4
interface[4].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 01.01.00
              interface[5]: id = 5
interface[5].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 01.03.00
       endpoint[0].address: 05
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 85
           max packet size: 0040
          polling interval: 00

Kernel driver attached for interface 0: -12

Claiming interface 0...

Kernel driver attached for interface 1: -12

Claiming interface 1...

Kernel driver attached for interface 2: -12

Claiming interface 2...

Kernel driver attached for interface 3: -12

Claiming interface 3...

Kernel driver attached for interface 4: -12

Claiming interface 4...

Kernel driver attached for interface 5: -12

Claiming interface 5...
   Failed.

Reading string descriptors:
   String (0x01): "Raspberry Pi"
   String (0x02): "Pico W"
   String (0x03): "E661410403559F31"

Reading OS string descriptor: no descriptor

Reading interface association descriptors (IADs) for first configuration:
    nb IADs: 1
      IAD 0:
            bFirstInterface: 0
            bInterfaceCount: 2
             bFunctionClass: 02
          bFunctionSubClass: 02
          bFunctionProtocol: 00
                  iFunction: 0

Reading Max LUN:
   Failed: Pipe error   Max LUN = 23

Sending Inquiry:
   sent 6 CDB bytes
   Operation timed out
   Input/Output Error

@mcuee

mcuee commented Aug 23, 2025

Copy link
Copy Markdown
Member

@tormodvolden and @sonatique

Please take a look at this PR when you got the time. Thanks.

alex-luxonis added a commit to luxonis/XLink that referenced this pull request Feb 23, 2026
@mcuee mcuee added this to the 1.0.31 milestone Mar 1, 2026
@mcuee

mcuee commented Mar 7, 2026

Copy link
Copy Markdown
Member

I have set this for milestone 1.0.31.

But we need to wait for the review of the other maintainers like @sonatique.

@asahtik

asahtik commented Apr 28, 2026

Copy link
Copy Markdown

Hi, I'm trying to debug a Windows app regression I found after using this PR and was hoping that someone smarter than me would help me understand something. What happens here if I try to claim an interface while already claimed?

static int winusb_claim_interface(struct libusb_device_handle *dev_handle, uint8_t iface)
{
	struct winusb_device_priv *priv = usbi_get_device_priv(dev_handle->dev);
	int r;

	CHECK_SUPPORTED_API(priv->apib, claim_interface);

	safe_free(priv->usb_interface[iface].endpoint);
	priv->usb_interface[iface].nb_endpoints = 0;

	r = priv->apib->claim_interface(SUB_API_NOTSET, dev_handle, iface);

	if (r == LIBUSB_SUCCESS)
		r = windows_assign_endpoints(dev_handle, iface, 0);

	return r;
}

If I understand correctly safe_free and nb_endpoints = 0 modify shared state before even checking if the interface is busy. Is this correct? If I remove these two lines I get the same behaviour as before using the PR, but that probably breaks other stuff. This PR does not modify this particular function but the changes somehow affect its behaviour.

@mcuee

mcuee commented May 18, 2026

Copy link
Copy Markdown
Member

@Novakov

Please help to rebase to the latest git when you got the time. Thanks.

@mcuee

mcuee commented May 18, 2026

Copy link
Copy Markdown
Member

Using the tip from @tormodvolden here.

PS C:\work\libusb\libusb_test> git clone https://github.com/libusb/libusb.git libusb_pr1181_rebase
Cloning into 'libusb_pr1181_rebase'...
remote: Enumerating objects: 18596, done.
remote: Counting objects: 100% (285/285), done.
remote: Compressing objects: 100% (170/170), done.
remote: Total 18596 (delta 195), reused 117 (delta 115), pack-reused 18311 (from 4)
Receiving objects: 100% (18596/18596), 5.88 MiB | 20.63 MiB/s, done.
Resolving deltas: 100% (13230/13230), done.

PS C:\work\libusb\libusb_test> cd .\libusb_pr1181_rebase\

PS C:\work\libusb\libusb_test\libusb_pr1181_rebase> git fetch origin pull/1181/head
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 6 (delta 5), reused 5 (delta 5), pack-reused 1 (from 1)
Unpacking objects: 100% (6/6), 2.16 KiB | 201.00 KiB/s, done.
From https://github.com/libusb/libusb
 * branch              refs/pull/1181/head -> FETCH_HEAD
 * 
PS C:\work\libusb\libusb_test\libusb_pr1181_rebase> git checkout -b pr1181_rebase FETCH_HEAD
Switched to a new branch 'pr1181_rebase'

PS C:\work\libusb\libusb_test\libusb_pr1181_rebase> git rebase origin/master
Successfully rebased and updated refs/heads/pr1181_rebase.

@mcuee

mcuee commented May 18, 2026 •

Copy link
Copy Markdown
Member

This does not seem to work cannot with ST-Link under ARM64 with manually install WInUSB driver (ST does not provide the driver for ARM64). Same as libusb git.
pbatard/libwdi#289 (comment)

Not so sure if it is linked to the following or not.

PS C:\work\libusb\libusb_test\libusb_pr1181_rebase> .\build\v145\ARM64\Release-Hotplug-MT\xusb.exe 0483:3752
Using libusb v1.0.30.12037

Opening device 0483:3752...
  Failed.

PS C:\work\libusb\libusb> .\build\v145\ARM64\Release-Hotplug-MT\xusb.exe 0483:3752
Using libusb v1.0.30.12037

Opening device 0483:3752...
  Failed.

USBView ARM64 output.

Details
[Port1]  :  USB Composite Device


Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            1
Companion Hub Symbolic Link Name: USB#VID_05E3&PID_0625#5&152f0596&0&2#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0


       ---===>USB4 Information<===---
Root hub port is USB4 Capable:     No
Device is tunneled through USB4:   No

       ---===>Device Information<===---
English product name: "STM32 STLink"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: Full (is not SuperSpeed or higher capable)
Device Address:                    0x05
Open Pipes:                           6

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0xEF  -> This is a Multi-interface Function Code Device
bDeviceSubClass:                   0x02  -> This is the Common Class Sub Class
bDeviceProtocol:                   0x01  -> This is the Interface Association Descriptor protocol
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x0483 = STMicroelectronics
idProduct:                       0x3752
bcdDevice:                       0x0100
iManufacturer:                     0x01
     English (United States)  "STMicroelectronics"
iProduct:                          0x02
     English (United States)  "STM32 STLink"
iSerialNumber:                     0x03
     English (United States)  "0670FF504955857567103926"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0020 = 0x20 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x84  -> Direction: IN - EndpointID: 4
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 0x08 bytes
bInterval:                         0x10

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x05  -> Direction: OUT - EndpointID: 5
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x85  -> Direction: IN - EndpointID: 5
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0069  -> Validated
bNumInterfaces:                    0x03
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0x80  -> Bus Powered
MaxPower:                          0x96 = 300 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x03
bInterfaceClass:                   0xFF  -> Interface Class Unknown to USBView
bInterfaceSubClass:                0xFF
bInterfaceProtocol:                0xFF
iInterface:                        0x04
     English (United States)  "ST-Link Debug"

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0020 = 0x20 bytes
bInterval:                         0x00

          ===>IAD Descriptor<===
bLength:                           0x08
bDescriptorType:                   0x0B
bFirstInterface:                   0x01
bInterfaceCount:                   0x02
bFunctionClass:                    0x02  -> This is Communications (CDC Control) USB Device Interface Class
bFunctionSubClass:                 0x02
bFunctionProtocol:                 0x01
iFunction:                         0x06
     English (United States)  "ST-Link VCP Ctrl"

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x00
bNumEndpoints:                     0x01
bInterfaceClass:                   0x02  -> This is Communications (CDC Control) USB Device Interface Class
bInterfaceSubClass:                0x02
bInterfaceProtocol:                0x01
iInterface:                        0x06
     English (United States)  "ST-Link VCP Ctrl"
  -> This is a Communications (CDC Control) USB Device Interface Class

          ===>Descriptor Hex Dump<===
bLength:                           0x05
bDescriptorType:                   0x24
05 24 00 10 01 
  -> This is a Communications (CDC Control) USB Device Interface Class

          ===>Descriptor Hex Dump<===
bLength:                           0x05
bDescriptorType:                   0x24
05 24 01 00 02 
  -> This is a Communications (CDC Control) USB Device Interface Class

          ===>Descriptor Hex Dump<===
bLength:                           0x04
bDescriptorType:                   0x24
04 24 02 06 
  -> This is a Communications (CDC Control) USB Device Interface Class

          ===>Descriptor Hex Dump<===
bLength:                           0x05
bDescriptorType:                   0x24
05 24 06 01 02 

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x84  -> Direction: IN - EndpointID: 4
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0008 = 0x08 bytes
bInterval:                         0x10

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x02
bAlternateSetting:                 0x00
bNumEndpoints:                     0x02
bInterfaceClass:                   0x0A  -> This is a CDC Data USB Device Interface Class
bInterfaceSubClass:                0x00
bInterfaceProtocol:                0x00
iInterface:                        0x07
     English (United States)  "ST-Link VCP Data"

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x05  -> Direction: OUT - EndpointID: 5
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x85  -> Direction: IN - EndpointID: 5
bmAttributes:                      0x02  -> Bulk Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x00

Windows manages each sub-device of composite device as separate device -
each one requires separate call to CreateFile to obtain dev_handle.
Opening all sub-devices eagerly prevents other applications for
accessing any sub-device even if application that opened the device is
not using them.

This commit modifies WinUSB backend to call CreateFile lazily, so device
handle is opened when necessary (by claiming the interface) and release as
soon as possible (by releasing the interface).

Implementation details:
* winusbx_open becomes essentially no-operation
* winusbx_claim_interface ensures that device handle is opened
* interface used to initialize WinUSB handle has associated counter of
  claimed interfaces
* claiming and releasing interfaces modifies ref-counter accordingly
* when counter reaches zero on releasing interface, device handle is
  closed

Signed-off-by: Maciej Nowak <maciejt.nowak@gmail.com>
@Novakov
Novakov force-pushed the winusb-lazy-create-file branch from 43d16cd to 6abbc4f Compare May 23, 2026 17:21
@Novakov

Novakov commented May 23, 2026

Copy link
Copy Markdown
Author

Please help to rebase to the latest git when you got the time. Thanks.

I've rebased branch on top of master but did not run any tests.

As this PR is nearing four years I would like to recommend anyone who is affected by this bug to use Rust's crate nusb (https://github.com/kevinmehall/nusb) - it does not use libusb underneath and do not have problem with concurrent access to composite devices.

@mcuee

mcuee commented May 25, 2026

Copy link
Copy Markdown
Member

I've rebased branch on top of master but did not run any tests.

As this PR is nearing four years I would like to recommend anyone who is affected by this bug to use Rust's crate nusb (https://github.com/kevinmehall/nusb) - it does not use libusb underneath and do not have problem with concurrent access to composite devices.

Thanks for the update.

Unfortunately libusb project was without a real Windows backend maintainer from March 2021 to Aug 2025, until @sonatique came on board in Aug 2025.

Main Windows developers for libusb project:
Pete Batard (pbatard) 2009-2016
Chris Dickens (dickens) 2014 - Feb 2021
Tormod Volden (tormodvolden) acting Windows developer in between.
Sylvain Fasel (sonatique) Aug 2025 - Now

initialized_iface = 0;
}

usbi_dbg(ctx, "libusb: release_interface(%p, %d) initialized_iface=%d claimed_count = %d", dev_handle, iface, initialized_iface, handle_priv->interface_handle[initialized_iface].claimed_interfaces_count);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"libusb: " prefix makes me think that this is maybe a leftover instrumentation debug rather than a debug we need to merge. Should be trimed or droped

@maxtruxa

maxtruxa commented Jun 5, 2026

Copy link
Copy Markdown

Tested together with #1830, works great!

@maxtruxa

Copy link
Copy Markdown

Correction: This change causes a crash on libusb_close() if the device has multiple interfaces in a single functional group (IAD) and one (or more) of those interfaces were claimed. I will test this further and try to come up with a working patch.

@sonatique

Copy link
Copy Markdown
Member

@maxtruxa : any news from your further tests ?

@mcuee

mcuee commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Seem to work for the following device.

 libusb_pr1181  .\build\v145\x64\Release-Hotplug-MT\xusb.exe 1BCF:2BB4
Using libusb v1.0.30.12037

libusb: info [winusbx_init] WinUSB DLL available (with isoch support)
libusb: info [windows_init] UsbDk backend is not available
Opening device 1BCF:2BB4...

Reading device descriptor:
            length: 18
      device class: 239
               S/N: 3
           VID:PID: 1BCF:2BB4
         bcdDevice: 3481
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading BOS descriptor: 2 caps
    Platform descriptor:
      bLength                : 28
      PlatformCapabilityUUID : {df60ddd8-8945-c74c-9cd2-659d9e648a9f}

  00000000  00 00 03 06 d4 05 01 00                          ........

    Unknown BOS device capability 11:

Reading first configuration descriptor:
              total length: 1059
         descriptor length: 9
             nb interfaces: 5
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 0E.01.01
       endpoint[0].address: 87
           max packet size: 0010
          polling interval: 08
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 0E.02.01
interface[1].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 00C0
          polling interval: 01
interface[1].altsetting[2]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0180
          polling interval: 01
interface[1].altsetting[3]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 01
interface[1].altsetting[4]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0280
          polling interval: 01
interface[1].altsetting[5]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0320
          polling interval: 01
interface[1].altsetting[6]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 03B0
          polling interval: 01
interface[1].altsetting[7]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0A80
          polling interval: 01
interface[1].altsetting[8]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0B20
          polling interval: 01
interface[1].altsetting[9]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0BE0
          polling interval: 01
interface[1].altsetting[10]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 13C0
          polling interval: 01
interface[1].altsetting[11]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 13FC
          polling interval: 01
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 0E.01.01
       endpoint[0].address: 84
           max packet size: 0010
          polling interval: 08
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 0E.02.01
interface[3].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 82
           max packet size: 0A80
          polling interval: 01
              interface[4]: id = 4
interface[4].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: FE.01.01

Kernel driver attached for interface 0: (not supported)

Claiming interface 0...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 1: (not supported)

Claiming interface 1...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 2: (not supported)

Claiming interface 2...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 3: (not supported)

Claiming interface 3...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 4: (not supported)

Claiming interface 4...

Reading string descriptors:
   String (0x01): "CN03N9728LU00548DCG8A00"
   String (0x02): "Integrated_Webcam_FHD"
   String (0x03): "01.00.00"

Reading OS string descriptor:

Reading Extended Compat ID OS Feature Descriptor (wIndex = 0x0004):
   Failed: Pipe error
Reading interface association descriptors (IADs) for first configuration:
    nb IADs: 2
      IAD 0:
            bFirstInterface: 0
            bInterfaceCount: 2
             bFunctionClass: 0E
          bFunctionSubClass: 03
          bFunctionProtocol: 00
                  iFunction: 4 (Integrated Webcam)
      IAD 1:
            bFirstInterface: 2
            bInterfaceCount: 2
             bFunctionClass: 0E
          bFunctionSubClass: 03
          bFunctionProtocol: 00
                  iFunction: 11 (Integrated IR Webcam)

Releasing interface 0...
Releasing interface 1...
Releasing interface 2...
Releasing interface 3...
Releasing interface 4...
Closing device...

Microsoft USBview output.

Details
[Port3]  :  USB Composite Device


Is Port User Connectable:         no
Is Port Debug Capable:            no
Companion Port Number:            0
Companion Hub Symbolic Link Name: 
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "Integrated_Webcam_FHD"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: High (is not SuperSpeed or higher capable)
Device Address:                    0x01
Open Pipes:                           2

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0201
bDeviceClass:                      0xEF  -> This is a Multi-interface Function Code Device
bDeviceSubClass:                   0x02  -> This is the Common Class Sub Class
bDeviceProtocol:                   0x01  -> This is the Interface Association Descriptor protocol
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x1BCF = Sunplus Innovation Technology Inc.
idProduct:                       0x2BB4
bcdDevice:                       0x3481
iManufacturer:                     0x01
     English (United States)  "CN03N9728LU00548DCG8A00"
iProduct:                          0x02
     English (United States)  "Integrated_Webcam_FHD"
iSerialNumber:                     0x03
     English (United States)  "01.00.00"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x87  -> Direction: IN - EndpointID: 7
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0010 = 1 transactions per microframe, 0x10 max bytes
bInterval:                         0x08

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x84  -> Direction: IN - EndpointID: 4
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0010 = 1 transactions per microframe, 0x10 max bytes
bInterval:                         0x08

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0423  -> Validated
bNumInterfaces:                    0x05
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0x80  -> Bus Powered
MaxPower:                          0xFA = 500 mA

          ===>IAD Descriptor<===
bLength:                           0x08
bDescriptorType:                   0x0B
bFirstInterface:                   0x00
bInterfaceCount:                   0x02
bFunctionClass:                    0x0E  -> Video Interface Class
bFunctionSubClass:                 0x03  -> Video Interface Collection
bFunctionProtocol:                 0x00  -> PC_PROTOCOL_UNDEFINED protocol
iFunction:                         0x04
     English (United States)  "Integrated Webcam"

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x01  -> Video Control Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x04
     English (United States)  "Integrated Webcam"

          ===>Class-Specific Video Control Interface Header Descriptor<===
bLength:                           0x0D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x01
bcdUVC:                          0x0150
wTotalLength:                    0x006F  -> Validated
dwClockFreq:                 0x02DC6C00 = (48000000) Hz
bInCollection:                     0x01
baInterfaceNr[1]:                  0x01
USB Video Class device: spec version 1.5

          ===>Video Control Input Terminal Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x24
bDescriptorSubtype:                0x02
bTerminalID:                       0x01
wTerminalType:                   0x0201 = (ITT_CAMERA)
bAssocTerminal:                    0x00
iTerminal:                         0x00
===>Camera Input Terminal Data
wObjectiveFocalLengthMin:        0x0000
wObjectiveFocalLengthMax:        0x0000
wOcularFocalLength:              0x0000
bControlSize:                      0x03
bmControls : 0x0E 0x00 0x24 
     D00 = 0   no -  Scanning Mode
     D01 = 1  yes -  Auto-Exposure Mode
     D02 = 1  yes -  Auto-Exposure Priority
     D03 = 1  yes -  Exposure Time (Absolute)
     D04 = 0   no -  Exposure Time (Relative)
     D05 = 0   no -  Focus (Absolute)
     D06 = 0   no -  Focus (Relative)
     D07 = 0   no -  Iris (Absolute)
     D08 = 0   no -  Iris (Relative)
     D09 = 0   no -  Zoom (Absolute)
     D10 = 0   no -  Zoom (Relative)
     D11 = 0   no -  PanTilt (Absolute)
     D12 = 0   no -  PanTilt (Relative)
     D13 = 0   no -  Roll (Absolute)
     D14 = 0   no -  Roll (Relative)
     D15 = 0   no -  Reserved
     D16 = 0   no -  Reserved
     D17 = 0   no -  Focus, Auto
     D18 = 1  yes -  Privacy
     D19 = 0   no -  Focus, Simple
     D20 = 0   no -  Window
     D21 = 1  yes -  Region of Interest
     D22 = 0   no -  Reserved
     D23 = 0   no -  Reserved

          ===>Video Control Processing Unit Descriptor<===
bLength:                           0x0D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bUnitID:                           0x02
bSourceID:                         0x01
wMaxMultiplier:                  0x4000
bControlSize:                      0x03
bmControls : 0x7F 0x17 0x00 
     D00 = 1  yes -  Brightness
     D01 = 1  yes -  Contrast
     D02 = 1  yes -  Hue
     D03 = 1  yes -  Saturation
     D04 = 1  yes -  Sharpness
     D05 = 1  yes -  Gamma
     D06 = 1  yes -  White Balance Temperature
     D07 = 0   no -  White Balance Component
     D08 = 1  yes -  Backlight Compensation
     D09 = 1  yes -  Gain
     D10 = 1  yes -  Power Line Frequency
     D11 = 0   no -  Hue, Auto
     D12 = 1  yes -  White Balance Temperature, Auto
     D13 = 0   no -  White Balance Component, Auto
     D14 = 0   no -  Digital Multiplier
     D15 = 0   no -  Digital Multiplier Limit
     D16 = 0   no -  Analog Video Standard
     D17 = 0   no -  Analog Video Lock Status
     D18 = 0   no -  Contrast, Auto
     D19 = 0   no -  Reserved
     D20 = 0   no -  Reserved
     D21 = 0   no -  Reserved
     D22 = 0   no -  Reserved
     D23 = 0   no -  Reserved
iProcessing :                      0x00
bmVideoStandards :                 0x00 
     D00 = 0   no -  None
     D01 = 0   no -  NTSC  - 525/60
     D02 = 0   no -  PAL   - 625/50
     D03 = 0   no -  SECAM - 625/50
     D04 = 0   no -  NTSC  - 625/50
     D05 = 0   no -  PAL   - 525/60
     D06 = 0   no -  Reserved
     D07 = 0   no -  Reserved

          ===>Video Control Extension Unit Descriptor<===
bLength:                           0x1D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bUnitID:                           0x03
guidExtensionCode:                 {0FB885C3-68C2-4547-90F7-8F47579D95FC}
bNumControls:                      0x05
bNrInPins:                         0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]:                     0x02
bControlSize:                      0x04
bmControls : 0x1F 0x00 0x00 0x00 
     D00 = 1  yes -  Vendor-Specific (Optional)
     D01 = 1  yes -  Vendor-Specific (Optional)
     D02 = 1  yes -  Vendor-Specific (Optional)
     D03 = 1  yes -  Vendor-Specific (Optional)
     D04 = 1  yes -  Vendor-Specific (Optional)
     D05 = 0   no -  Vendor-Specific (Optional)
     D06 = 0   no -  Vendor-Specific (Optional)
     D07 = 0   no -  Vendor-Specific (Optional)
     D08 = 0   no -  Vendor-Specific (Optional)
     D09 = 0   no -  Vendor-Specific (Optional)
     D10 = 0   no -  Vendor-Specific (Optional)
     D11 = 0   no -  Vendor-Specific (Optional)
     D12 = 0   no -  Vendor-Specific (Optional)
     D13 = 0   no -  Vendor-Specific (Optional)
     D14 = 0   no -  Vendor-Specific (Optional)
     D15 = 0   no -  Vendor-Specific (Optional)
     D16 = 0   no -  Vendor-Specific (Optional)
     D17 = 0   no -  Vendor-Specific (Optional)
     D18 = 0   no -  Vendor-Specific (Optional)
     D19 = 0   no -  Vendor-Specific (Optional)
     D20 = 0   no -  Vendor-Specific (Optional)
     D21 = 0   no -  Vendor-Specific (Optional)
     D22 = 0   no -  Vendor-Specific (Optional)
     D23 = 0   no -  Vendor-Specific (Optional)
     D24 = 0   no -  Vendor-Specific (Optional)
     D25 = 0   no -  Vendor-Specific (Optional)
     D26 = 0   no -  Vendor-Specific (Optional)
     D27 = 0   no -  Vendor-Specific (Optional)
     D28 = 0   no -  Vendor-Specific (Optional)
     D29 = 0   no -  Vendor-Specific (Optional)
     D30 = 0   no -  Vendor-Specific (Optional)
     D31 = 0   no -  Vendor-Specific (Optional)
iExtension:                        0x00

          ===>Video Control Extension Unit Descriptor<===
bLength:                           0x1D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bUnitID:                           0x04
guidExtensionCode:                 {63610682-5070-49AB-B8CC-B3855E8D221D}
bNumControls:                      0x10
bNrInPins:                         0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]:                     0x03
bControlSize:                      0x04
bmControls : 0xFF 0x70 0x00 0x37 
     D00 = 1  yes -  Vendor-Specific (Optional)
     D01 = 1  yes -  Vendor-Specific (Optional)
     D02 = 1  yes -  Vendor-Specific (Optional)
     D03 = 1  yes -  Vendor-Specific (Optional)
     D04 = 1  yes -  Vendor-Specific (Optional)
     D05 = 1  yes -  Vendor-Specific (Optional)
     D06 = 1  yes -  Vendor-Specific (Optional)
     D07 = 1  yes -  Vendor-Specific (Optional)
     D08 = 0   no -  Vendor-Specific (Optional)
     D09 = 0   no -  Vendor-Specific (Optional)
     D10 = 0   no -  Vendor-Specific (Optional)
     D11 = 0   no -  Vendor-Specific (Optional)
     D12 = 1  yes -  Vendor-Specific (Optional)
     D13 = 1  yes -  Vendor-Specific (Optional)
     D14 = 1  yes -  Vendor-Specific (Optional)
     D15 = 0   no -  Vendor-Specific (Optional)
     D16 = 0   no -  Vendor-Specific (Optional)
     D17 = 0   no -  Vendor-Specific (Optional)
     D18 = 0   no -  Vendor-Specific (Optional)
     D19 = 0   no -  Vendor-Specific (Optional)
     D20 = 0   no -  Vendor-Specific (Optional)
     D21 = 0   no -  Vendor-Specific (Optional)
     D22 = 0   no -  Vendor-Specific (Optional)
     D23 = 0   no -  Vendor-Specific (Optional)
     D24 = 1  yes -  Vendor-Specific (Optional)
     D25 = 1  yes -  Vendor-Specific (Optional)
     D26 = 1  yes -  Vendor-Specific (Optional)
     D27 = 0   no -  Vendor-Specific (Optional)
     D28 = 1  yes -  Vendor-Specific (Optional)
     D29 = 1  yes -  Vendor-Specific (Optional)
     D30 = 0   no -  Vendor-Specific (Optional)
     D31 = 0   no -  Vendor-Specific (Optional)
iExtension:                        0x00

          ===>Video Control Output Terminal Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x24
bDescriptorSubtype:                0x03
bTerminalID:                       0x05
wTerminalType:                   0x0101 = (TT_STREAMING)
bAssocTerminal:                    0x00
bSourceID:                         0x04
iTerminal:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x87  -> Direction: IN - EndpointID: 7
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0010 = 1 transactions per microframe, 0x10 max bytes
bInterval:                         0x08

          ===>Class-specific VC Interrupt Endpoint Descriptor<===
bLength:                           0x05 
bDescriptorType:                   0x25
bDescriptorSubtype:                0x03
wMaxTransferSize:                0x0405 = (1029) Bytes

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x00
bNumEndpoints:                     0x00
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Video Class-Specific VS Video Input Header Descriptor<===
bLength:                           0x0F
bDescriptorType:                   0x24
bDescriptorSubtype:                0x01
bNumFormats:                       0x02
wTotalLength:                    0x01A9  -> Validated
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmInfo:                            0x00  -> Dynamic Format Change not Supported
bTerminalLink:                     0x05
bStillCaptureMethod:               0x01  -> Still Capture Method 1
bTriggerSupport:                   0x00  -> No Hardware Triggering Support
bTriggerUsage:                     0x00
bControlSize:                      0x01
Video Payload Format 1             0x04 
     D00 = 0   no -  Key Frame Rate
     D01 = 0   no -  P Frame Rate
     D02 = 1  yes -  Compression Quality
     D03 = 0   no -  Compression Window Size
     D04 = 0   no -  Generate Key Frame
     D05 = 0   no -  Update Frame Segment
     D06 = 0   no -  Reserved
     D07 = 0   no -  Reserved
Video Payload Format 2             0x00 
     D00 = 0   no -  Key Frame Rate
     D01 = 0   no -  P Frame Rate
     D02 = 0   no -  Compression Quality
     D03 = 0   no -  Compression Window Size
     D04 = 0   no -  Generate Key Frame
     D05 = 0   no -  Update Frame Segment
     D06 = 0   no -  Reserved
     D07 = 0   no -  Reserved

          ===>Video Streaming MJPEG Format Type Descriptor<===
bLength:                           0x0B
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bFormatIndex:                      0x01
bNumFrameDescriptors:              0x05
bmFlags:                           0x01  -> Sample Size is Fixed
bDefaultFrameIndex:                0x01
bAspectRatioX:                     0x00
bAspectRatioY:                     0x00
bmInterlaceFlags:                  0x00
     D00   = 0  non-Interlaced stream or variable
     D01   = 0  2 fields per frame
     D02   = 0  Field 1 not first
     D03   = 0  Reserved
     D4..5 = 0  Field patterns  -> Field 1 only
     D6..7 = 0  Display Mode  -> Bob only
bCopyProtect:                      0x00  -> Duplication Unrestricted

          ===>Video Streaming MJPEG Frame Type Descriptor<===
          --->This is the Default (optimum) Frame index
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x01
bmCapabilities:                    0x01
wWidth:                          0x0780 = 1920
wHeight:                         0x0438 = 1080
dwMinBitRate:                0x3B538000
dwMaxBitRate:                0x3B538000
dwMaxVideoFrameBufferSize:   0x003F4800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x02
bmCapabilities:                    0x01
wWidth:                          0x0500 = 1280
wHeight:                         0x03C0 = 960
dwMinBitRate:                0x23280000
dwMaxBitRate:                0x23280000
dwMaxVideoFrameBufferSize:   0x00258000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x03
bmCapabilities:                    0x01
wWidth:                          0x0500 = 1280
wHeight:                         0x02D0 = 720
dwMinBitRate:                0x1A5E0000
dwMaxBitRate:                0x1A5E0000
dwMaxVideoFrameBufferSize:   0x001C2000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x04
bmCapabilities:                    0x01
wWidth:                          0x0280 = 640
wHeight:                         0x01E0 = 480
dwMinBitRate:                0x08CA0000
dwMaxBitRate:                0x08CA0000
dwMaxVideoFrameBufferSize:   0x00096000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming MJPEG Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x07
bFrameIndex:                       0x05
bmCapabilities:                    0x01
wWidth:                          0x0280 = 640
wHeight:                         0x0168 = 360
dwMinBitRate:                0x06978000
dwMaxBitRate:                0x06978000
dwMaxVideoFrameBufferSize:   0x00070800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame TypeData
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Color Matching Descriptor<===
bLength:                           0x06
bDescriptorType:                   0x24
bDescriptorSubtype:                0x0D
bColorPrimaries:                   0x01
bTransferCharacteristics:          0x01
bMatrixCoefficients:               0x04

          ===>Video Streaming Uncompressed Format Type Descriptor<===
bLength:                           0x1B
bDescriptorType:                   0x24
bDescriptorSubtype:                0x04
bFormatIndex:                      0x02
bNumFrameDescriptors:              0x07
guidFormat:                        {32595559-0000-0010-8000-00AA00389B71} = YUY2 Format
bBitsPerPixel:                     0x10
bDefaultFrameIndex:                0x01
bAspectRatioX:                     0x00
bAspectRatioY:                     0x00
bmInterlaceFlags:                  0x00
     D0    = 0x00 Interlaced stream or variable: No
     D1    = 0x00 Fields per frame: 2 fields
     D2    = 0x00 Field 1 first: No
     D3    = 0x00 Reserved
     D4..5 = 0x00 Field patterns  -> Field 1 only
     D6..7 = 0x00 Display Mode  -> Bob only
bCopyProtect:                      0x00  -> Duplication Unrestricted

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
          --->This is the Default (optimum) Frame index
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x01
bmCapabilities:                    0x01
wWidth:                          0x0280 = 640
wHeight:                         0x01E0 = 480
dwMinBitRate:                0x08CA0000
dwMaxBitRate:                0x08CA0000
dwMaxVideoFrameBufferSize:   0x00096000
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x02
bmCapabilities:                    0x01
wWidth:                          0x0280 = 640
wHeight:                         0x0168 = 360
dwMinBitRate:                0x06978000
dwMaxBitRate:                0x06978000
dwMaxVideoFrameBufferSize:   0x00070800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x03
bmCapabilities:                    0x01
wWidth:                          0x0140 = 320
wHeight:                         0x00F0 = 240
dwMinBitRate:                0x02328000
dwMaxBitRate:                0x02328000
dwMaxVideoFrameBufferSize:   0x00025800
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x04
bmCapabilities:                    0x01
wWidth:                          0x0140 = 320
wHeight:                         0x00B4 = 180
dwMinBitRate:                0x01A5E000
dwMaxBitRate:                0x01A5E000
dwMaxVideoFrameBufferSize:   0x0001C200
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x05
bmCapabilities:                    0x01
wWidth:                          0x00A0 = 160
wHeight:                         0x0078 = 120
dwMinBitRate:                0x008CA000
dwMaxBitRate:                0x008CA000
dwMaxVideoFrameBufferSize:   0x00009600
dwDefaultFrameInterval:      0x00051615 = 33.333300 mSec (30.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x00051615 = 33.333300 mSec (30.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x06
bmCapabilities:                    0x01
wWidth:                          0x0500 = 1280
wHeight:                         0x02D0 = 720
dwMinBitRate:                0x08CA0000
dwMaxBitRate:                0x08CA0000
dwMaxVideoFrameBufferSize:   0x001C2000
dwDefaultFrameInterval:      0x000F4240 = 100.000000 mSec (10.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x000F4240 = 100.000000 mSec (10.00 Hz)

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x07
bmCapabilities:                    0x01
wWidth:                          0x0780 = 1920
wHeight:                         0x0438 = 1080
dwMinBitRate:                0x09E34000
dwMaxBitRate:                0x09E34000
dwMaxVideoFrameBufferSize:   0x003F4800
dwDefaultFrameInterval:      0x001E8480 = 200.000000 mSec (5.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x001E8480 = 200.000000 mSec (5.00 Hz)

          ===>Color Matching Descriptor<===
bLength:                           0x06
bDescriptorType:                   0x24
bDescriptorSubtype:                0x0D
bColorPrimaries:                   0x01
bTransferCharacteristics:          0x01
bMatrixCoefficients:               0x04

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x01
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x00C0 = 1 transactions per microframe, 0xC0 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x02
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0180 = 1 transactions per microframe, 0x180 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x03
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0200 = 1 transactions per microframe, 0x200 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x04
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0280 = 1 transactions per microframe, 0x280 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x05
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0320 = 1 transactions per microframe, 0x320 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x06
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x03B0 = 1 transactions per microframe, 0x3B0 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x07
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0A80 = 2 transactions per microframe, 0x280 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x08
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0B20 = 2 transactions per microframe, 0x320 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x09
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0BE0 = 2 transactions per microframe, 0x3E0 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x0A
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x13C0 = 3 transactions per microframe, 0x3C0 max bytes
bInterval:                         0x01

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x01
bAlternateSetting:                 0x0B
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x13FC = 3 transactions per microframe, 0x3FC max bytes
bInterval:                         0x01

          ===>IAD Descriptor<===
bLength:                           0x08
bDescriptorType:                   0x0B
bFirstInterface:                   0x02
bInterfaceCount:                   0x02
bFunctionClass:                    0x0E  -> Video Interface Class
bFunctionSubClass:                 0x03  -> Video Interface Collection
bFunctionProtocol:                 0x00  -> PC_PROTOCOL_UNDEFINED protocol
iFunction:                         0x0B
     English (United States)  "Integrated IR Webcam"

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x02
bAlternateSetting:                 0x00
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x01  -> Video Control Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x0B
     English (United States)  "Integrated IR Webcam"

          ===>Class-Specific Video Control Interface Header Descriptor<===
bLength:                           0x0D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x01
bcdUVC:                          0x0150
wTotalLength:                    0x006F  -> Validated
dwClockFreq:                 0x02DC6C00 = (48000000) Hz
bInCollection:                     0x01
baInterfaceNr[1]:                  0x01
USB Video Class device: spec version 1.5

          ===>Video Control Input Terminal Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x24
bDescriptorSubtype:                0x02
bTerminalID:                       0x01
wTerminalType:                   0x0201 = (ITT_CAMERA)
bAssocTerminal:                    0x00
iTerminal:                         0x00
===>Camera Input Terminal Data
wObjectiveFocalLengthMin:        0x0000
wObjectiveFocalLengthMax:        0x0000
wOcularFocalLength:              0x0000
bControlSize:                      0x03
bmControls : 0x00 0x00 0x24 
     D00 = 0   no -  Scanning Mode
     D01 = 0   no -  Auto-Exposure Mode
     D02 = 0   no -  Auto-Exposure Priority
     D03 = 0   no -  Exposure Time (Absolute)
     D04 = 0   no -  Exposure Time (Relative)
     D05 = 0   no -  Focus (Absolute)
     D06 = 0   no -  Focus (Relative)
     D07 = 0   no -  Iris (Absolute)
     D08 = 0   no -  Iris (Relative)
     D09 = 0   no -  Zoom (Absolute)
     D10 = 0   no -  Zoom (Relative)
     D11 = 0   no -  PanTilt (Absolute)
     D12 = 0   no -  PanTilt (Relative)
     D13 = 0   no -  Roll (Absolute)
     D14 = 0   no -  Roll (Relative)
     D15 = 0   no -  Reserved
     D16 = 0   no -  Reserved
     D17 = 0   no -  Focus, Auto
     D18 = 1  yes -  Privacy
     D19 = 0   no -  Focus, Simple
     D20 = 0   no -  Window
     D21 = 1  yes -  Region of Interest
     D22 = 0   no -  Reserved
     D23 = 0   no -  Reserved

          ===>Video Control Processing Unit Descriptor<===
bLength:                           0x0D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bUnitID:                           0x02
bSourceID:                         0x01
wMaxMultiplier:                  0x4000
bControlSize:                      0x03
bmControls : 0x00 0x00 0x00 
     D00 = 0   no -  Brightness
     D01 = 0   no -  Contrast
     D02 = 0   no -  Hue
     D03 = 0   no -  Saturation
     D04 = 0   no -  Sharpness
     D05 = 0   no -  Gamma
     D06 = 0   no -  White Balance Temperature
     D07 = 0   no -  White Balance Component
     D08 = 0   no -  Backlight Compensation
     D09 = 0   no -  Gain
     D10 = 0   no -  Power Line Frequency
     D11 = 0   no -  Hue, Auto
     D12 = 0   no -  White Balance Temperature, Auto
     D13 = 0   no -  White Balance Component, Auto
     D14 = 0   no -  Digital Multiplier
     D15 = 0   no -  Digital Multiplier Limit
     D16 = 0   no -  Analog Video Standard
     D17 = 0   no -  Analog Video Lock Status
     D18 = 0   no -  Contrast, Auto
     D19 = 0   no -  Reserved
     D20 = 0   no -  Reserved
     D21 = 0   no -  Reserved
     D22 = 0   no -  Reserved
     D23 = 0   no -  Reserved
iProcessing :                      0x00
bmVideoStandards :                 0x00 
     D00 = 0   no -  None
     D01 = 0   no -  NTSC  - 525/60
     D02 = 0   no -  PAL   - 625/50
     D03 = 0   no -  SECAM - 625/50
     D04 = 0   no -  NTSC  - 625/50
     D05 = 0   no -  PAL   - 525/60
     D06 = 0   no -  Reserved
     D07 = 0   no -  Reserved

          ===>Video Control Extension Unit Descriptor<===
bLength:                           0x1D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bUnitID:                           0x03
guidExtensionCode:                 {0F3F95DC-2632-4C4E-92C9-A04782F43BC8}
bNumControls:                      0x04
bNrInPins:                         0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]:                     0x02
bControlSize:                      0x04
bmControls : 0xE0 0x01 0x00 0x00 
     D00 = 0   no -  Vendor-Specific (Optional)
     D01 = 0   no -  Vendor-Specific (Optional)
     D02 = 0   no -  Vendor-Specific (Optional)
     D03 = 0   no -  Vendor-Specific (Optional)
     D04 = 0   no -  Vendor-Specific (Optional)
     D05 = 1  yes -  Vendor-Specific (Optional)
     D06 = 1  yes -  Vendor-Specific (Optional)
     D07 = 1  yes -  Vendor-Specific (Optional)
     D08 = 1  yes -  Vendor-Specific (Optional)
     D09 = 0   no -  Vendor-Specific (Optional)
     D10 = 0   no -  Vendor-Specific (Optional)
     D11 = 0   no -  Vendor-Specific (Optional)
     D12 = 0   no -  Vendor-Specific (Optional)
     D13 = 0   no -  Vendor-Specific (Optional)
     D14 = 0   no -  Vendor-Specific (Optional)
     D15 = 0   no -  Vendor-Specific (Optional)
     D16 = 0   no -  Vendor-Specific (Optional)
     D17 = 0   no -  Vendor-Specific (Optional)
     D18 = 0   no -  Vendor-Specific (Optional)
     D19 = 0   no -  Vendor-Specific (Optional)
     D20 = 0   no -  Vendor-Specific (Optional)
     D21 = 0   no -  Vendor-Specific (Optional)
     D22 = 0   no -  Vendor-Specific (Optional)
     D23 = 0   no -  Vendor-Specific (Optional)
     D24 = 0   no -  Vendor-Specific (Optional)
     D25 = 0   no -  Vendor-Specific (Optional)
     D26 = 0   no -  Vendor-Specific (Optional)
     D27 = 0   no -  Vendor-Specific (Optional)
     D28 = 0   no -  Vendor-Specific (Optional)
     D29 = 0   no -  Vendor-Specific (Optional)
     D30 = 0   no -  Vendor-Specific (Optional)
     D31 = 0   no -  Vendor-Specific (Optional)
iExtension:                        0x00

          ===>Video Control Extension Unit Descriptor<===
bLength:                           0x1D
bDescriptorType:                   0x24
bDescriptorSubtype:                0x06
bUnitID:                           0x04
guidExtensionCode:                 {63610682-5070-49AB-B8CC-B3855E8D221D}
bNumControls:                      0x10
bNrInPins:                         0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]:                     0x03
bControlSize:                      0x04
bmControls : 0xFF 0x70 0x00 0x37 
     D00 = 1  yes -  Vendor-Specific (Optional)
     D01 = 1  yes -  Vendor-Specific (Optional)
     D02 = 1  yes -  Vendor-Specific (Optional)
     D03 = 1  yes -  Vendor-Specific (Optional)
     D04 = 1  yes -  Vendor-Specific (Optional)
     D05 = 1  yes -  Vendor-Specific (Optional)
     D06 = 1  yes -  Vendor-Specific (Optional)
     D07 = 1  yes -  Vendor-Specific (Optional)
     D08 = 0   no -  Vendor-Specific (Optional)
     D09 = 0   no -  Vendor-Specific (Optional)
     D10 = 0   no -  Vendor-Specific (Optional)
     D11 = 0   no -  Vendor-Specific (Optional)
     D12 = 1  yes -  Vendor-Specific (Optional)
     D13 = 1  yes -  Vendor-Specific (Optional)
     D14 = 1  yes -  Vendor-Specific (Optional)
     D15 = 0   no -  Vendor-Specific (Optional)
     D16 = 0   no -  Vendor-Specific (Optional)
     D17 = 0   no -  Vendor-Specific (Optional)
     D18 = 0   no -  Vendor-Specific (Optional)
     D19 = 0   no -  Vendor-Specific (Optional)
     D20 = 0   no -  Vendor-Specific (Optional)
     D21 = 0   no -  Vendor-Specific (Optional)
     D22 = 0   no -  Vendor-Specific (Optional)
     D23 = 0   no -  Vendor-Specific (Optional)
     D24 = 1  yes -  Vendor-Specific (Optional)
     D25 = 1  yes -  Vendor-Specific (Optional)
     D26 = 1  yes -  Vendor-Specific (Optional)
     D27 = 0   no -  Vendor-Specific (Optional)
     D28 = 1  yes -  Vendor-Specific (Optional)
     D29 = 1  yes -  Vendor-Specific (Optional)
     D30 = 0   no -  Vendor-Specific (Optional)
     D31 = 0   no -  Vendor-Specific (Optional)
iExtension:                        0x00

          ===>Video Control Output Terminal Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x24
bDescriptorSubtype:                0x03
bTerminalID:                       0x05
wTerminalType:                   0x0101 = (TT_STREAMING)
bAssocTerminal:                    0x00
bSourceID:                         0x04
iTerminal:                         0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x84  -> Direction: IN - EndpointID: 4
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0010 = 1 transactions per microframe, 0x10 max bytes
bInterval:                         0x08

          ===>Class-specific VC Interrupt Endpoint Descriptor<===
bLength:                           0x05 
bDescriptorType:                   0x25
bDescriptorSubtype:                0x03
wMaxTransferSize:                0x0405 = (1029) Bytes

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x03
bAlternateSetting:                 0x00
bNumEndpoints:                     0x00
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Video Class-Specific VS Video Input Header Descriptor<===
bLength:                           0x0E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x01
bNumFormats:                       0x01
wTotalLength:                    0x004D  -> Validated
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmInfo:                            0x00  -> Dynamic Format Change not Supported
bTerminalLink:                     0x05
bStillCaptureMethod:               0x01  -> Still Capture Method 1
bTriggerSupport:                   0x00  -> No Hardware Triggering Support
bTriggerUsage:                     0x00
bControlSize:                      0x01
Video Payload Format 1             0x00 
     D00 = 0   no -  Key Frame Rate
     D01 = 0   no -  P Frame Rate
     D02 = 0   no -  Compression Quality
     D03 = 0   no -  Compression Window Size
     D04 = 0   no -  Generate Key Frame
     D05 = 0   no -  Update Frame Segment
     D06 = 0   no -  Reserved
     D07 = 0   no -  Reserved

          ===>Video Streaming Uncompressed Format Type Descriptor<===
bLength:                           0x1B
bDescriptorType:                   0x24
bDescriptorSubtype:                0x04
bFormatIndex:                      0x01
bNumFrameDescriptors:              0x01
guidFormat:                        {00000032-0002-0010-8000-00AA00389B71}
bBitsPerPixel:                     0x08
bDefaultFrameIndex:                0x01

*!*WARNING:  guidFormat is an unknown format
bAspectRatioX:                     0x00
bAspectRatioY:                     0x00
bmInterlaceFlags:                  0x00
     D0    = 0x00 Interlaced stream or variable: No
     D1    = 0x00 Fields per frame: 2 fields
     D2    = 0x00 Field 1 first: No
     D3    = 0x00 Reserved
     D4..5 = 0x00 Field patterns  -> Field 1 only
     D6..7 = 0x00 Display Mode  -> Bob only
bCopyProtect:                      0x00  -> Duplication Unrestricted

          ===>Video Streaming Uncompressed Frame Type Descriptor<===
          --->This is the Default (optimum) Frame index
bLength:                           0x1E
bDescriptorType:                   0x24
bDescriptorSubtype:                0x05
bFrameIndex:                       0x01
bmCapabilities:                    0x01
wWidth:                          0x0280 = 640
wHeight:                         0x0168 = 360
dwMinBitRate:                0x01A5E000
dwMaxBitRate:                0x01A5E000
dwMaxVideoFrameBufferSize:   0x00070800
dwDefaultFrameInterval:      0x000A2C2A = 66.666600 mSec (15.00 Hz)
bFrameIntervalType:                0x01
===>Additional Discrete Frame Type Data
dwFrameInterval[1]:          0x000A2C2A = 66.666600 mSec (15.00 Hz)

          ===>Color Matching Descriptor<===
bLength:                           0x06
bDescriptorType:                   0x24
bDescriptorSubtype:                0x0D
bColorPrimaries:                   0x01
bTransferCharacteristics:          0x01
bMatrixCoefficients:               0x04

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x03
bAlternateSetting:                 0x01
bNumEndpoints:                     0x01
bInterfaceClass:                   0x0E  -> Video Interface Class
bInterfaceSubClass:                0x02  -> Video Streaming Interface SubClass
bInterfaceProtocol:                0x01
*!*WARNING:  must be set to PC_PROTOCOL_UNDEFINED 0 for this class
iInterface:                        0x00

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2
bmAttributes:                      0x05  -> Isochronous Transfer Type, Synchronization Type = Asynchronous, Usage Type = Data Endpoint
wMaxPacketSize:                  0x0A80 = 2 transactions per microframe, 0x280 max bytes
bInterval:                         0x01
*!*CAUTION:  Unknown bDescriptorSubtype
          ===>Descriptor Hex Dump<===
bLength:                           0x28
bDescriptorType:                   0xFF
28 FF 42 49 53 54 00 01 06 02 78 00 00 00 00 00 
01 05 B8 0B 02 06 B8 0B 03 07 B8 0B 04 08 B8 0B 
05 09 B8 0B 06 0A B8 0B 

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x04
bAlternateSetting:                 0x00
bNumEndpoints:                     0x00
bInterfaceClass:                   0xFE  -> This is an Application Specific USB Device Interface Class
  -> This is a Device Firmware Application Specific USB Device Interface Class
bInterfaceSubClass:                0x01
bInterfaceProtocol:                0x01
iInterface:                        0x0C
     English (United States)  "APP Mode"

          ===>HID Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x21
bcdHID:                          0xD00F
bCountryCode:                      0x07
bNumDescriptors:                   0x00

          ===>Additional Error Checking<===
PASS: number of uncompressed-frame frame descriptors (8) == number of frame descriptors (8) specified in uncompressed format descriptor(s)
PASS: number of MJPEG frame descriptors (5) == number of frame descriptors (5) specified in MJPEG format descriptor(s)

          ===>BOS Descriptor<===
bLength:                           0x05
bDescriptorType:                   0x0F
wTotalLength:                      0x0029
bNumDeviceCaps:                    0x02

          ===>Platform Capability Descriptor<===
bLength:                           0x1C
bDescriptorType:                   0x10
bDevCapabilityType:                0x05
bReserved:                         0x00
Platform Capability UUID:          D8DD60DF-4589-4CC7-9CD2-659D9E648A9F
00 00 03 06 D4 05 01 00 

          ===>Unknown Capability Descriptor<===
bLength:                           0x08
bDescriptorType:                   0x10
bDevCapabilityType:                0x11
01 03 00 00 00 

@mcuee

mcuee commented Aug 11, 2026

Copy link
Copy Markdown
Member

On the other hand, libusb git also works.

 libusb  .\build\v145\x64\Release-Hotplug-MT\xusb.exe 1BCF:2BB4
Using libusb v1.0.30.12037

libusb: info [winusbx_init] WinUSB DLL available (with isoch support)
libusb: info [windows_init] UsbDk backend is not available
Opening device 1BCF:2BB4...

Reading device descriptor:
            length: 18
      device class: 239
               S/N: 3
           VID:PID: 1BCF:2BB4
         bcdDevice: 3481
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading BOS descriptor: 2 caps
    Platform descriptor:
      bLength                : 28
      PlatformCapabilityUUID : {df60ddd8-8945-c74c-9cd2-659d9e648a9f}

  00000000  00 00 03 06 d4 05 01 00                          ........

    Unknown BOS device capability 11:

Reading first configuration descriptor:
              total length: 1059
         descriptor length: 9
             nb interfaces: 5
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 0E.01.01
       endpoint[0].address: 87
           max packet size: 0010
          polling interval: 08
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 0E.02.01
interface[1].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 00C0
          polling interval: 01
interface[1].altsetting[2]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0180
          polling interval: 01
interface[1].altsetting[3]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 01
interface[1].altsetting[4]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0280
          polling interval: 01
interface[1].altsetting[5]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0320
          polling interval: 01
interface[1].altsetting[6]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 03B0
          polling interval: 01
interface[1].altsetting[7]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0A80
          polling interval: 01
interface[1].altsetting[8]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0B20
          polling interval: 01
interface[1].altsetting[9]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 0BE0
          polling interval: 01
interface[1].altsetting[10]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 13C0
          polling interval: 01
interface[1].altsetting[11]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 81
           max packet size: 13FC
          polling interval: 01
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 0E.01.01
       endpoint[0].address: 84
           max packet size: 0010
          polling interval: 08
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 0E.02.01
interface[3].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.01
       endpoint[0].address: 82
           max packet size: 0A80
          polling interval: 01
              interface[4]: id = 4
interface[4].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: FE.01.01

Kernel driver attached for interface 0: (not supported)

Claiming interface 0...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 1: (not supported)

Claiming interface 1...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 2: (not supported)

Claiming interface 2...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 3: (not supported)

Claiming interface 3...
   Failed (error -12) Operation not supported or unimplemented on this platform

Kernel driver attached for interface 4: (not supported)

Claiming interface 4...

Reading string descriptors:
   String (0x01): "CN03N9728LU00548DCG8A00"
   String (0x02): "Integrated_Webcam_FHD"
   String (0x03): "01.00.00"

Reading OS string descriptor:

Reading Extended Compat ID OS Feature Descriptor (wIndex = 0x0004):
   Failed: Pipe error
Reading interface association descriptors (IADs) for first configuration:
    nb IADs: 2
      IAD 0:
            bFirstInterface: 0
            bInterfaceCount: 2
             bFunctionClass: 0E
          bFunctionSubClass: 03
          bFunctionProtocol: 00
                  iFunction: 4 (Integrated Webcam)
      IAD 1:
            bFirstInterface: 2
            bInterfaceCount: 2
             bFunctionClass: 0E
          bFunctionSubClass: 03
          bFunctionProtocol: 00
                  iFunction: 11 (Integrated IR Webcam)

Releasing interface 0...
Releasing interface 1...
Releasing interface 2...
Releasing interface 3...
Releasing interface 4...
Closing device...

@sonatique

Copy link
Copy Markdown
Member

@mcuee we need to merge #1830 first, then rebase this one to have an expected working state.

@maxtruxa

Copy link
Copy Markdown

Sorry for the late response. I got a working patch with various fixes that I will rebase on master and submit within the next few days.

@tmittet

tmittet commented Sep 24, 2026 •

Copy link
Copy Markdown

Sorry for the late response. I got a working patch with various fixes that I will rebase on master and submit within the next few days.

@maxtruxa, we're developing software for a device with multiple winusb interfaces and have run into #1177. We're creating a libusb hotfix by cherry picking the following commits on top of libusb@v1.0.30:

If you're willing to share your patch, we'd be happy to include it in our fix and run in through our test pipeline. For reference: UsbDotNet: Patch libusb issue #1177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple WinUSB devices in single composite device Windows: libusb Windows backend for some USB composite device with IAD

9 participants