| 
     
      
      
      From: Xiaofan C. <xia...@gm...> - 2023-07-13 02:24:40
      
     
   | 
In this case, you may want to use libusb xusb example and then post the full debug output of `xusb -d 1cbf:0007". Make sure you use the latest 1.0.26 release or git master. Best regards, Xiaofan On Thu, Jul 13, 2023 at 10:03 AM RisingEdgeIndustries <su...@ri...> wrote: > > So I'm taking the same approach I take when I had these interfaces running as stand alone devices. My process is below. > > > Call get_device_list() > Loop through device list to find VID/PID > Once found open_device() with my VID/PID > [at this point I get string descriptors and max_packet_size() which works fin] > I then execute claim_interface() for my device > > I can claim interface 0, but when I try interface 1 I get the following error: > ERROR: failed to claim interface, ret val = -12 > ERROR: code - b'Operation not supported or unimplemented on this platform' > > I know from the descriptors during enumeration my second interface is my bulk interface with bInterfaceNumber "1". > > I see both interfaces with correct VID/PID in device manager with correct drivers and no icons indicating a problem. Is there something obvious I'm missing in this process? This process works fine for non-composite HID only or bulk only. > > > Descriptor data: > > > ----- Device Descriptor ----- > 12 bLength > 01 bDesc Type > 00 02 bcdUSB (LSB, MSB) > 00 bDeviceClass > 00 bDeviceSubClass > 00 bDeviceProtocol > 40 bMaxPacketSize0 - Maximum packet size for Endpoint zero (only 8, 16, 32, or 64 are valid). > BF 1C idVendor (LSB, MSB) > 07 00 idProduct (LSB, MSB) > 00 01 bcdDevice (BCD) (LSB, MSB) > 01 iManufacturer (string index) > 02 iProduct (string index) > 03 iSerialNumber (string index) > 01 bNumConfigurations (string index) > > ----- Configuration Descriptor ----- > 09 bLength > 02 bDesc Type > 40 00 wTotalLen (LSB, MSB) > 02 bNumInterfaces > 01 bConfigurationValue > 00 iConfiguration > 80 bmAttributes > 7D bmAttributes > > ----- Interface Descriptor ----- > 09 bLength > 04 bDesc Type > 00 bInterfaceNumber > 00 bAlternateSetting > 02 bNumEndpoints > 03 bInterfaceClass > 00 bInterfaceClass > 00 bInterfaceProtocol > 00 iInterface > > ----- HID Class Descriptor ----- > 09 bLength > 21 bDesc Type > 00 02 bcdHID (Hid Spec Release Number) (LSB, MSB) > 00 bCountryCode (Country code (0x00 for not supported)) > 01 bNumDescriptors (Number of class descriptors) > 22 bDescriptorType (Report descriptor type) > 20 00 bDescriptorLength (Report descriptor type) (LSB, MSB) > > ----- Endpoint Descriptor ----- > 07 bLength > 05 bDesc Type > 81 bEndpointAddress > 03 bmAttributes > 40 00 wMaxPacketSize (LSB, MSB) > 01 bInterval > > ----- Endpoint Descriptor ----- > 07 bLength > 05 bDesc Type > 01 bEndpointAddress > 03 bmAttributes > 40 00 wMaxPacketSize (LSB, MSB) > 01 bInterval > > ----- Interface Descriptor ----- > 09 bLength > 04 bDesc Type > 01 bInterfaceNumber > 00 bAlternateSetting > 02 bNumEndpoints > FF bInterfaceClass > 00 bInterfaceClass > 00 bInterfaceProtocol > 00 iInterface > > ----- Endpoint Descriptor ----- > 07 bLength > 05 bDesc Type > 82 bEndpointAddress > 02 bmAttributes > 40 00 wMaxPacketSize (LSB, MSB) > 00 bInterval > > ----- Endpoint Descriptor ----- > 07 bLength > 05 bDesc Type > 02 bEndpointAddress > 02 bmAttributes > 40 00 wMaxPacketSize (LSB, MSB) > 00 bInterval > > > > > On Wed, Jul 12, 2023 at 8:35 PM Xiaofan Chen <xia...@gm...> wrote: >> >> There is no limitation for your use case. Open the device normally and claim the >> correct interface (interface 1 in your case). >> >> libusb_detach_kernel_driver() is not supported under Windows so it is >> not relevant. >> >> The limitations are mainly with things like IAD and CDC-ACM, not your use case. >> 1) https://github.com/libusb/libusb/pull/965 (PR merged, it will be in >> future 1.0.27 release) >> 2) https://github.com/libusb/libusb/issues/1238 >> >> Best regards, >> Xiaofan >>  |