Skip to content

Instantly share code, notes, and snippets.

@tmk
Created July 30, 2021 02:22
Show Gist options
  • Save tmk/aaa071e9baf9797c12f3f4bba620841b to your computer and use it in GitHub Desktop.
Save tmk/aaa071e9baf9797c12f3f4bba620841b to your computer and use it in GitHub Desktop.
Nordic nRF52840 DK - 239a:0029 239a:8029
Bus 003 Device 126: ID 239a:0029 Nordic PCA10056
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x239a
idProduct 0x0029
bcdDevice 1.00
iManufacturer 1 Nordic
iProduct 2 PCA10056
iSerial 3 7E093FFBB771BB97
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0062
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 4 nRF Serial
CDC Header:
bcdCDC 1.20
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
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 16
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 5 nRF UF2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
//////////////////////////////////////////////////////////////////////
// USB_desc_dump
// Address: 01
// Lowspeed: 00
// Devicer dump:
12 01 00 02 EF 02 01 40 9A 23 29 00 00 01 01 02
03 01
// Device:
bLength: 12
bDescriptorType: 01
bcdUSB: 0200
bDeviceClass: EF
bDeviceSubClass: 02
bDeviceProtocol: 01
bMaxPacketSize0: 40
idVendor: 239A
idProduct: 0029
bcdDevice: 0100
iManufacturer: 01
iProduct: 02
iSerialNumber: 03
bNumConfigurations: 01
// String Zero: len: 04
// 04 03 09 04
// LangId: 0409
// iManufacturer: String1(0409): len: 0E
// 0E 03 4E 00 6F 00 72 00 64 00 69 00 63 00
// Nordic
// iProduct: String2(0409): len: 12
// 12 03 50 00 43 00 41 00 31 00 30 00 30 00 35 00
// 36 00
// PCA10056
// iSerialNumber: String3(0409): len: 22
// 22 03 37 00 45 00 30 00 39 00 33 00 46 00 46 00
// 42 00 42 00 37 00 37 00 31 00 42 00 42 00 39 00
// 37 00
// 7E093FFBB771BB97
// Config0 dump: len: 0062
09 02 62 00 03 01 00 A0 32 08 0B 00 02 02 02 01
00 09 04 00 00 01 02 02 01 04 05 24 00 20 01 05
24 01 00 01 04 24 02 02 05 24 06 00 01 07 05 81
03 08 00 10 09 04 01 00 02 0A 00 00 00 07 05 02
02 40 00 00 07 05 82 02 40 00 00 09 04 02 00 02
08 06 50 05 07 05 03 02 40 00 00 07 05 83 02 40
00 00
// Config:
bLength: 09
bDescriptorType: 02
wTotalLength: 0062
bNumInterfaces: 03
bConfigurationValue: 01
iConfiguration: 00
bmAttributes: A0
bMaxPower: 32
// Unknown Desc: type: 0B len: 08
08 0B 00 02 02 02 01 00
// Interface0.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 00
bAlternateSetting: 00
bNumEndpoints: 01
bInterfaceClass: 02
bInterfaceSubClass: 02
bInterfaceProtocol: 01
iInterface: 04
// iInterface: String4(0409): len: 16
// 16 03 6E 00 52 00 46 00 20 00 53 00 65 00 72 00
// 69 00 61 00 6C 00
// nRF Serial
// Unknown Desc: type: 24 len: 05
05 24 00 20 01
// Unknown Desc: type: 24 len: 05
05 24 01 00 01
// Unknown Desc: type: 24 len: 04
04 24 02 02
// Unknown Desc: type: 24 len: 05
05 24 06 00 01
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 81
bmAttributes: 03
wMaxPacketSize: 0008
bInterval: 10
// Interface1.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 01
bAlternateSetting: 00
bNumEndpoints: 02
bInterfaceClass: 0A
bInterfaceSubClass: 00
bInterfaceProtocol: 00
iInterface: 00
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 02
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 82
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Interface2.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 02
bAlternateSetting: 00
bNumEndpoints: 02
bInterfaceClass: 08
bInterfaceSubClass: 06
bInterfaceProtocol: 50
iInterface: 05
// iInterface: String5(0409): len: 10
// 10 03 6E 00 52 00 46 00 20 00 55 00 46 00 32 00
// nRF UF2
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 03
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 83
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Parse data here: http://eleccelerator.com/usbdescreqparser/
Bus 003 Device 116: ID 239a:8029 Nordic nRF52840 DK
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x239a
idProduct 0x8029
bcdDevice 1.00
iManufacturer 1 Nordic
iProduct 2 nRF52840 DK
iSerial 3 7E093FFBB771BB97
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0064
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 0
iInterface 0
CDC Header:
bcdCDC 1.20
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
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 16
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
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 63
Report Descriptor: (length is 63)
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x06 ] 6
Keyboard
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Usage Page, data= [ 0x07 ] 7
Keyboard
Item(Local ): Usage Minimum, data= [ 0xe0 ] 224
Control Left
Item(Local ): Usage Maximum, data= [ 0xe7 ] 231
GUI Right
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x08 ] 8
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Usage Page, data= [ 0x07 ] 7
Keyboard
Item(Local ): Usage Minimum, data= [ 0x00 ] 0
No Event
Item(Local ): Usage Maximum, data= [ 0xff ] 255
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff ] 255
Item(Global): Report Count, data= [ 0x06 ] 6
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x00 ] 0
Data Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Usage Page, data= [ 0x08 ] 8
LEDs
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
NumLock
Item(Local ): Usage Maximum, data= [ 0x05 ] 5
Kana
Item(Global): Report Count, data= [ 0x05 ] 5
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x03 ] 3
Item(Main ): Output, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 2
Device Status: 0x0000
(Bus Powered)
//////////////////////////////////////////////////////////////////////
// USB_desc_dump
// Address: 01
// Lowspeed: 00
// Devicer dump:
12 01 00 02 EF 02 01 40 9A 23 29 80 00 01 01 02
03 01
// Device:
bLength: 12
bDescriptorType: 01
bcdUSB: 0200
bDeviceClass: EF
bDeviceSubClass: 02
bDeviceProtocol: 01
bMaxPacketSize0: 40
idVendor: 239A
idProduct: 8029
bcdDevice: 0100
iManufacturer: 01
iProduct: 02
iSerialNumber: 03
bNumConfigurations: 01
// String Zero: len: 04
// 04 03 09 04
// LangId: 0409
// iManufacturer: String1(0409): len: 0E
// 0E 03 4E 00 6F 00 72 00 64 00 69 00 63 00
// Nordic
// iProduct: String2(0409): len: 18
// 18 03 6E 00 52 00 46 00 35 00 32 00 38 00 34 00
// 30 00 20 00 44 00 4B 00
// nRF52840 DK
// iSerialNumber: String3(0409): len: 22
// 22 03 37 00 45 00 30 00 39 00 33 00 46 00 46 00
// 42 00 42 00 37 00 37 00 31 00 42 00 42 00 39 00
// 37 00
// 7E093FFBB771BB97
// Config0 dump: len: 0064
09 02 64 00 03 01 00 A0 32 08 0B 00 02 02 02 00
00 09 04 00 00 01 02 02 00 00 05 24 00 20 01 05
24 01 00 01 04 24 02 02 05 24 06 00 01 07 05 81
03 08 00 10 09 04 01 00 02 0A 00 00 00 07 05 01
02 40 00 00 07 05 82 02 40 00 00 09 04 02 00 01
03 00 00 00 09 21 11 01 00 01 22 3F 00 07 05 83
03 40 00 02
// Config:
bLength: 09
bDescriptorType: 02
wTotalLength: 0064
bNumInterfaces: 03
bConfigurationValue: 01
iConfiguration: 00
bmAttributes: A0
bMaxPower: 32
// Unknown Desc: type: 0B len: 08
08 0B 00 02 02 02 00 00
// Interface0.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 00
bAlternateSetting: 00
bNumEndpoints: 01
bInterfaceClass: 02
bInterfaceSubClass: 02
bInterfaceProtocol: 00
iInterface: 00
// Unknown Desc: type: 24 len: 05
05 24 00 20 01
// Unknown Desc: type: 24 len: 05
05 24 01 00 01
// Unknown Desc: type: 24 len: 04
04 24 02 02
// Unknown Desc: type: 24 len: 05
05 24 06 00 01
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 81
bmAttributes: 03
wMaxPacketSize: 0008
bInterval: 10
// Interface1.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 01
bAlternateSetting: 00
bNumEndpoints: 02
bInterfaceClass: 0A
bInterfaceSubClass: 00
bInterfaceProtocol: 00
iInterface: 00
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 01
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 82
bmAttributes: 02
wMaxPacketSize: 0040
bInterval: 00
// Interface2.0:
bLength: 09
bDescriptorType: 04
bInterfaceNumber: 02
bAlternateSetting: 00
bNumEndpoints: 01
bInterfaceClass: 03
bInterfaceSubClass: 00
bInterfaceProtocol: 00
iInterface: 00
// HID:
bLength: 09
bDescriptorType: 21
bcdHID: 0111
bCountryCode: 00
bNumDescriptors: 01
bDescrType: 22
wDescriptorLength: 003F
// Report0 dump: len: 003F
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 01 05 07 19 00
29 FF 15 00 25 FF 95 06 75 08 81 00 05 08 19 01
29 05 95 05 75 01 91 02 95 01 75 03 91 01 C0
// Report:
Usage Page Gen Desktop Ctrls(01)
Usage Keypad
Collection Application
Usage Page Kbrd/Keypad(07)
Usage Min(E0)
Usage Max(E7)
Logical Min(00)
Logical Max(01)
Report Count(08)
Report Size(01)
Input(00000010)
Report Count(01)
Report Size(08)
Input(00000001)
Usage Page Kbrd/Keypad(07)
Usage Min(00)
Usage Max(FF)
Logical Min(00)
Logical Max(FF)
Report Count(06)
Report Size(08)
Input(00000000)
Usage Page LEDs(08)
Usage Min(01)
Usage Max(05)
Report Count(05)
Report Size(01)
Output(00000010)
Report Count(01)
Report Size(03)
Output(00000001)
End Collection
// Endpoint:
bLength: 07
bDescriptorType: 05
bEndpointAddress: 83
bmAttributes: 03
wMaxPacketSize: 0040
bInterval: 02
---
https://eleccelerator.com/usbdescreqparser/
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application)
0x05, 0x07, // Usage Page (Kbrd/Keypad)
0x19, 0xE0, // Usage Minimum (0xE0)
0x29, 0xE7, // Usage Maximum (0xE7)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0x08, // Report Count (8)
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x01, // Report Count (1)
0x75, 0x08, // Report Size (8)
0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x07, // Usage Page (Kbrd/Keypad)
0x19, 0x00, // Usage Minimum (0x00)
0x29, 0xFF, // Usage Maximum (0xFF)
0x15, 0x00, // Logical Minimum (0)
0x25, 0xFF, // Logical Maximum (-1)
0x95, 0x06, // Report Count (6)
0x75, 0x08, // Report Size (8)
0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x08, // Usage Page (LEDs)
0x19, 0x01, // Usage Minimum (Num Lock)
0x29, 0x05, // Usage Maximum (Kana)
0x95, 0x05, // Report Count (5)
0x75, 0x01, // Report Size (1)
0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3)
0x91, 0x01, // Output (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0xC0, // End Collection
// 63 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment