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

app usbtree

USB设备的树状视图,提供详细的描述

1 个不稳定版本

0.1.0 2021年7月12日

#70#usb-device

GPL-3.0+

22KB
232 代码行

build status License Universal binary

USBTREE

一个简单的二进制程序,显示系统上可用的USB设备的树状结构。比 lsusb -vt 显示的更易读,并提供了更好的整体信息。

示例输出

简单
╤
├── 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
详细(需要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

贡献

您可以直接在GitLab上创建合并请求或提交bug/增强功能问题,或者通过电子邮件发送格式化的补丁。有关详细信息,请参阅此存储库中的CONTRIBUTING.md文件。

许可证

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.

依赖项

~3MB
~45K SLoC