UWP app cannot find/connect to USB device

前端 未结 3 1374
一向
一向 2020-12-19 08:02

I am trying to make a UWP app which connects to a USB device and then executes a series of commands, like retrieving data from the internal sensor (think of an accelerometer

3条回答
  •  轮回少年
    2020-12-19 08:36

    In my case, the DeviceInterfaceGUID registry entry for the device was missing, which seems to be required so that the WinUSB device can be found and instantiated.

    I added the entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_16D0&PID_0BD7\None\Device Parameters\DeviceInterfaceGUID with a random GUID like {86529001-c433-4530-a578-9a67adf1ffa9} (in my case 16D0 is the vendor ID, 0BD7 the product ID and None the instance). This can be done from the command line for example, by calling reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_16D0&PID_0BD7\None\Device Paramet ers" /v "DeviceInterfaceGUID" /t REG_SZ /d "{86529001-c433-4530-a578-9a67adf1ffa9}" /f.

    I am absolutely no expert in USB and have no idea why this is needed or why it was missing; but at least in my case adding a GUID helped, both on my Windows 10 Professional and my Windows 10 IoT Core (Raspberry PI 3B). Maybe see https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings for more details.

提交回复
热议问题