From 7a91c93319f75c37ba6bf268d8270947f0bf8b22 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 23 Oct 2021 12:40:24 -0700 Subject: [PATCH] add lsusb --- EXAMPLES.md | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/EXAMPLES.md b/EXAMPLES.md index e5367789..5a6e28b3 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -1917,6 +1917,128 @@ lsof | jc --lsof -p # or: jc -p lsof } ] ``` +### lsusb +```bash +lsusb -v | jc --lsusb -p # or: jc -p lsusb -v +``` +```json +[ + { + "bus": "002", + "device": "001", + "id": "1d6b:0001", + "description": "Linux Foundation 1.1 root hub", + "device_descriptor": { + "bLength": { + "value": "18" + }, + "bDescriptorType": { + "value": "1" + }, + "bcdUSB": { + "value": "1.10" + }, + ... + "bNumConfigurations": { + "value": "1" + }, + "configuration_descriptor": { + "bLength": { + "value": "9" + }, + ... + "iConfiguration": { + "value": "0" + }, + "bmAttributes": { + "value": "0xe0", + "attributes": [ + "Self Powered", + "Remote Wakeup" + ] + }, + "MaxPower": { + "description": "0mA" + }, + "interface_descriptors": [ + { + "bLength": { + "value": "9" + }, + ... + "bInterfaceProtocol": { + "value": "0", + "description": "Full speed (or root) hub" + }, + "iInterface": { + "value": "0" + }, + "endpoint_descriptors": [ + { + "bLength": { + "value": "7" + }, + ... + "bmAttributes": { + "value": "3", + "attributes": [ + "Transfer Type Interrupt", + "Synch Type None", + "Usage Type Data" + ] + }, + "wMaxPacketSize": { + "value": "0x0002", + "description": "1x 2 bytes" + }, + "bInterval": { + "value": "255" + } + } + ] + } + ] + } + }, + "hub_descriptor": { + "bLength": { + "value": "9" + }, + ... + "wHubCharacteristic": { + "value": "0x000a", + "attributes": [ + "No power switching (usb 1.0)", + "Per-port overcurrent protection" + ] + }, + ... + "hub_port_status": { + "Port 1": { + "value": "0000.0103", + "attributes": [ + "power", + "enable", + "connect" + ] + }, + "Port 2": { + "value": "0000.0103", + "attributes": [ + "power", + "enable", + "connect" + ] + } + } + }, + "device_status": { + "value": "0x0001", + "description": "Self Powered" + } + } +] +``` ### mount ```bash mount | jc --mount -p # or: jc -p mount