USB devpath. What does it mean and does it stay the same per USB port?

August 8, 2024, 20:09

abovefreezing

In this post are 4 questions. On a Raspberry Pi 4, for example, I can plug a device into one of the USB ports and then the output of ls /dev/tty will include a new entry which is /dev/ttyUSB0. Nice : ) The command udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0) | grep "ATTRS{devpath}" will return one of the following, depending on which port the USB device is plugged into: ATTRS{devpath}=="1.1" ATTRS{devpath}=="1.2" ATTRS{devpath}=="1.3" ATTRS{devpath}=="1.4" So it appears each physical USB outlet has a certain devpath. Does that path remain the same, does it ever change, and if so when? How are the USB outlets enumerated? Also, the devpath == "1.2", for example... Does "1" denote USB controller number 1? * Does the "2" represent output/port/channel/serial# or something?