Vil gerne have til at attache devicen ensartet hvergang og vil (gerne)
bruge udev til formålet. Det kniber dog Ubuntu 9.10 at forstå mine
hensigter
I /etc/udev/rules.d/98-usb-modems.rules ;
------------------
SUBSYSTEM=="usb", ATTRS{serial}=="F0015358", ATTRS{product}=="Falcom
SAMBA", SYMLINK+="Falcom_0"
---------------
Her troede jeg så, at hver gang jeg satte usb-modem'et i, ville det
komme til at hedde /dev/Falcom_0... Sådan er det desværre ikke.
Info til at udfylde ATTRS mm, kommer fra:
# udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0)
Som giver dette - noget lange - output hvor jeg er stærkt i tvivl om
hvilken indgang (parant device)jeg skal bruge.
Nogen gode råd
(Har reloaded udev med: "service udev reload")
Pft
/Jan
------------------------
root@kpc:/etc/udev/rules.d# udevadm info -a -p $(udevadm info -q path
-n /dev/ttyUSB0)
Udevadm info 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
'/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/ttyUSB0':
KERNELS=="ttyUSB0"
SUBSYSTEMS=="usb-serial"
DRIVERS=="ftdi_sio"
ATTRS{port_number}=="0"
looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0':
KERNELS=="7-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="ftdi_sio"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bNumEndpoints}=="02"
ATTRS{bInterfaceClass}=="ff"
ATTRS{bInterfaceSubClass}=="ff"
ATTRS{bInterfaceProtocol}=="ff"
ATTRS{modalias}=="usb:v0F94p0005d0200dc00dsc00dp00icFFiscFFipFF"
ATTRS{supports_autosuspend}=="0"
ATTRS{interface}=="Falcom SAMBA"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb7/7-1':
KERNELS=="7-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bMaxPower}=="498mA"
ATTRS{urbnum}=="591"
ATTRS{idVendor}=="0f94"
ATTRS{idProduct}=="0005"
ATTRS{bcdDevice}=="0200"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{speed}=="12"
ATTRS{busnum}=="7"
ATTRS{devnum}=="5"
ATTRS{version}==" 1.10"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="FALCOM"
ATTRS{product}=="Falcom SAMBA"
ATTRS{serial}=="F0015358"
looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb7':
KERNELS=="usb7"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="101"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0001"
ATTRS{bcdDevice}=="0206"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="12"
ATTRS{busnum}=="7"
ATTRS{devnum}=="1"
ATTRS{version}==" 1.10"
ATTRS{maxchild}=="2"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 2.6.31-17-generic uhci_hcd"
ATTRS{product}=="UHCI Host Controller"
ATTRS{serial}=="0000:00:1d.1"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.1':
KERNELS=="0000:00:1d.1"
SUBSYSTEMS=="pci"
DRIVERS=="uhci_hcd"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x2935"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{subsystem_device}=="0x8277"
ATTRS{class}=="0x0c0300"
ATTRS{irq}=="19"
ATTRS{local_cpus}=="ff"
ATTRS{local_cpulist}=="0-7"
ATTRS{modalias}=="pci:v00008086d00002935sv00001043sd00008277bc0Csc03i00"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""