usbhid-dump is a utility based on libusb 1.0 used to dump USB HID device report descriptors and the data streams (reports) sent by specific device interfaces.
⚠️ Critical Safety Warning
When running as a superuser, always limit your device selection using options like --address or --model. If you do not limit the selection, usbhid-dump will attempt to dump every possible device. If you are using a USB keyboard to control your terminal, it may be detached, causing you to lose control of your system.
If a keyboard is detached, wait for the interrupt transfer timeout (default is 60 seconds) for the process to abort automatically before touching the keyboard.
Basic Usage Example
To dump both the descriptor and the stream for a specific device at bus 2, address 3:
sudo usbhid-dump --entity=all --address=2:3