Find the answer to your Linux question:
Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By atreyu
Hi all, I am using FC15. I have 2 usb devices both detected as CDC-ACM. The port to which devices are connected always keep changing. Initially port to which device ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    USB port conflict


    Hi all,

    I am using FC15. I have 2 usb devices both detected as CDC-ACM. The port to which devices are connected always keep changing.
    Initially port to which device one connected is showing ttyACM0 and the other showing ttyACM1. When I removed these devices and reinsert them now I insert device two first so the ttyACM0 is got assigned to this device and device one got ttyACM1.
    I want to keep port number same every time. Please suggest me what I need to do, so that every time my device one will get port ttyACM0 and device two ttyACM1 irrespective of anything.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hey,

    You should be able to use udev rules to do this. The udevadm command can be used to interrogate the device and hopefully turn up some useful info (like serial numbers or other unique identifiers) which you can in turn use to craft your udev rules.

    First find the serial character devices in the /sys directory, e.g.:

    Code:
    find /sys/|grep ttyACM[01]
    Say it turns up this file:
    Code:
    /sys/class/tty/ttyACM0
    Now run udevadm like this to get info on it:
    Code:
    udevadm info --query=all --path=/sys/class/tty/ttyACM0
    You should get back a bunch of info. Now write your udev rule. Where it goes, and exactly which attributes you can use depends on your distro and version of udev. See this document for starters on writing udev rules, it has been around a while, though is likely outdated now:

    http://www.reactivated.net/writing_udev_rules.html

    You can hopefully google for a tutorial on writing udev rules specifically for your distro.
    vishalp likes this.

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Hey,

    Thank you very much. This helped me to solve my problem.

    Is it possible to add serial device in same way to udev rules.
    Please assist.
    Last edited by vishalp; 11-28-2012 at 09:04 AM.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by vishalp View Post
    Is it possible to add serial device in same way to udev rules.
    Do you mean the serial ports on the motherboard, or on a PCI card? I don't see why not, but I guess it depends on whether there is unique identifying attributes returned by udevadm.

    If you got it to work using your ACM devices, can you not apply the same logic to the serial devices?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •