Find the answer to your Linux question:
Results 1 to 6 of 6
I have Debian stable 2.6.26-2 on my server and want to get 2 serial-usb devices to have persistent names as follows: / Code: dev/ttyUSB0 -> ad_teknik_reader /dev/ttyUSB1 -> smart_up_reader I ...
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    38

    udev rules

    I have Debian stable 2.6.26-2 on my server and want to get 2 serial-usb devices to have persistent names as follows:
    /
    Code:
    dev/ttyUSB0 -> ad_teknik_reader
    /dev/ttyUSB1 -> smart_up_reader
    I followed the documentation Writing udev rules ... but it doesn't work.
    udevinfo -a -p /sys/class/tty/ttyUSB0/dev gave me this:

    Code:
    Looking at device '/class/tty/ttyUSB0/dev':
        KERNEL=="dev"
        SUBSYSTEM==""
        DRIVER==""
    
      looking at parent device '/class/tty/ttyUSB0':
        KERNELS=="ttyUSB0"
        SUBSYSTEMS=="tty"
        DRIVERS==""
    
      looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb1/1-4/1-4:1.0/ttyUSB0':
        KERNELS=="ttyUSB0"
        SUBSYSTEMS=="usb-serial"
        DRIVERS=="ftdi_sio"
        ATTRS{latency_timer}=="16"
        ATTRS{port_number}=="0"
    
    udevinfo -a -p /sys/class/tty/ttyUSB1/dev gave me this:
    
      looking at device '/class/tty/ttyUSB1/dev':
        KERNEL=="dev"
        SUBSYSTEM==""
        DRIVER==""
    
      looking at parent device '/class/tty/ttyUSB1':
        KERNELS=="ttyUSB1"
        SUBSYSTEMS=="tty"
        DRIVERS==""
    
      looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb1/1-1/1-1:1.0/ttyUSB1':
        KERNELS=="ttyUSB1"
        SUBSYSTEMS=="usb-serial"
        DRIVERS=="pl2303"
        ATTRS{port_number}=="0"
    I created a rule '10-udev.rules in /etc/udev/rules.d as follows:

    Code:
    KERNELS=="ttyUSB0" , SUBSYSTEMS=="usb-serial" , DRIVERS=="ftdi_sio" , NAME="ad_teknik_reader"
    KERNELS=="ttyUSB1" , SUBSYSTEMS=="usb-serial" , DRIVERS=="pl2303"   , NAME="smart_ups"
    but after 'sudo udevadm control --reload_rules' the /dev/ad_teknik_reader and /dev/smart_ups don't show up ...
    Appreciate some help
    Last edited by MikeTbob; 01-05-2011 at 11:44 AM. Reason: Added Code Tags

  2. #2
    Just Joined!
    Join Date
    Jul 2007
    Posts
    38
    Problem SOLVED ... I unplugged/plugged in the usb devices ... then they showed up.
    Seems that the 10-udev.rules was OK

  3. #3
    Banned
    Join Date
    Jan 2011
    Posts
    11
    Congratulations! I wish my udev problems fixed themselves so easily.

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    38
    Just follow the documentation link above and I am sure it will help you

  5. #5
    Banned
    Join Date
    Jan 2011
    Posts
    11
    I do not see any documentation link. My problem is a bit different than yours was anyways. I plan on solving it by reloading the OS someday. I think my problem was caused by upgrading from Lenny to Squeeze. Eventually I'll just do a full Squeeze install and hope that fixes it. Until then I can live without my optical disk symbolic links I suppose.

    I've looked at this problem a lot and whatever is going on I cannot figure out how to fix it. I like the old /dev better than this udev jazz. This new stuff just gives me headaches.

  6. #6
    Just Joined!
    Join Date
    Jul 2007
    Posts
    38

Posting Permissions

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