|
From: David G. <dav...@gm...> - 2023-07-24 04:34:35
|
The example file I linked to can be compiled two different ways: as a composite device with WinUSB on one interface or a non-composite device with WinUSB taking over the whole device. There are different descriptors for each case. Both of them worked the last time I checked. Maybe Windows has cached some old descriptors for your device or you made an error. --David Grayson On Sun, Jul 23, 2023, 9:16 PM RisingEdgeIndustries < su...@ri...> wrote: > All, > > Thank you for the replies! This is very helpful. I have already changed > my code over to try to use the WINUSB only approach for the entire > composite device. Now that I'm stuck I'm hoping I can figure > out/understand what I'm messing up as I'd like to continue to use MS OS 2.0 > descriptors to do more advanced stuff. > > I will be working this week on testing changes and reading more about your > feedback here. I think I have to be missing something obvious because I > see the traffic and enumeration happens, but WINUSB never replaces > usbccgp.sys. It just enumerates with usbccgp.sys, then interface 0 is my > HID interface which comes up fine then interface 1 (bulk) fails which makes > sense because I'm no longer using the descriptors to associate WINUSB with > interface 1 like I was before. This is due to me attempting to change to > WINUSB being assigned to the entire composite device. > > David - quick question about your example. Even testing that example > exactly with my composite device, it doesn't seem to work. Would that mean > there is a difference between how you apply that compatible ID descriptor > to a composite vs non-composite device? I assumed that structure would > work for composite, but I'm wondering if you need a configuration > descriptor etc... Said differently, in the image I posted with the red > box, you can't just use the descriptors in the red box? you need more like > the configuration subset header and the following information for that? > > Als, in Windows 10, is there a way to see the MS OS 2.0 descriptor > information from the operating systems point of view during enumeration? > Maybe I could see what windows is getting vs what I think it is getting > from the device side? I've tried to use event viewer but can't track down > any MS OS 2.0 descriptor info. > > Thank you for your time! > > > > On Sun, Jul 23, 2023 at 3:18 AM Xiaofan Chen <xia...@gm...> wrote: > >> On Sun, Jul 23, 2023 at 11:38 AM RisingEdgeIndustries >> <su...@ri...> wrote: >> > >> > Hi David, >> > >> > Thank you for the help. I actually went that route first, but >> libusb1.0 doesn't >> > support multiple interfaces with the usbccgp.sys driver. I have to >> change to >> > using WINUSB for the entire composite device. >> >> As mentioned before, this is incorrect and should not happen. libusb works >> fine with multiple interfaces with the USB composite parent driver with a >> few >> exceptions. It should work with your case since you are not using USB IAD >> and CDC-ACM. >> >> You should really post your libusb code and the debug log (with >> LIBUSB_DEBUG=4). >> >> libusb git main will also work with USB devices with IAD >> but still has some exceptions. >> >> Reference: >> https://github.com/libusb/libusb/pull/965 (merged) >> https://github.com/libusb/libusb/pull/1181 (not merged) >> https://github.com/libusb/libusb/issues/1238 (no PR yet) >> >> -- >> Xiaofan >> > |