New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot claim interface 1 on Windows, "Unsupported API" #422
Comments
Okay, so it looks like the issue is that the device gets claimed during the DEV pass of winusb_get_device_list() because it matches the driver name against the composite API. As such it is then ignored in the GEN pass. |
Seems to be related to this: #370 So the issue is that the parent is using the composite driver, rather than WinUSB. I have confirmed this. I am trying to get dfu-util to work on Windows with a runtime DFU interface. dfu-util looks for the DFU runtime descriptor in the device's configuration descriptor, and finds it in the parent composite device. I can't see how to make it find the child device, if that is at all possible. |
I do not think your issue is the same as #370. SInce you have control of the FW, you can try to make the DFU interface to be of interface 0 and the HID to be of interface 1 to see if that helps. |
And to make sure it is not because of the default WinUSB driver using WCID, you can use Zadig to install the WinUSB driver again to see if that makes any differences. Last time I had issues before with ST-Link when using ST's driver but Zadig worked fine. |
I tested with DFU on interface zero, and got the same error. I tested with a Zadig installed WinUSB driver and got the same error. This seems to be a limitation of the WinUSB backend due to it not supporting the composite driver. I don't think there is any easy fix for composite devices in general, except manually replacing the default driver that Windows installs for them. |
It seam you will have anyway to use a custom inf and back end driver. Why not to use libsubk or dk? For libusbk their is no issue I do use it with various composite device mix of standard class driver such as rndis CDC mass storage and vendor specific. |
The goal is to avoid using a custom INF. Aside from the issues with signing them and the like, the customers get confused and just want something that plugs in and works. I mean, people don't expect to need a driver for their keyboard... I'm writing some test code now to see what other options are available. |
Make sense. Why not to have dfu device alone (not same vid pid) entered by s/w of normal function or mechaninal swicth at power up? What the benefit of having composite normal. + dfu function for just f/w upgrade ? |
That's the other option. It would be nice to be able to enter DFU via software though. For example I have some automated test equipment, and I'd like the host software to be able to update its firmware when required without user intervention. I think it will have to be a custom solution though. |
In the tests with DFU and WCID, WCID is sufficient to auto-load winusb.sys. However, dfu-util.exe was not able to open the DFU interface (at interface 1). It requires the DeviceInterfaceGUID regkey and this key is not added by Windows. When an additional DeviceInterfaceGUID descriptor is provided along with the WCID, then the dfu-util.exe could successfully locate the DFU interface. Please refer to https://github.com/pbatard/libwdi/wiki/WCID-Devices#Defining_a_Device_Interface_GUID_or_other_device_specific_properties |
@mcuee I will try to find some time, as you might imagine I moved on to other projects but I can dig the hardware out again. |
@kuro68k Thanks a lot for the help in advance. |
One reference from FTDI. It uses the WinUSB WCID method to get Windows automatically use WinUSB as the driver. |
I need to dig some development hardware out, it's all in boxes. But this was fixed, I had it working, I just can't remember what was done. It might have been the DeviceInterfaceGUID fix DeviceInterfaceGUID mentioned, or one of the two PRs I submitted to fix selection of interfaces. I'll try to look at it over new year. |
@kuro68k Thanks for the updates. I assume this is no longer an issue in the latest git, right? If that is the case, I will close this issue. |
Sorry I've been really busy and not had time to check it. |
@kuro68k Close this issue for now. Please reopen if you have new info. |
Sorry to bump an old thread
@unnamalai-kb could you explain in detail how you did this? I mean the how the additional parameters were given to dfu-util |
I'm trying to get dfu-util to work with a runtime DFU interface, which is interface 1 of a composite HID device. WCID has been used to load the WinUSB driver for this interface successfully.
You can see that only interface 0 (HID) seems to be supported. If I dig into the apib of interface 1 (DFU runtime) the designation is "Unsupported API".
I want to fix this myself but could do with some guidance. It looks like it is an issue with interface 1 not being supported by libusb when it should be. I'm using the WinUSB backend and having trouble finding where it decides if an interface is supported or not.
For reference here is the USB device I'm talking to:
https://github.com/kuro68k/xmega_usb
The text was updated successfully, but these errors were encountered: