最終更新:2015-08-31 (月) 16:53:09 (3154d)  

usbhid-dump
Top / usbhid-dump

Dump USB HID device report descriptors and streams

help

# usbhid-dump --help
Usage: usbhid-dump [OPTION]...
Dump USB device HID report descriptor(s) and/or stream(s).

Options:
  -h, --help                       output this help message and exit
  -v, --version                    output version information and exit

  -s, -a, --address=bus[:dev]      limit interfaces by bus number
                                   (1-255) and device address (1-255),
                                   decimal; zeroes match any
  -d, -m, --model=vid[:pid]        limit interfaces by vendor and
                                   product IDs (0001-ffff), hexadecimal;
                                   zeroes match any
  -i, --interface=NUMBER           limit interfaces by number (0-254),
                                   decimal; 255 matches any

  -e, --entity=STRING              what to dump: either "descriptor",
                                   "stream" or "all"; value can be
                                   abbreviated

  -t, --stream-timeout=NUMBER      stream interrupt transfer timeout, ms;
                                   zero means infinity
  -p, --stream-paused              start with the stream dump output
                                   paused
  -f, --stream-feedback            enable stream dumping feedback: for
                                   every transfer dumped a dot is
                                   printed to stderr

Default options: --stream-timeout=60000 --entity=descriptor

Signals:
  USR1/USR2                        pause/resume the stream dump output

メモ

hidrd-convertとの組み合わせ

  • $ sudo usbhid-dump -a2:3 -i0 | grep -v : | xxd -r -p | hidrd-convert -o spec
    Usage Page (Desktop),               ; Generic desktop controls (01h)
    Usage (Mouse),                      ; Mouse (02h, application collection)
    Collection (Application),
        Usage (Pointer),                ; Pointer (01h, physical collection)
        Collection (Physical),
            Usage Page (Button),        ; Button (09h)
            Usage Minimum (01h),
            Usage Maximum (03h),
            Logical Minimum (0),
            Logical Maximum (1),
            Report Size (1),
            Report Count (3),
            Input (Variable),
            Report Size (5),
            Report Count (1),
            Input (Constant),
            Usage Page (Desktop),       ; Generic desktop controls (01h)
            Usage (X),                  ; X (30h, dynamic value)
            Usage (Y),                  ; Y (31h, dynamic value)
            Usage (Wheel),              ; Wheel (38h, dynamic value)
            Logical Minimum (-127),
            Logical Maximum (127),
            Report Size (8),
            Report Count (3),
            Input (Variable, Relative),
        End Collection,
    End Collection

関連