Interface a USB HID device frow Qt (Windows)
-
Is there anyone who knows if there is any way to interface to a HID device (e.g. mouse, keyboard) via Qt in Windows?
THANKS -
Hi,
Your question is a bit vague, what do you mean by "interface to a HID device" ?
-
I'd like to know if there is a USB host HID driver (source package or DLL ?) available which Qt can use to interface with a mouse, keyboard, or other PC HID peripheral.
-
But what for ? If you're running Qt with Windows (like you said in your first post) the device will already be handled for you thus usable with your Qt application.
-
The idea is to create a board with specific VID and PID with which the Qt app would be able to connect to. It would be the only PC application talking to the HID device. (It should not enumerate as standard mouse or a keyboard.) I want to be able to read and write to its endpoints. How can I go about doing this? In this case, I cannot use CDC (QtSerialPort) for other reasons.
-
Hi.
You can try following API's:
"HID Api":http://www.signal11.us/oss/hidapi/
"libusb-win32":http://sourceforge.net/apps/trac/libusb-win32/wiki
"http://libusbx.org/ - its a fork of libusb":http://libusbx.org/ -
LibUSB is great. I used it to create a USB host and target MCU solution titled "Create A Solution Without the Class Struggle", available from Renesas as download "r01an0492ej_usb". This comes with host and target code templates using Python and PyUSB. I used LibUSBwin32 ( libusb0_x86.dll), never had success with the libUSBx.
But for this I do need HID, for other reasons.
I will check out http://www.signal11.us/oss/hidapi
Thanks!
Carl Stenquist -
Hey Carl evening I am facing the same problem! If you got the solution so, please reply.