Home > Blockchain >  How to find USB path (tty) Ubuntu 20.04
How to find USB path (tty) Ubuntu 20.04

Time:07-22

I am running Ubuntu server 20.04 in a VM under Proxmox and I have passed trough a USB device from the host to the VM, now I can see that the VM detected this device when I do dmesg | grep usb this is the (part) of the output:

[    1.708072] usb 3-1: new full-speed USB device number 2 using uhci_hcd
[    1.893391] usb 3-1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[    1.894138] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.894810] usb 3-1: Product: RFXtrx433
[    1.895230] usb 3-1: Manufacturer: RFXCOM
[    1.895666] usb 3-1: SerialNumber: ****

What i want is the path of this device, for example /dev/ttyUSB0 Where can i find the path of a detected USB device? Need to know this so i can mount it into a container.

CodePudding user response:

It looks like it had something to do with my Ubuntu setup (cloud init). I have installed a new VM with Ubuntu Server 22.04 (minimized) attached the USB device to that VM and now I can see the USB device path's

$ sudo dmesg | grep tty
[    0.062362] printk: console [tty0] enabled
[    6.568254] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[    6.575625] cdc_acm 3-2:1.0: ttyACM1: USB ACM device
[    6.580591] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
$ cd /dev/serial/by-id && ls -la
lrwxrwxrwx 1 root root 13 Jul 17 08:30 usb-0658_0200-if00 -> ../../ttyACM1
lrwxrwxrwx 1 root root 13 Jul 17 08:30 usb-RFXCOM_RFXtrx433_A1HCFOL-if00-port0 -> ../../ttyUSB0
$ cd /dev/serial/by-path && ls -la
...
lrwxrwxrwx 1 root root  13 Jul 17 08:30 pci-0000:00:1d.0-usb-0:1:1.0 -> ../../ttyACM0
lrwxrwxrwx 1 root root  13 Jul 17 08:30 pci-0000:00:1d.0-usb-0:2:1.0 -> ../../ttyACM1
lrwxrwxrwx 1 root root  13 Jul 17 08:30 pci-0000:00:1d.1-usb-0:1:1.0-port0 -> ../../ttyUSB0
  • Related