In the proc_usb_info.txt file of the Linux docprogram:
Lines starting with T = topology (etc.) In/proc/bus/USB/devices can analyze the topology.
Topology info:
T: Bus = dd lev= dd prnt = DD Port = dd CNT = dd Dev # = ddd spd = DDD mxch = dd
| ||__ Maxchildren
| ||__ Device speed in Mbps
| |__ Devicenumber
| __Count of devices at this level
| |__ Connector/port on parent for this device
| ||__ Parent devicenumber
| |__ Level in topology for this bus
| |__ Bus number
|__ Topology info tag
Speed may be:
1.5 Mbit/s for low speed USB
12 Mbit/s for full speed USB
480 Mbit/s for high speed USB (added for USB 2.0)
Example:
T: Bus = 00 lev= 00 prnt = 00 Port = 00 CNT = 00 Dev # = 1 Spd = 12 mxch = 2
T: Bus = 00 lev= 01 prnt = 01 port = 00 CNT = 01 Dev # = 2 SPD = 12 mxch = 4
I: If # = 0 alt = 0 # EPS = 1 CLS = 09 (hub) sub = 00 prot = 00 driver = Hub
T: Bus = 00 lev= 02 prnt = 02 Port = 00 CNT = 01 Dev # = 3 Spd = 1.5 mxch = 0
I: If # = 0 alt = 0 # EPS = 1 CLS = 03 (HID) sub = 01 prot = 02 driver = mouse
T: Bus = 00 lev= 02 prnt = 02 Port = 02 CNT = 02 Dev # = 4 SPD = 12 mxch = 0
I: If # = 0 alt = 0 # EPS = 3 CLs = 00 (> IFC) sub = 00 prot = 00 driver = serial
Physically this looks like (or cocould be converted ):
+ ------------------ +
| PC/root_hub (12) | Dev # = 1
+ ---------------- + (NN) is Mbps.
Level 0 | cn.0 | CN.1 | [CN = connector/port #]
+ ------------------ +
/
/
+ ----------------------- +
Level 1 | Dev #2: 4-port hub (12) |
+ ----------------------- +
| Cn.0 | CN.1 | CN.2 | CN.3 |
+ ----------------------- +
\\____________________
\_____\
\\
+ -------------------- + ---------------------- +
Level 2 | Dev #3: mouse (1.5) | Dev #4: Serial (12) |
+ -------------------- + ---------------------- +
Or, in a more tree-like structure (ports [connectors]
Connections cocould be omitted ):
PC: Dev #1, root hub, 2 ports, 12 Mbps
| _ Cn.0: Dev #2, Hub, 4 ports, 12 Mbps
| _ Cn.0: Dev #3, rat, 1.5 Mbps
| _ CN.1:
| _ CN.2: Dev #4, serial, 12 Mbps
| _ CN.3:
| _ CN.1:
### end ###