usbhidwinusbdevice-manager

'best driver already installed' when trying to replace generic HID with WinUSB


I am trying to send SetReports to vendor defined features on a USB HID device for testing purposes. So far I used BusHound for this but I have hit some limitations with that.

I followed this guide in an attempt to write a small testing utility that does the desired control transfers using the WinUSB driver. But when trying to install WinUSB for the device via the generated .inf file, the device manager just tells me “Best Driver Software Is Already Installed”.

Is there a way to force windows to use WinUSB for this device?

Or does that imply that there's a problem with the .inf file?

Previously I looked into HIDAPI (which seemed to have a backend problem) and doing something along the lines of this example (seemed really outdated and unclear how to specify the exact setup package my control transfer needs).

I am still new to USB and have more of an embedded background so any pointers are greatly appreciated if it seems that I'm doing something weird :)


Solution

  • The Windows driver model is very rigid and a pain for USB. On Linux and macOS, you can access any USB device / USB interface that is not currently open by another application or the operating system. On Windows, a driver is mandatory and all access must be through that driver.

    For generic access, the WinUSB driver is required. Use Zadig to change the driver (and forget about the .INF file.)

    When WinUSB is installed for your device, it will no longer appear as a keyboard / mouse / game pad. In order to restore the regular Windows HID driver, uninstall the driver from the device manager, unplug and replug your device.

    Also see Zadig FAQ