title: How can I figure out which tty file points to which USB-to-Serial device?
body: <p>I have two legacy machines connected to a Linux box with USB using the ftdi_sio driver, to <code>/dev/ttyUSB0</code> and <code>/dev/ttyUSB1</code>. The Linux box is relaying and analyzing the traffic between the machines. When the Linux box boots up, the machines are connected to the files pretty much randomly. The problem is to know which one is which.</p>
  
  <p>I could just ask the devices, of course, but I'd like to avoid the risk of malfunction due to sending wrong data to the wrong device. Is there a way to figure out, for example, the id of the device connected to a tty file?</p>