From: Pete B. <pb...@gm...> - 2010-08-18 13:33:11
|
On 2010.08.18 14:04, Xiaofan Chen wrote: > In this case it is working. > Device: 04d2:0001 Interface 0. > \\.\USB#VID_04D2&PID_0001#BMD002#{A5DCBF10-6530-11D2-901F-00C04FB951ED} > libusb:debug [set_device_paths] driver: usbccgp > libusb:warning [set_composite_device] interface_path[0]: unhandled API > - interface will be disabled Weird. If the interface is disabled, you shouldn't be able to access it at all with libusb 1.0 > In this case it is not working. > Device: 04d8:0204 > \\.\USB#VID_04D8&PID_0204#5&207B166D&0&8#{A5DCBF10-6530-11D2-901F-00C04FB951ED} > libusb:debug [set_device_paths] driver: libusb0 If the driver is identified as libusb0, then it wouldn't be supported either. The current libusb 1.0 very much relies on the driver string or driver class GUID to find out if the driver is supported. Only if the driver/driver class is seen as WinUSB or HID will libusb 1.0 support it. If the debug output above, it looks to me like the driver/GUID we get is the one from libusb0.sys, rather than WinUSB. Now, of course, another way would be to assume the driver is supported regardless (masquerading is something I really anticipated) and try to open the device with each of the API we support, but this could be a very disruptive process, and I also have doubts about how we would handle a composite parent with a filter driver. Is it possible that the only reason it works in libusbdotnet is because you are explicitly telling the kind of driver you expect (WinUSB) so you bypass driver detection altogether? Still need to look at it further, so maybe I'm way off, but not being able to tell the kind of driver by simply using the regular APIs could be an issue for libusb-1.0. If the issue is driver masquerading, do you know if filter drivers provide additional calls that could help us find out if a supported driver hides behind the regular one? Or possibly, since you have control over the filter driver, could you implement an IOCTL to report the additional drivers, that libusb 1.0 could use during enumeration? Regards, /Pete |