-
Notifications
You must be signed in to change notification settings - Fork 466
Home
For cross platform communication with HID devices, libusb project recommends HIDAPI.
Any modern Linux system with either hidraw or libusb-1.0. Take note hidraw will support different transport like USB and Bluetooth.
Any modern version of macOS (PowerPC or x86 either in 32 and 64 bits or Apple Silicon) Note: the device should be be bound to the kernel HID driver.
Windows 7 and later, USB HID device, Bluetooth/BLE HID device, I2C HID device, etc
Only device with ugen driver are supported, using libusb backend.
hidapi PR #730 will add hidraw backend.
Only device with ugen driver are supported, using libusb backend
Only device with uhid driver are supported, using uhid backend. Using libusb backend may be possible as well but you may need to rebuild the kernel.
As of now, hidraw backend may not work. You may want to try libusb backend.
HIDAPI follows (at least tries to) the Semantic Versioning scheme. Even though we're still at version 0.x.y - we're doing our best to keep backward compatibility across releases.
libusb -- https://github.com/libusb/libusb/wiki
Original version of hidapi -- https://github.com/signal11/hidapi
hidapi fork with an hid report parser based on the above old version of hidapi -- https://github.com/supercollider/hidapi
hidapitester command line tool based on HIDAPI -- https://github.com/todbot/hidapitester
hidpytoy: GUI tool based on HIDAPI -- https://github.com/todbot/hidpytoy
Python binding for HIDAPI cython-hidapi -- https://github.com/trezor/cython-hidapi
nodejs binding -- https://github.com/node-hid/node-hid.git
Rust binding -- https://github.com/ruabmbua/hidapi-rs
Single header C++23 wrapper -- https://github.com/acdemiralp/hid.hpp
Java binding -- https://github.com/gary-rowe/hid4java
QT wrapper for HIDAPI -- https://github.com/simonmeaden/qhidapi
Ruby binding -- https://rubygems.org/gems/hidapi/
C++ wrapper -- https://github.com/sensics/HIDAPIpp
.NET binding -- https://github.com/badcel/HidApi.Net.git and https://github.com/alexgubanow/hidapiw
Go binding -- https://github.com/sstallion/go-hid
WIP Kotlin Native binding -- https://git.sr.ht/~z3ntu/kotlin-native-hidapi
Free Pascal bindings for HIDAPI -- https://github.com/dioannidis/HIDAPI.pas
Erlang binding (requires a fork version of hidapi) -- https://github.com/tonyrog/hid
- hidapi is not thread-safe in general. How to use hidapi in multithreaded application?
- How to use hidapi with unrooted Android devices
- Platform-specific behaviors and limitations (Windows backend, Bluetooth, etc.)
- See Known Issues.
- How to build hidapi under NetBSD? You need to use CMake.
Something like the following.
cmake .. -D HIDAPI_BUILD_HIDTEST=1 -D CMAKE_C_FLAGS=-I/usr/pkg/include -D CMAKE_EXE_LINKER_FLAGS=-R/usr/pkg/lib -DCMAKE_INSTALL_PREFIX=/usr/pkg
- Windows HID Transport
https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/hid-transports
- Linux HID transport and hidraw
https://github.com/torvalds/linux/blob/master/Documentation/hid/hid-transport.rst
https://github.com/torvalds/linux/blob/master/Documentation/hid/hidraw.rst