Skip to content

Instantly share code, notes, and snippets.

@tmk
Created July 12, 2021 01:20
Show Gist options
  • Save tmk/5a8dcd84801a33f286c6677f1fa7e914 to your computer and use it in GitHub Desktop.
Save tmk/5a8dcd84801a33f286c6677f1fa7e914 to your computer and use it in GitHub Desktop.
Dygma Raise Keyboard - USB Descriptor
Dygma Raise Keyboard https://dygma.com/
// idVendor:1209
// idProduct:2201
Interfaces
0: CDC Control
1: CDC Data
2: HID(3,0,0) Keyboard, System
1: Mouse(8-bit XY)
4: Consumer Control
5: System Contorl
8: keybaord(NKRO 04-DDh)
3: HID(3,0,0)
0: Mouse(16-bit XY)
0x12, // bLength
0x01, // bDescriptorType (Device)
0x00, 0x02, // bcdUSB 2.00
0xEF, // bDeviceClass
0x02, // bDeviceSubClass
0x01, // bDeviceProtocol
0x40, // bMaxPacketSize0 64
0x09, 0x12, // idVendor 0x1209
0x01, 0x22, // idProduct 0x2201
0x00, 0x01, // bcdDevice 2.00
0x01, // iManufacturer (String Index)
0x02, // iProduct (String Index)
0x03, // iSerialNumber (String Index)
0x01, // bNumConfigurations 1
0x09, // bLength
0x02, // bDescriptorType (Configuration)
0x7D, 0x00, // wTotalLength 125
0x04, // bNumInterfaces 4
0x01, // bConfigurationValue
0x00, // iConfiguration (String Index)
0xA0, // bmAttributes Remote Wakeup
0xFA, // bMaxPower 500mA
0x08, // bLength
0x0B, // bDescriptorType (Interface Association)
0x00, // bFirstInterface
0x02, // bInterfaceCount
0x02, // bFunctionClass (Communiations and CDC Control)
0x02, // bFunctionSubClass (ACM)
0x00, // bFunctionProtocol
0x00, // iFunction
0x09, // bLength
0x04, // bDescriptorType (Interface)
0x00, // bInterfaceNumber 0
0x00, // bAlternateSetting
0x01, // bNumEndpoints 1
0x02, // bInterfaceClass (Communiations and CDC Control)
0x02, // bInterfaceSubClass (ACM)
0x00, // bInterfaceProtocol
0x00, // iInterface (String Index)
0x05, // bLength
0x24, // bDescriptorType (Dependant on Type)
0x00, 0x10, 0x01,
0x04, // bLength
0x24, // bDescriptorType (Dependant on Type)
0x02, 0x06,
0x05, // bLength
0x24, // bDescriptorType (Dependant on Type)
0x06, 0x00, 0x01,
0x05, // bLength
0x24, // bDescriptorType (Dependant on Type)
0x01, 0x01, 0x01,
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x81, // bEndpointAddress (IN/D2H)
0x03, // bmAttributes (Interrupt)
0x10, 0x00, // wMaxPacketSize 16
0x10, // bInterval 16 (unit depends on device speed)
0x09, // bLength
0x04, // bDescriptorType (Interface)
0x01, // bInterfaceNumber 1
0x00, // bAlternateSetting
0x02, // bNumEndpoints 2
0x0A, // bInterfaceClass (CDC-Data)
0x00, // bInterfaceSubClass
0x00, // bInterfaceProtocol
0x00, // iInterface (String Index)
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x02, // bEndpointAddress (OUT/H2D)
0x02, // bmAttributes (Bulk)
0x40, 0x00, // wMaxPacketSize 64
0x00, // bInterval 0 (unit depends on device speed)
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x83, // bEndpointAddress (IN/D2H)
0x02, // bmAttributes (Bulk)
0x40, 0x00, // wMaxPacketSize 64
0x00, // bInterval 0 (unit depends on device speed)
0x09, // bLength
0x04, // bDescriptorType (Interface)
0x02, // bInterfaceNumber 2
0x00, // bAlternateSetting
0x01, // bNumEndpoints 1
0x03, // bInterfaceClass (HID)
0x00, // bInterfaceSubClass (No SubClass)
0x00, // bInterfaceProtocol (None)
0x00, // iInterface (String Index)
0x09, // bLength
0x21, // bDescriptorType (HID)
0x01, 0x01, // bcdHID 1.01
0x00, // bCountryCode
0x01, // bNumDescriptors
0x22, // bDescriptorType[0] (HID)
0xAC, 0x00, // wDescriptorLength[0] 172
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x84, // bEndpointAddress (IN/D2H)
0x03, // bmAttributes (Interrupt)
0x40, 0x00, // wMaxPacketSize 64
0x01, // bInterval 1 (unit depends on device speed)
0x09, // bLength
0x04, // bDescriptorType (Interface)
0x03, // bInterfaceNumber 3
0x00, // bAlternateSetting
0x01, // bNumEndpoints 1
0x03, // bInterfaceClass (HID)
0x00, // bInterfaceSubClass (No SubClass)
0x00, // bInterfaceProtocol (None)
0x00, // iInterface (String Index)
0x09, // bLength
0x21, // bDescriptorType (HID)
0x01, 0x01, // bcdHID 1.01
0x00, // bCountryCode
0x01, // bNumDescriptors
0x22, // bDescriptorType[0] (HID)
0x35, 0x00, // wDescriptorLength[0] 53
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x85, // bEndpointAddress (IN/D2H)
0x03, // bmAttributes (Interrupt)
0x40, 0x00, // wMaxPacketSize 64
0x01, // bInterval 1 (unit depends on device speed)
// 143 bytes
0x05, 0x0C, /* Usage Page (Consumer), */
0x09, 0x01, /* Usage (Consumer Control), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x04, /* Report ID (4), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x03, /* Logical Maximum (1023), */
0x19, 0x00, /* Usage Minimum (00h), */
0x2A, 0xFF, 0x03, /* Usage Maximum (03FFh), */
0x95, 0x04, /* Report Count (4), */
0x75, 0x10, /* Report Size (16), */
0x81, 0x00, /* Input, */
0xC0, /* End Collection, */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x06, /* Usage (Keyboard), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x08, /* Report ID (8), */
0x05, 0x07, /* Usage Page (Keyboard), */
0x19, 0xE0, /* Usage Minimum (KB Leftcontrol), */
0x29, 0xE7, /* Usage Maximum (KB Right GUI), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x75, 0x01, /* Report Size (1), */
0x95, 0x08, /* Report Count (8), */
0x81, 0x02, /* Input (Variable), */
0x05, 0x08, /* Usage Page (LED), */
0x19, 0x01, /* Usage Minimum (01h), */
0x29, 0x08, /* Usage Maximum (08h), */
0x95, 0x08, /* Report Count (8), */
0x75, 0x01, /* Report Size (1), */
0x91, 0x02, /* Output (Variable), */
0x05, 0x07, /* Usage Page (Keyboard), */
0x75, 0x04, /* Report Size (4), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x01, /* Input (Constant), */
0x19, 0x04, /* Usage Minimum (KB A), */
0x29, 0xDD, /* Usage Maximum (KP Hexadecimal), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x75, 0x01, /* Report Size (1), */
0x95, 0xD9, /* Report Count (217), */
0x81, 0x02, /* Input (Variable), */
0x75, 0x03, /* Report Size (3), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x01, /* Input (Constant), */
0xC0, /* End Collection, */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x80, /* Usage (Sys Control), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x05, /* Report ID (5), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x19, 0x00, /* Usage Minimum (00h), */
0x29, 0xFF, /* Usage Maximum (FFh), */
0x95, 0x01, /* Report Count (1), */
0x75, 0x08, /* Report Size (8), */
0x81, 0x00, /* Input, */
0xC0, /* End Collection, */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x02, /* Usage (Mouse), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x01, /* Report ID (1), */
0x05, 0x09, /* Usage Page (Button), */
0x19, 0x01, /* Usage Minimum (01h), */
0x29, 0x08, /* Usage Maximum (08h), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x95, 0x08, /* Report Count (8), */
0x75, 0x01, /* Report Size (1), */
0x81, 0x02, /* Input (Variable), */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x30, /* Usage (X), */
0x09, 0x31, /* Usage (Y), */
0x09, 0x38, /* Usage (Wheel), */
0x15, 0x81, /* Logical Minimum (-127), */
0x25, 0x7F, /* Logical Maximum (127), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x03, /* Report Count (3), */
0x81, 0x06, /* Input (Variable, Relative), */
0x05, 0x0C, /* Usage Page (Consumer), */
0x0A, 0x38, 0x02, /* Usage (AC Pan), */
0x15, 0x81, /* Logical Minimum (-127), */
0x25, 0x7F, /* Logical Maximum (127), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x06, /* Input (Variable, Relative), */
0xC0 /* End Collection */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x02, /* Usage (Mouse), */
0xA1, 0x01, /* Collection (Application), */
0x05, 0x09, /* Usage Page (Button), */
0x19, 0x01, /* Usage Minimum (01h), */
0x29, 0x08, /* Usage Maximum (08h), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x95, 0x08, /* Report Count (8), */
0x75, 0x01, /* Report Size (1), */
0x81, 0x02, /* Input (Variable), */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x30, /* Usage (X), */
0x09, 0x31, /* Usage (Y), */
0x16, 0x00, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x7F, /* Logical Maximum (32767), */
0x75, 0x10, /* Report Size (16), */
0x95, 0x02, /* Report Count (2), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x38, /* Usage (Wheel), */
0x15, 0x81, /* Logical Minimum (-127), */
0x25, 0x7F, /* Logical Maximum (127), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x06, /* Input (Variable, Relative), */
0xC0 /* End Collection */
*** HID console connected: TMK USB Descriptor Dumper (FEED:005B:0814)
TMK:fb6ee10f+/LUFA
USB configured.
Keyboard start.
usb_state: 12
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
usb_state: 90
// Address:01
// lowspeed:00
// idVendor:1209
// idProduct:2201
// langid:0409
// String0:
// 04 03 09 04
// iManufacturer:
ERROR:05
// iProduct:
ERROR:05
// iSerialNumber:
ERROR:05
// Device Descriptor:
12 01 00 02 EF 02 01 40 09 12 01 22 00 01 01 02
03 01
// Config0: len:007D
09 02 7D 00 04 01 00 A0 FA 08 0B 00 02 02 02 00
00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 04
24 02 06 05 24 06 00 01 05 24 01 01 01 07 05 81
03 10 00 10 09 04 01 00 02 0A 00 00 00 07 05 02
02 40 00 00 07 05 83 02 40 00 00 09 04 02 00 01
03 00 00 00 09 21 01 01 00 01 22 AC 00 07 05 84
03 40 00 01 09 04 03 00 01 03 00 00 00 09 21 01
01 00 01 22 35 00 07 05 85 03 40 00 01
// Report2: len:00AC
05 0C 09 01 A1 01 85 04 15 00 26 FF 03 19 00 2A
FF 03 95 04 75 10 81 00 C0 05 01 09 06 A1 01 85
08 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81
02 05 08 19 01 29 08 95 08 75 01 91 02 05 07 75
04 95 01 81 01 19 04 29 DD 15 00 25 01 75 01 95
D9 81 02 75 03 95 01 81 01 C0 05 01 09 80 A1 01
85 05 15 00 26 FF 00 19 00 29 FF 95 01 75 08 81
00 C0 05 01 09 02 A1 01 85 01 05 09 19 01 29 08
15 00 25 01 95 08 75 01 81 02 05 01 09 30 09 31
09 38 15 81 25 7F 75 08 95 03 81 06 05 0C 0A 38
02 15 81 25 7F 75 08 95 01 81 06 C0
// Report3: len:0035
05 01 09 02 A1 01 05 09 19 01 29 08 15 00 25 01
95 08 75 01 81 02 05 01 09 30 09 31 16 00 00 26
FF 7F 75 10 95 02 81 02 09 38 15 81 25 7F 75 08
95 01 81 06 C0
// Parse data here: http://eleccelerator.com/usbdescreqparser/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment