#usb #usb-device #hardware #tree-view

app usbtree

Tree view of USB devices wih verbose details

1 unstable release

0.1.0 Jul 12, 2021

#83 in #usb-device

GPL-3.0+

22KB
232 lines

build status License Universal binary

USBTREE

A simple binary to show the tree of available USB devices on the system. which is more readable than what lsusb -vt shows and provides better overall info.

Example output

Simple
╤
├── Linux 4.15.0-147-generic xhci-hcd: xHCI Host Controller
│   ├── VIA Labs, Inc.: USB2.0 Hub
│   │   ├── VIA Labs, Inc.: USB2.0 Hub
│   │   │   └── Google: AOSP on blueline
│   │   ├── SAMSUNG: SAMSUNG_Android
│   │   ├── VIA Labs, Inc.: USB2.0 Hub
│   │   │   ├── SAMSUNG: SAMSUNG_Android
│   │   │   └── SAMSUNG: SAMSUNG_Android
│   │   └── VIA Labs, Inc.: USB2.0 Hub
│   │       ├── SAMSUNG: SAMSUNG_Android
│   │       ├── HUAWEI: BAH3-W09
│   │       └── Sony: H9436
│   └── VIA Labs, Inc.: USB2.0 Hub
│       ├── VIA Labs, Inc.: USB2.0 Hub
│       │   ├── HUAWEI: HMA-L29
│       │   ├── HUAWEI: ELE-L29
│       │   ├── HUAWEI: STK-LX1
│       ├── HUAWEI: EBG-AN10
│       ├── VIA Labs, Inc.: USB2.0 Hub
│       │   ├── HUAWEI: DNN-LX9
│       │   ├── HUAWEI: ANA-NX9
│       │   ├── HUAWEI: LIO-AL00
│       │   └── HUAWEI: ELS-NX9
│       └── VIA Labs, Inc.: USB2.0 Hub
│           ├── Unisoc: Unisoc Phone
│           ├── Xiaomi: ATOLL-AB-IDP _SN:9CB93DDE
│           └── Xiaomi: Redmi 9A
└── Linux 4.15.0-147-generic xhci-hcd: xHCI Host Controller
    └── VIA Labs, Inc.: USB3.0 Hub
        ├── VIA Labs, Inc.: USB3.0 Hub
        ├── VIA Labs, Inc.: USB3.0 Hub
        └── VIA Labs, Inc.: USB3.0 Hub
Verbose (with sudo)
╤
├── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
│   Bus: 002, Address: 001USB: 3.1.0, Speed: Unknown
│   Class: Hub, Serial: 0000:07:00.1
│
├── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
│   Bus: 003, Address: 001USB: 2.0.0, Speed: 480 Mbps
│   Class: Hub, Serial: 0000:07:00.3
│   │
│   └── Port 2: Linux 5.13.0-postmarketos-qcom-msm8974 with ci_hdrc_msm: RNDIS/Ethernet Gadget
│       Bus: 003, Address: 010USB: 2.0.0, Speed: 480 Mbps
│       Class: Communications, Serial: N/A
│
├── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
│   Bus: 006, Address: 001USB: 3.1.0, Speed: Unknown
│   Class: Hub, Serial: 0000:0e:00.3
│
├── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
│   Bus: 001, Address: 001USB: 2.0.0, Speed: 480 Mbps
│   Class: Hub, Serial: 0000:07:00.1
│   │
│   ├── Port 1: Logitech: G502 HERO Gaming Mouse
│   │   Bus: 001, Address: 002
│   │   USB: 2.0.0, Speed: 12 Mbps
│   │   Class: Interface-specific, Serial: 097D39693034
│   │
│   └── Port 2: Logitech: PRO Gaming Keyboard
│       Bus: 001, Address: 003USB: 2.0.0, Speed: 12 Mbps
│       Class: Interface-specific, Serial: 0C8539413532
│
├── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
│   Bus: 004, Address: 001USB: 3.1.0, Speed: Unknown
│   Class: Hub, Serial: 0000:07:00.3
│
└── Linux 5.12.11-arch1-1 xhci-hcd: xHCI Host Controller
    Bus: 005, Address: 001
    USB: 2.0.0, Speed: 480 Mbps
    Class: Hub, Serial: 0000:0e:00.3
    │
    ├── Port 3: Sunplus IT Co : ZET USB WEBCAM
    │   Bus: 005, Address: 002USB: 2.0.0, Speed: 480 Mbps
    │   Class: Unknown, Serial: 20190313001
    │
    └── Port 4: N/A: CSR8510 A10
        Bus: 005, Address: 003
        USB: 2.0.0, Speed: 12 Mbps
        Class: Wireless, Serial: N/A

Contributions

You may create merge request or bug/enhancement issue right here on GitLab, or send formatted patch via e-mail. For details see CONTRIBUTING.md file in this repo.

License

Copyright (C) 2021  Oleg `Kanedias` Chernovskiy

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Dependencies

~4MB
~66K SLoC