cbrx_get_usb (descriptors)
Request entire dump of a USB device’s descriptor information. This can be a lot of data for some devices (especially phones and tablets).
Syntax: see Call Structure
{ "method": "cbrx_get_usb, "params": ["descriptors, locationID | hub-serial "] } |
Variable | Description |
---|---|
locationID | The Location IDs as an Integer |
hub-serial | This is the serial number of the hub returned from cbrx_discover |
Returns
All variable names in the returned data match the names in Chapter 9 of the USB 3.2 specification for ease of reference. Each descriptors raw fields (as taken from the USB 3.2 spec) are represented first, and where appropriate an additional "Derived" member will be present that shows bitfields or resolved string descriptors.
For example, on the device’s main descriptor there is an iManufacturer field, which is the index of the string descriptor used for that name. This will also be present in Derived.Manufacturer.
Examples
Example JSON-RPC request:
{
"jsonrpc": "2.0",
"method": "cbrx_get_usb",
"params": ["descriptors", "123456789abcdef"],
"id": 0
}
Example successful response from a standard USB flash drive:
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"RawBytes": "120120030000000951092b17010001020301",
"bLength": 18,
"bDescriptorType": 1,
"bNumConfigurations": 1,
"bcdUSB": 800,
"bDeviceClass": 0,
"bDeviceSubClass": 0,
"bDeviceProtocol": 0,
"bMaxPacketSize0": 9,
"idVendor": 2385,
"idProduct": 5931,
"bcdDevice": 1,
"iManufacturer": 1,
"iProduct": 2,
"iSerialNumber": 3,
"Derived": {
"DescriptorType": "Device",
"CurrentConfiguration": 1,
"DeviceClass": "Reserved"
},
"Configurations": {
"1": [
{
"RawBytes": "09022c00010100ff8025",
"bLength": 9,
"bDescriptorType": 2,
"wTotalLength": 44,
"bConfigurationValue": 1,
"bmAttributes": 128,
"bNumDescriptors": 1,
"iConfiguration": 0,
"reserved1": 0,
"reserved2": 1,
"SelfPowered": 0,
"Derived": {
"DescriptorType": "Configuration",
"MaxPower": 37,
"RemoteWakeUp": 0,
"BusPowered": 0
}
},
{
"RawBytes": "090400000208065000",
"bLength": 9,
"bDescriptorType": 4,
"iInterface": 0,
"bInterfaceNumber": 0,
"bAlternateSetting": 0,
"bNumEndpoints": 2,
"bInterfaceClass": 8,
"bInterfaceSubClass": 6,
"bInterfaceProtocol": 80,
"Derived": {
"DescriptorType": "Interface"
}
},
{
"RawBytes": "0705ff8102000400",
"bLength": 7,
"bDescriptorType": 5,
"bInterval": 0,
"bEndpointAddress": 129,
"bmAttributes": 2,
"wMaxPacketSize": 1024,
"Derived": {
"DescriptorType": "Endpoint",
"EndpointAddress": 1,
"Direction": "In",
"Type": "Bulk"
}
},
{
"RawBytes": "06300f000000",
"bLength": 6,
"bDescriptorType": 48,
"wBytesPerInterval": 0,
"bMaxBurst": 15,
"bmAttributes": 0,
"Derived": {
"DescriptorType": "SuperSpeedEndpointCompanion",
"MaxStreams": 0,
"Mult": 0,
"SspCompanion": 0
}
},
{
"RawBytes": "07050202000400",
"bLength": 7,
"bDescriptorType": 5,
"bInterval": 0,
"bEndpointAddress": 2,
"bmAttributes": 2,
"wMaxPacketSize": 1024,
"Derived": {
"DescriptorType": "Endpoint",
"EndpointAddress": 2,
"Direction": "Out",
"Type": "Bulk"
}
},
{
"RawBytes": "06300f000000",
"bLength": 6,
"bDescriptorType": 48,
"wBytesPerInterval": 0,
"bMaxBurst": 15,
"bmAttributes": 0,
"Derived": {
"DescriptorType": "SuperSpeedEndpointCompanion",
"MaxStreams": 0,
"Mult": 0,
"SspCompanion": 0
}
}
]
},
"Strings": {
"1": "Kingston",
"2": "DataTraveler 70",
"3": "1831BFBD3065F551C96001E7"
},
"BOS": {
"RawBytes": "050f160002",
"bLength": 5,
"bDescriptorType": 15,
"Derived": {
"DescriptorType": "BOS"
},
"wTotalLength": 22,
"bNumDescriptors": 2,
"Capabilities": [
{
"RawBytes": "07100206000000",
"bLength": 7,
"bDescriptorType": 16,
"bDevCapabilityType": 2,
"bmAttributes": 6,
"Derived": {
"DescriptorType": "DeviceCapability",
"CapabilityType": "USB20Extension",
"LPMCapable": 1,
"BESLAndAlternateHIRDSupported": 1,
"BaselineBESLValid": 0,
"DeepBESLValid": 0,
"BaselineBESL": 0,
"DeepBESL": 0
}
},
{
"RawBytes": "0a1003000e00020affff07",
"bLength": 10,
"bDescriptorType": 16,
"bDevCapabilityType": 3,
"wU2DevExitLat": 2047,
"bmAttributes": 0,
"wSpeedsSupported": 14,
"bFunctionalitySupport": 2,
"bU1DevExitLat": 10,
"Derived": {
"DescriptorType": "DeviceCapability",
"CapabilityType": "SuperSpeedUSB",
"LTMCapable": 0,
"SpeedsSupported": [
"Full",
"High",
"SuperSpeed"
]
}
}
]
}
}
}```