LibUsbDotNet No devices found when calling UsbDevice.AllDevices

自作多情 提交于 2019-12-01 23:45:05

Does libusb support HID devices?

On Windows, the native Windows HID driver is supported by libusb, but there are some limitations, such as not being able to access HID mice and keyboards, as they are system reserved, as well as getting a direct read of HID report descriptors. Apart from that, you should be communicate with an HID device as you would with any other USB device.

If your application will revolve around HID access, you are encouraged to try to use the ​HIDAPI library by Signal 11 Software, which is also cross-platform. It uses native HID API under Windows and Mac OS X and can use libusb or hidraw as the backend under Linux.

The documentation says that

Gets a list of all available USB devices (WinUsb, LibUsb, Linux LibUsb v1.x).

and

Use this property to get a list of USB device that can be accessed by LibUsbDotNet.

If you are using the standard HID driver for your mouse and keyboard and haven't replaced that with the libusb.sys driver, then LibUsbDotNet can't access those devices and therefore doesn't list them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!