On Wed, Aug 14, 2013 at 2:46 PM, Jan Becvar <j...@groget.org> wrote: > On 14-Aug-13 1:52, Pete Batard wrote: >> As far as WinUSB is concerned, I think the best we can get is >> WinUsb_GetAssociatedInterface(), but that what we're already trying to >> use. > > I saw this call in winusbx_claim_interface, but in my use case it's not > excercised at all. For the first interface of the IAD collection it's > not used, for the other ones the call falls through > composite_claim_interface to unsupported_claim_interface, because the > library does no assign the WinUSBx backend to those interfaces as > described before. > > I would be curious to know, whether you see some principial issue with > the suggested approach of simply assigning the same backend to all of > the interfaces from the IAD, based on the knowledge that Windows always > puts them under responsibility of the same driver. As mentioned before, > in my tests that worked, but of course I need to admit that the tests > included just limited set of operations interesting for my use case.
I tend to agree with you that this should work. But I have to admit that I am not a programmer myself and do not quite know all the internals of libusbx. Pete is the main Windows developer for libusbx and he is the one to depend on unless someone else jumps in to help. >> > However I'm not sure if I get right your notes about "checking which >> > interfaces are accessible". Am I right that such info could be mainly >> > used to fail gracefully, because it will not help me get the other >> > interfaces of the association group accessible through libusbx if the >> > driver is attached to MI_00 rather than to the composite parent? >> >> I'm considering this from the perspective of: If you don't want to >> replace the composite parent, you shouldn't be trying to consider these >> interfaces as part of the same device, but as multiple independent >> devices, and write your app from that perspective. > > Unless I'm missing something important here (and I feel Xiaofan confirms > this view), there's no way around. Windows presents all the interfaces > of the IAD collection as a single device (when using usbccgp.sys), I can > attach just a single driver to it, see it as a single device through > libusbx, but there's no way to access the other interfaces through > libusbx in the moment. Yes I agree with you. >> In other words, you should try to forget about IADs for the time being >> as Windows is not well suited to handle IAD in a generic fashion. > > No way for me, I need to live with the IAD based devices that are not > under my control... >From what I see, usually IAD is used for Video/Audio device and also USB Composite device which includes CDC (eg: CDC-ACM) as one of the function. What is your device? -- Xiaofan ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel