Skip to content

Instantly share code, notes, and snippets.

@tmk
Created March 18, 2022 00:47
Show Gist options
  • Save tmk/415e64e71d8c6df7eea8e15c92539064 to your computer and use it in GitHub Desktop.
Save tmk/415e64e71d8c6df7eea8e15c92539064 to your computer and use it in GitHub Desktop.
Bus 005 Device 029: ID 4848:0001 q.m.k HHKB mod
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x4848
idProduct 0x0001
bcdDevice 1.04
iManufacturer 1 q.m.k
iProduct 2 HHKB mod
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x005b
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 64
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 123
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 34
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
$ report_desc_parse.sh -p 4848:0001
// /sys/bus/usb/drivers/usbhid/5-1:1.0/0003:4848:0001.00B8/report_descriptor:
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Keyboard), ; Keyboard (06h, application collection)
Collection (Application),
Usage Page (Keyboard), ; Keyboard/keypad (07h)
Usage Minimum (KB Leftcontrol), ; Keyboard left control (E0h, dynamic value)
Usage Maximum (KB Right GUI), ; Keyboard right GUI (E7h, dynamic value)
Logical Minimum (0),
Logical Maximum (1),
Report Count (8),
Report Size (1),
Input (Variable),
Report Count (1),
Report Size (8),
Input (Constant),
Usage Page (Keyboard), ; Keyboard/keypad (07h)
Usage Minimum (None), ; No event (00h, selector)
Usage Maximum (FFh),
Logical Minimum (0),
Logical Maximum (255),
Report Count (6),
Report Size (8),
Input,
Usage Page (LED), ; LEDs (08h)
Usage Minimum (01h),
Usage Maximum (05h),
Report Count (5),
Report Size (1),
Output (Variable),
Report Count (1),
Report Size (3),
Output (Constant),
End Collection
// /sys/bus/usb/drivers/usbhid/5-1:1.1/0003:4848:0001.00B9/report_descriptor:
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Mouse), ; Mouse (02h, application collection)
Collection (Application),
Report ID (2),
Usage (Pointer), ; Pointer (01h, physical collection)
Collection (Physical),
Usage Page (Button), ; Button (09h)
Usage Minimum (01h),
Usage Maximum (08h),
Logical Minimum (0),
Logical Maximum (1),
Report Count (8),
Report Size (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (X), ; X (30h, dynamic value)
Usage (Y), ; Y (31h, dynamic value)
Logical Minimum (-127),
Logical Maximum (127),
Report Count (2),
Report Size (8),
Input (Variable, Relative),
Usage (Wheel), ; Wheel (38h, dynamic value)
Logical Minimum (-127),
Logical Maximum (127),
Report Count (1),
Report Size (8),
Input (Variable, Relative),
Usage Page (Consumer), ; Consumer (0Ch)
Usage (AC Pan), ; AC pan (0238h, linear control)
Logical Minimum (-127),
Logical Maximum (127),
Report Count (1),
Report Size (8),
Input (Variable, Relative),
End Collection,
End Collection,
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Sys Control), ; System control (80h, application collection)
Collection (Application),
Report ID (3),
Usage Minimum (Pointer), ; Pointer (01h, physical collection)
Usage Maximum (Sys Dspl LCD Autoscale), ; System display LCD autoscale (B7h, one-shot control)
Logical Minimum (1),
Logical Maximum (183),
Report Count (1),
Report Size (16),
Input,
End Collection,
Usage Page (Consumer), ; Consumer (0Ch)
Usage (Consumer Control), ; Consumer control (01h, application collection)
Collection (Application),
Report ID (4),
Usage Minimum (Consumer Control), ; Consumer control (01h, application collection)
Usage Maximum (02A0h),
Logical Minimum (1),
Logical Maximum (672),
Report Count (1),
Report Size (16),
Input,
End Collection
// /sys/bus/usb/drivers/usbhid/5-1:1.2/0003:4848:0001.00BA/report_descriptor:
Usage Page (FF31h), ; FF31h, vendor-defined
Usage (74h),
Collection (Application),
Usage (75h),
Logical Minimum (0),
Logical Maximum (255),
Report Count (32),
Report Size (8),
Input (Variable),
Usage (76h),
Logical Minimum (0),
Logical Maximum (255),
Report Count (32),
Report Size (8),
Output (Variable),
End Collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment