I need to get the title of the attached USB device. I can do that with
udev allows some substitutions when I write rules: say, we can use
$kernel to get name of the device, or
$devpath to get path to the device.
But problem is that
lsusb returns string like that:
Bus 005 Device 032: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
But udev's devpath is:
Bus number is the same (
5), but numbers are different:
Device 032 seems to be some logical number (when I reattach the device, this number increases), and
2 seems to be physical device number.
So udev returns physical number, and I need to get logical number. Then, i can retrieve data like this:
lsusb -D /dev/bus/usb/005/032
So, how can I get logical device number
032 by physical path like