Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-22 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 7:52 AM, Pete Batard wrote: > On 2013.08.14 00:21, Xiaofan Chen wrote: >> BTW, libusbx Windows also does not support Multiple HID >> top level collections (only the first top level collection will be >> used). The situation is a bit similar here. > > Yeah, but I don't think

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-22 Thread Xiaofan Chen
On Fri, Aug 23, 2013 at 9:51 AM, Pete Batard wrote: > On 2013.08.16 04:27, Xiaofan Chen wrote: >> And hopefully now Pete >> or others can come out a proper fix with all the information. > > I have way too much lined up, so I have to drop stuff that I know I'll > never get a chance to look at. Devi

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-22 Thread Pete Batard
On 2013.08.16 04:27, Xiaofan Chen wrote: > And hopefully now Pete > or others can come out a proper fix with all the information. I have way too much lined up, so I have to drop stuff that I know I'll never get a chance to look at. Devising a fix with regards to IADs is one of those. If someone

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-18 Thread Tim Roberts
On Aug 16, 2013, at 1:14 PM, Jan Becvar wrote: > > I wonder if this fully applies from the libusbx point of view. > > My understanding of its interface (but please mind my so far limited > experience with the library) was that it enumerates really the > "physical" devices, even if composite. I

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-16 Thread Jan Becvar
Hi Tim, On 15-Aug-13 20:24, Tim Roberts wrote: >> What do you mean by "You don't need the IAD"? Do you mean >> you do not need to parse the IAD descriptors? > > Right. The IAD is a simple descriptor. It only provides two things: > the class/subclass/protocol for the interface group, and the int

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-15 Thread Xiaofan Chen
On Fri, Aug 16, 2013 at 2:24 AM, Tim Roberts wrote: > Xiaofan Chen wrote: >> Secondly how does usbccgp.sys rewrites the configuration >> descriptors? > > It eliminates everything related to the interfaces that you did not > claim in your INF. If you claimed MI_03, and you have an IAD for > interf

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-15 Thread Tim Roberts
Xiaofan Chen wrote: >> If you are not driving the composite device, then usbccgp.sys rewrites >> the configuration descriptors. > Firstly, so device with IAD can be a non-composite device. My > understanding was that an IAD device would be a composite > device. Now it seems that was a wrong underst

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-14 Thread Xiaofan Chen
On Thu, Aug 15, 2013 at 12:45 AM, Tim Roberts wrote: > Pete Batard wrote: >> On 2013.08.14 00:21, Xiaofan Chen wrote: >>> The 2nd option is not possible without changes in libusbx. Right now >>> it is not possible to access the other interfaces other than the first >>> interface in an interface co

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-14 Thread Tim Roberts
Pete Batard wrote: > On 2013.08.14 00:21, Xiaofan Chen wrote: >> The 2nd option is not possible without changes in libusbx. Right now >> it is not possible to access the other interfaces other than the first >> interface in an interface collection of a USB IAD device as of >> now, even though the s

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-14 Thread Jan Becvar
Hi Xiaofan, >> 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 mentio

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-14 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 2:46 PM, Jan Becvar 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 us

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
On 14-Aug-13 1:52, Pete Batard wrote: > On 2013.08.14 00:21, Xiaofan Chen wrote: >> The 2nd option is not possible without changes in libusbx. Right now >> it is not possible to access the other interfaces other than the first >> interface in an interface collection of a USB IAD device as of >> now

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Pete Batard
On 2013.08.14 00:21, Xiaofan Chen wrote: > The 2nd option is not possible without changes in libusbx. Right now > it is not possible to access the other interfaces other than the first > interface in an interface collection of a USB IAD device as of > now, even though the supported driver (eg: WinU

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 3:48 AM, Jan Becvar wrote: > > The composite parent workaround is good enough for me in the moment, it > just might become limiting in the future, that's why I raised the > question... The question is perfectly legitimate. The solution on the other hand, will take time. An

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 2:26 AM, Pete Batard wrote: > Hi Jan, > > On 2013.08.13 16:15, Jan Becvar wrote: >> Forgot to add that my idea/hope was that libusbx, when setting backend >> of a composite interface, could check if this is not by chance first >> interface of an IAD-collection and if so, as

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 12:23 AM, Tim Roberts wrote: > > Xiaofan Chen wrote: > > I think there is a way to hack the inf-file generated by > > Zadig to install WinUSB driver for each interface. > > > > Interface 0 --> MI_00 > > Interface 1 --> MI_01 > > Interface 2 --> MI_02 > > No, that won't work

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
Hi Pete, >> Forgot to add that my idea/hope was that libusbx, when setting backend >> of a composite interface, could check if this is not by chance first >> interface of an IAD-collection and if so, assign the same backend to the >> other interfaces of the collection as well. But I don't know in

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Pete Batard
Hi Jan, On 2013.08.13 16:15, Jan Becvar wrote: > Forgot to add that my idea/hope was that libusbx, when setting backend > of a composite interface, could check if this is not by chance first > interface of an IAD-collection and if so, assign the same backend to the > other interfaces of the collec

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Tim Roberts
Xiaofan Chen wrote: > I think there is a way to hack the inf-file generated by > Zadig to install WinUSB driver for each interface. > > Interface 0 --> MI_00 > Interface 1 --> MI_01 > Interface 2 --> MI_02 No, that won't work. When you have an IAD that wraps those three interfaces, usbccgp only c

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
On 13-Aug-13 17:07, Jan Becvar wrote: > 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. Forgot to add that my idea/hope was that libusbx, when setting backend o

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
> 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

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 10:40 PM, Jan Becvar wrote: > On 13-Aug-13 16:16, Xiaofan Chen wrote: >> Hmm, I am not be totally correct. I just tried one USB Web >> Camera which is an IAD device, the first collection has two >> interfaces (Interface count =2, Interface and Interface 1), >> the second co

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 6:15 PM, Jan Becvar wrote: > On 13-Aug-13 11:36, Xiaofan Chen wrote: >> As replied by Tim in that thread, each interface of a USB composite >> device is a separated one. If you only installed the supported driver for >> the first interface, (Interface 0), then you can only

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
On 13-Aug-13 16:16, Xiaofan Chen wrote: > Hmm, I am not be totally correct. I just tried one USB Web > Camera which is an IAD device, the first collection has two > interfaces (Interface count =2, Interface and Interface 1), > the second collection has two interface (Interface count =2, > Interface

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 4:36 PM, Jan Becvar wrote: > Hi everybody, > > I have a question about a possible problem of accessing composite > devices using interface association from libusbx. Not sure, but the > problem might be related to the maling list thread > "libusb_claim_interface() error with

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 9:53 PM, Xiaofan Chen wrote: > On Tue, Aug 13, 2013 at 6:15 PM, Jan Becvar wrote: >> From my understanding of MS documentation related to IAD's handling, e.g. >> http://msdn.microsoft.com/en-us/library/windows/hardware/ff537107%28v=vs.85%29.aspx >> I believed that in pres

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 6:15 PM, Jan Becvar wrote: > On 13-Aug-13 11:36, Xiaofan Chen wrote: >> As replied by Tim in that thread, each interface of a USB composite >> device is a separated one. If you only installed the supported driver for >> the first interface, (Interface 0), then you can only

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
On 13-Aug-13 11:36, Xiaofan Chen wrote: > As replied by Tim in that thread, each interface of a USB composite > device is a separated one. If you only installed the supported driver for > the first interface, (Interface 0), then you can only claim interface 0 > with libusbx, not the other two inter

Re: [Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Xiaofan Chen
On Tue, Aug 13, 2013 at 4:36 PM, Jan Becvar wrote: > Hi everybody, > > I have a question about a possible problem of accessing composite > devices using interface association from libusbx. Not sure, but the > problem might be related to the maling list thread > "libusb_claim_interface() error with

[Libusbx-devel] Accessing composite devices using interface association

2013-08-13 Thread Jan Becvar
Hi everybody, I have a question about a possible problem of accessing composite devices using interface association from libusbx. Not sure, but the problem might be related to the maling list thread "libusb_claim_interface() error with usbK driver" (http://sourceforge.net/mailarchive/message.p