|
From: Tim R. <ti...@pr...> - 2018-05-02 17:40:24
|
Paul Qureshi wrote: > > The issue is that while it is possible with WinUSB, libusb is built on the > Linux model of treating composite devices as a single device. On Windows > they appear as at least three devices - a composite device using the > composite driver, and then sub devices which can be WinUSB, HID, CDC or > whatever. That only happens if the registry and the INF files are configured to allow the default composite driver (usbccgp.sys) to handle the composite device. THAT is the entity that exposes the interfaces as separate PnP devices, and rewrites the descriptors so that each subdevice thinks it is talking to a single-interface device. If you override this by having your driver handle the composite device, then that driver owns all of the interfaces. There is no automatic exposure of additional devices. > I don't think it is possible to replace the composite driver with WinUSB, > but please correct me if I am wrong because that might be a good solution. Of course it is. WinUSB handles composite devices and multiple interfaces. It just requires an INF. > I don't use INF files, I use WCID but if there is a solution here it is > probably possible with WCID too. As far as I can tell though WCID only lets > you assign the WinUSB driver to interfaces, not the composite device. That is true. The WCID descriptor has an interface number. To do what you ask, you'd need to have a genuine INF file that matches the composite device ID. > In summary I think there is no way to fix either the runtime DFU firmware > or libusb to support runtime DFU. Not without either an INF or a filter driver. Now, there may be a slimy way to handle this. In the Enum tree of the registry, each device has a "Service" entry that identifies the driver service that will handle the device. It is possible to overwrite that entry on the fly, then restart the device. When it comes back it, it will load the alternative driver. You could do the DFU thing, then rewrite the Service entry back to "usbccgp". You'd have to make sure the entries for WinUsb were properly set up, but it might work. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |