Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7438771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:36:21+00:00 2026-05-29T10:36:21+00:00

I have two different USB devices based on the same USB-RS232 chips. When I

  • 0

I have two different USB devices based on the same USB-RS232 chips.
When I plug those in the USB they are mounted to /dev/ttyUSB0…3

My problem is how, inside a script, I can find out which one is on what tty?

Using lsusb I can differentiate them:

$> lsusb | grep 0403:f850
Bus 004 Device 002: ID 0403:f850 Future Technology Devices International, Ltd
$> lsusb | grep 0403:6001
Bus 004 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

And using dmesg I can tell where they were mounted:

$> dmesg | grep 'FTDI USB Serial Device converter now attached'
[36051.393350] usb 4-2: FTDI USB Serial Device converter now attached to ttyUSB1
[36061.823513] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0

But “usb 4-1” does not seem to correspond to “Bus 004 Device 002”.

Can I assume that “Bus 004 Device 001” will always be an “USB root hub” and thus dmesg will count from 1 onwards and lsusb from 2 onwards?

Or do you have another suggestion on how to correlate device ID to mount point (inside a script)?

I’m using Ubuntu 10.04 LTS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:36:22+00:00Added an answer on May 29, 2026 at 10:36 am

    Find more info using sysfs:

    $ ls /sys/bus/usb-serial/devices/ -ltrah
    
    lrwxrwxrwx 1 root root 0 2012-02-07 22:17 ttyUSB0 -> ../../../devices/pci0000:00/0000:00:0f.4/usb2/2-2/2-2:1.0/ttyUSB0
    
    $ ls -ltrad /sys//devices/pci0000:00/0000:00:0f.4/usb2/2-2/2-2:1.0/ttyUSB0
    drwxr-xr-x 4 root root 0 2012-02-07 22:17 /sys//devices/pci0000:00/0000:00:0f.4/usb2/2-2/2-2:1.0/ttyUSB0
    
    $ ls -ltrad /dev/ttyUSB0 
    crw-rw---- 1 root dialout 188, 0 2012-02-01 00:17 /dev/ttyUSB0
    

    Of course, the linked devices/… node contains a lot of information

    Adding information based on the OP’s comment:

    The device number keeps growing if devices are removed/inserted. lsusb -t can be used to correlate the device numbers with usb bus/port.

    Then, ‘lsusb -d devID’ can determine what device is on which port.
    Finally ‘ls /sys/bus/usb-serial/devices/ -ltrah’ will list (by bus/port) where it was mounted.

    Not very convenient, but it ‘works‘

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two different grid controls on the same form. They share the same
I have two different links to fire a toggle function. However, they act independently:
I have two different jqGrids in the same page. In the first grid I've
I have two different C# applications that are running at the same time. I
I have two different PHP files that both write to the same file. Each
I have two different installations on the same server that I plan to use
I have two different asp.net web applications both referencing the same dll e.g. SharedLibrary.dll
I have two different domains that both point to my homepage in the same
I have two different types of dicom(medical imaging files) in the same folder. I
I have a project where I have to interact with two different devices that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.