Article 6NKV3 Determine serial port based on USB description (bash)

Determine serial port based on USB description (bash)

by
Wim Sturkenboom
from LinuxQuestions.org on (#6NKV3)
Hi all,

Not sure if this is the correct section to ask; moderators feel free to move it.

I have a scenario where I need to identify the serial port (/dev/ttyACMx) of a USB device based on USB description. There are a number of these devices connected to a computer; they have the same VID and PID but differ in USB description.

Is there a single bash command that I can use?

Without that, the process that I visualise is to use lsusb to find the connected devices by VID/PID to see if they are connected, use a filter on the output of dmesg (probably read /var/log/dmesg using tac) and find the usb description and associated device (/dev/ttyACMx). The sequence can be reversed, not sure what's better but I will figure that out in time.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments