I could solve the Problem by extending the udev rule. Now it works and looks like:
KERNEL=="ttyUSB?*", ATTR{dev}=="188:*", ATTRS{serial}=="A2001nj4", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="temp1" Am Sonntag, den 29.03.2009, 22:47 +0200 schrieb Martin Nattrodt: > Hello, > > I have problems with the assignment of symbolic links with udev. I am > using two usb-serial converter. I need them always on the same device. > So I am using udev rules (z61-sht-sensor.rules): > > ATTRS{serial}=="A2001nj4", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", > ATTRS{idProduct}=="6001", SYMLINK+="temp1" > > ATTRS{serial}=="A2001muZ", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", > ATTRS{idProduct}=="6001", SYMLINK+="temp2" > > When I switch on the Device everything is OK. The link is created: > > lrwxrwxrwx 1 root root 7 Mar 29 18:52 /dev/temp1 -> ttyUSB0 > crw-rw---- 1 root dialout 188, 0 Mar 29 19:05 /dev/ttyUSB0 > > When I Unplug an then plug in the Device again it looks like: > > lrwxrwxrwx 1 root root 15 Mar 29 19:05 /dev/temp1 -> bus/usb/001/005 > crw-rw-r-- 1 root root 189, 4 Mar 29 19:05 /dev/bus/usb/001/005 > > Then I called udevtrigger. This results in the following: > > lrwxrwxrwx 1 root root 14 Mar 29 21:31 /dev/temp1 -> usbdev1.5_ep81 > crw-rw---- 1 root root 442, 4 Mar 29 19:05 /dev/usbdev1.5_ep81 > > My System is a nslu2 with debianslug. > # uname -a > Linux LXXX 2.6.18-6-ixp4xx #1 Sat Dec 27 23:27:54 UTC 2008 armv5tel > GNU/Linux > > udevtest has the following output > # udevtest /sys/class/tty/ttyUSB0 > parse_file: reading '/etc/udev/rules.d/020_permissions.rules' as rules file > parse_file: reading '/etc/udev/rules.d/udev.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z20_persistent-input.rules' as rules > file > parse_file: reading '/etc/udev/rules.d/z20_persistent.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z25_persistent-net.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z45_persistent-net-generator.rules' as > rules file > parse_file: reading '/etc/udev/rules.d/z50_run.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z55_hotplug.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z60_nslu2-rtc.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z61-sht-sensor.rules' as rules file > parse_file: reading '/etc/udev/rules.d/z75_cd-aliases-generator.rules' as > rules file > This program is for debugging only, it does not create any node, > or run any program specified by a RUN key. It may show incorrect results, > if rules match against subsystem specfic kernel event variables. > > main: looking at device '/class/tty/ttyUSB0' from subsystem 'tty' > udev_rules_get_name: add symlink 'temp1' > udev_rules_get_name: no node name set, will use kernel name 'ttyUSB0' > udev_device_event: device '/class/tty/ttyUSB0' already in database, validate > currently present symlinks > udev_node_add: creating device node '/dev/ttyUSB0', major = '188', minor = > '0', mode = '0660', uid = '0', gid = '20' > udev_node_add: creating symlink '/dev/temp1' to 'ttyUSB0' > main: run: 'socket:/org/kernel/udev/monitor' > > The output of udevinfo is: > # udevinfo -a -p /sys/class/tty/ttyUSB0 > > Udevinfo starts with the device specified by the devpath and then > walks up the chain of parent devices. It prints for every device > found, all possible attributes in the udev rules key format. > A rule to match, can be composed by the attributes of the device > and the attributes from one single parent device. > > looking at device '/class/tty/ttyUSB0': > KERNEL=="ttyUSB0" > SUBSYSTEM=="tty" > DRIVER=="" > ATTR{dev}=="188:0" > > looking at parent device > '/devices/pci0000:00/0000:00:01.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0': > KERNELS=="ttyUSB0" > SUBSYSTEMS=="usb-serial" > DRIVERS=="ftdi_sio" > > looking at parent device > '/devices/pci0000:00/0000:00:01.0/usb1/1-1/1-1.1/1-1.1:1.0': > KERNELS=="1-1.1:1.0" > SUBSYSTEMS=="usb" > DRIVERS=="ftdi_sio" > ATTRS{interface}=="FT232R USB UART" > ATTRS{modalias}=="usb:v0403p6001d0600dc00dsc00dp00icFFiscFFipFF" > ATTRS{bInterfaceProtocol}=="ff" > ATTRS{bInterfaceSubClass}=="ff" > ATTRS{bInterfaceClass}=="ff" > ATTRS{bNumEndpoints}=="02" > ATTRS{bAlternateSetting}==" 0" > ATTRS{bInterfaceNumber}=="00" > > looking at parent device > '/devices/pci0000:00/0000:00:01.0/usb1/1-1/1-1.1': > KERNELS=="1-1.1" > SUBSYSTEMS=="usb" > DRIVERS=="usb" > ATTRS{latency_timer}=="16" > ATTRS{configuration}=="" > ATTRS{serial}=="A2001nj4" > ATTRS{product}=="FT232R USB UART" > ATTRS{manufacturer}=="FTDI" > ATTRS{maxchild}=="0" > ATTRS{version}==" 2.00" > ATTRS{devnum}=="5" > ATTRS{speed}=="12" > ATTRS{bMaxPacketSize0}=="8" > ATTRS{bNumConfigurations}=="1" > ATTRS{bDeviceProtocol}=="00" > ATTRS{bDeviceSubClass}=="00" > ATTRS{bDeviceClass}=="00" > ATTRS{bcdDevice}=="0600" > ATTRS{idProduct}=="6001" > ATTRS{idVendor}=="0403" > ATTRS{bMaxPower}==" 90mA" > ATTRS{bmAttributes}=="a0" > ATTRS{bConfigurationValue}=="1" > ATTRS{bNumInterfaces}==" 1" > > looking at parent device '/devices/pci0000:00/0000:00:01.0/usb1/1-1': > KERNELS=="1-1" > SUBSYSTEMS=="usb" > DRIVERS=="usb" > ATTRS{configuration}=="" > ATTRS{product}=="Generic USB Hub" > ATTRS{manufacturer}=="ALCOR" > ATTRS{maxchild}=="4" > ATTRS{version}==" 1.10" > ATTRS{devnum}=="3" > ATTRS{speed}=="12" > ATTRS{bMaxPacketSize0}=="8" > ATTRS{bNumConfigurations}=="1" > ATTRS{bDeviceProtocol}=="00" > ATTRS{bDeviceSubClass}=="00" > ATTRS{bDeviceClass}=="09" > ATTRS{bcdDevice}=="0312" > ATTRS{idProduct}=="9254" > ATTRS{idVendor}=="058f" > ATTRS{bMaxPower}=="100mA" > ATTRS{bmAttributes}=="e0" > ATTRS{bConfigurationValue}=="1" > ATTRS{bNumInterfaces}==" 1" > > looking at parent device '/devices/pci0000:00/0000:00:01.0/usb1': > KERNELS=="usb1" > SUBSYSTEMS=="usb" > DRIVERS=="usb" > ATTRS{configuration}=="" > ATTRS{serial}=="0000:00:01.0" > ATTRS{product}=="OHCI Host Controller" > ATTRS{manufacturer}=="Linux 2.6.18-6-ixp4xx ohci_hcd" > ATTRS{maxchild}=="3" > ATTRS{version}==" 1.10" > ATTRS{devnum}=="1" > ATTRS{speed}=="12" > ATTRS{bMaxPacketSize0}=="64" > ATTRS{bNumConfigurations}=="1" > ATTRS{bDeviceProtocol}=="00" > ATTRS{bDeviceSubClass}=="00" > ATTRS{bDeviceClass}=="09" > ATTRS{bcdDevice}=="0206" > ATTRS{idProduct}=="0000" > ATTRS{idVendor}=="0000" > ATTRS{bMaxPower}==" 0mA" > ATTRS{bmAttributes}=="e0" > ATTRS{bConfigurationValue}=="1" > ATTRS{bNumInterfaces}==" 1" > > looking at parent device '/devices/pci0000:00/0000:00:01.0': > KERNELS=="0000:00:01.0" > SUBSYSTEMS=="pci" > DRIVERS=="ohci_hcd" > ATTRS{broken_parity_status}=="0" > ATTRS{enable}=="1" > > ATTRS{modalias}=="pci:v00001033d00000035sv00001033sd00000035bc0Csc03i10" > ATTRS{local_cpus}=="1" > ATTRS{irq}=="28" > ATTRS{class}=="0x0c0310" > ATTRS{subsystem_device}=="0x0035" > ATTRS{subsystem_vendor}=="0x1033" > ATTRS{device}=="0x0035" > ATTRS{vendor}=="0x1033" > > looking at parent device '/devices/pci0000:00': > KERNELS=="pci0000:00" > SUBSYSTEMS=="" > DRIVERS=="" > > > Is there anything wrong in the rule? > Why udev always crates a different symbolic link? > > Thanks for help > > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org