> Now it seems to me currently it is not possible using
> Zadig/libwdi to achieve this.

I agree. As far as I understand, Zadig/libwdi simply offers what it gets 
from the system - i.e. the "subdevices" generated by usbccgp.sys (one 
subdevice only for the IAD).

I assume no inf-hacking would help here for the same reason...? 
(referring to your other e-mail)

>> Brief comparison with libusb-win32 seems to indicate that this lib has
>> no problem with such setup (usbccgp.sys on parent, libusb0.sys on IF 0),
>> but of course there the enumeration process is completely different.
>
> Could you please share more details about this? Supposedly
> libusb-win32 may have the same issue as well.

I have not much to share in the moment. I did just a quick cross-check 
some time ago and libusb-win32 seemed to allow to claim/use the other 
interfaces even without touching the composite parent. But I didn't get 
into details since I don't use and don't intend (currently) to use 
libusb-win32. Just noticed that libusb-win32 is enumerating the devices 
through its own driver rather than through the SetupAPI as libusbx, 
therefore it doesn't get unaligned.

>> Finally, during my earlier experiments, I tried a trivial
>> "hack"-modification of libusbx, assigning the same backend (subAPI) to
>> the associated interfaces as to the first one - and after this
>> modification everything "just worked", therefore I was hoping there
>> would be a solution. However, due to my lack of knowledge of libusbx
>> internals, I'm of course not sure if such approach might have some
>> unexpected side effects.
>
> Could you post your hack?

Sure, but please understand it's really just a hack, no attempt for 
proper solution ;-)

In windows_usb.c, function set_composite_interface(), after lines

priv->usb_interface[interface_number].path = dev_interface_path;
priv->usb_interface[interface_number].apib = &usb_api_backend[api];
priv->usb_interface[interface_number].sub_api = sub_api;

I have added something like

char *copy1, *copy2;
copy1 =  malloc (1024);
strcpy (copy1, dev_interface_path);
copy2 = (char*) malloc (1024);
strcpy (copy2, dev_interface_path);
priv->usb_interface[interface_number+1].path = copy1;
priv->usb_interface[interface_number+1].apib = &usb_api_backend[api];
priv->usb_interface[interface_number+1].sub_api = sub_api;
priv->usb_interface[interface_number+2].path = copy2;
priv->usb_interface[interface_number+2].apib = &usb_api_backend[api];
priv->usb_interface[interface_number+2].sub_api = sub_api;

Note that this hack does not do any IAD parsing, it's hardcoded for the 
single device of interest with "known" device, therefore it blindly sets 
the backend of IF 0 also to IF 1&2.

The copies of dev_interface_path strings seemed to be necessary because 
the lib frees them somewhere during cleanup. I did not even try to check 
further details around this, assuming that the proper solution would 
need to be anyway designed by somebody with good knowledge of libusbx 
internals...


> If there is a solution inside libwdi/Zadig, I would prefer to sort
> the issue there.

I don't think so (see above).

Jan

------------------------------------------------------------------------------
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

Reply via email to