mac-hid-dump
is a small command-line app to output the HID Report Descriptors of all connected HID devices. Think of it as sort of a MacOS version of usbhid-dump
. It is designed to inspect HID devices for use with hidapi
, node-hid
, or similar HID libraries. The output can be parsed directly by the USB Descriptor Parser.
mac-hid-dump
uses some of the Mac-specific code from libusb/hidapi, a cross-platform library for communicating with HID devies. It is not dependent on hidapi
though.
To use mac-hid-dump
, download the zip file from the Releases page, unzip it, and run it.
When run, its output looks like the below.
tod@demo ~/Downloads/mac-hid-dump$ ./mac-hid-dump
mac-hid-dump:
16C0 0486: - Teensyduino RawHID Device
DESCRIPTOR:
06 c9 ff 09 04 a1 5c 75 08 15 00 26 ff 00 95 40
09 75 81 02 95 20 09 76 91 02 95 04 09 76 b1 02
c0
(33 bytes)
16C0 0486: - Teensyduino RawHID Device
DESCRIPTOR:
06 ab ff 0a 00 02 a1 01 75 08 15 00 26 ff 00 95
40 09 01 81 02 95 40 09 02 91 02 c0
(28 bytes)
27B8 01ED: ThingM - blink(1) mk3
DESCRIPTOR:
06 ab ff 0a 00 20 a1 01 15 00 26 ff 00 75 08 85
01 95 08 09 00 b2 02 01 75 08 85 02 95 3c 09 00
b2 02 01 c0
(36 bytes)
tod@demo ~/Downloads/mac-hid-dump$
This example shows a Teensy RawHID and a blink(1) USB LED. The Teensy RawHID descriptor shows a simple "RawHID" example of a single 64-byte report using no reportIDs for both Input and Output. The blink(1) descriptor shows an example that defines two reportID-based Feature reports: an 8-byte one and a 60-byte one.