-
-
Notifications
You must be signed in to change notification settings - Fork 406
RawHID API
Nico edited this page Dec 21, 2015
·
19 revisions
Working examples can be found in the example folder. Feature and out reports are both supported.
Useful links:
- https://www.pjrc.com/teensy/rawhid.html
- https://www.pjrc.com/teensy/hid_listen.html
- http://www.signal11.us/oss/hidapi/
- http://www.signal11.us/oss/hidapi/hidapi/doxygen/html/group__API.html
A patched version of the program linked above can be found inside the extras folder. The example is far away from being perfect. I recommend you to use the hidapi instead. Needs further testing. Should work under windows as well, but not tested.
2.4.2 fixes the 64+ byte RawHID issue. IDE 1.6.8 is required for this patch.
As stated in the links above you need to add a udev rule or need root access (sudo) to open the hid device. A full, more detailed udev.rules file can be found inside the /extras folder of the library. For a quick version use this command:
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"' | sudo tee /etc/udev/rules.d/ArduinoRawHID.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
Usage pages (seems to be useless for programs):
RAWHID_USAGE_PAGE 0xFFC0 // recommended: 0xFF00 to 0xFFFF
RAWHID_USAGE 0x0C00 // recommended: 0x0100 to 0xFFFF
Copyright (c) 2014-2015 NicoHood