From: Tim R. <ti...@pr...> - 2019-07-05 05:47:55
|
On Jul 4, 2019, at 1:49 PM, Alan Ball via libusb-devel <lib...@li...> wrote: > > USBview hangs whenever I try to examine the port my embedded device is connected to. I will try usbtreeview.. That’s not a healthy sign. Maybe there really is a descriptor problem. > As you can see in my debug output, I've been able to open my device. The errors occur whenever I try to call libusb_claim_interface. If the claim was successful, I would then use libusb_open_device_with_vid_pid. In my original program with the single libusb interface the interface_number was 0. With my new application, I've tried to set it based on the interface number that I see in device manager/what is set in my device descriptor struct on my embedded device. Perhaps you should fetch the descriptors for the device(s) you are opening and dump them to see what has happened. When you have a composite device, usbccgp.sys rewrites descriptors and requests as they go through. If a driver is assigned to interface 3 (MI_03 in device manager), usbccgp will rewrite the configuration descriptor so it appears there is only one interface. The driver is not supposed to know there are any other interfaces or endpoints; it can focus on the interface it is handling. > How would I do this? "Then you can select whatever interfaces you need. In your case, you have to let the operating system assign usbccgp to the composite devices so it creates subdevices for each interface." > > Are any examples for doing this available? Well, the usbccgp.sys part happens automatically. That’s how a 4-interface device gets 4 separate entries in device manager, each of which is assigned its own driver. You can see the hardware id and the driver that was assigned by using Device Manager. — Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |