is there a utility like 'lsblk' but for serial ports?

e.g. which lists all ports, which USB device they belong to (if any), as well as other available information

i keep losing track which /dev/ttyUSBx is which with a bunch of embedded dev boards connected

Follow

I suppose the most elegant way to handle this is to make udev aliases (using rules based on vendorID etc) instead of using /dev/ttyUSBx directly

@kekcoin can lsusb show the serial device names, though?
also, some share the same vendor IDs:

Bus 002 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Bus 001 Device 003: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Bus 004 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

closest i've got is parsing and formatting the output of

udevadm info -a -n /dev/ttyUSBn

@orionwl yes, that is probably the best. We have the SYMLINK option in Trezor udev file exactly for this reason: github.com/trezor/trezor-commo

this is what I ended up with:
gist.github.com/laanwj/fb8774b

with these rules, udev will create symlinks under /dev/serial named after the device and the specific port when plugging it in

BUT it's quite difficult to even distinguish some devices, sometimes this can be done based on either product name or serial number, if the vendor was so helpful to set them

Sign in to participate in the conversation
unidentified instance

x0f.org [

A private instance for discussion of:

  • Free and Open Source Software/Hardware
  • Privacy tech, P2P networks, and cryptocurrency development
  • Reverse engineering

  • Anti-authoritarianism and decentralization

]

(instance image by мøтħer ¢røω)