HylaFAX The world's most advanced open source fax server |
We did as follow: 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" SYSFS{dev}=="188:0" looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB0': ID=="ttyUSB0" BUS=="usb-serial" DRIVER=="pl2303" looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0': ID=="3-1:1.0" BUS=="usb" DRIVER=="pl2303" SYSFS{modalias}=="usb:v0557p2008d0300dc00dsc00dp00icFFisc00ip00" SYSFS{bInterfaceProtocol}=="00" SYSFS{bInterfaceSubClass}=="00" SYSFS{bInterfaceClass}=="ff" SYSFS{bNumEndpoints}=="03" SYSFS{bAlternateSetting}==" 0" SYSFS{bInterfaceNumber}=="00" … The only usefull info we found to lock USB device name was usb port id: looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0': ID=="3-1:1.0" BUS=="usb" DRIVER=="pl2303" Now we put following udev rules in a new file /etc/udev/rules.d/10-customUSB.rules: BUS=="usb", ID=="3-1:1.0", SYMLINK+="ttyModem429", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.1:1.0", SYMLINK+="ttyModem432", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.2:1.0", SYMLINK+="ttyModem421", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.3:1.0", SYMLINK+="ttyModem435", GROUP="uucp", MODE="0660" Unfortunately symlinks created by udev do not have right group, user and mode: lrwxrwxrwx 1 root root 14 Nov 22 12:09 ttyModem429 -> usbdev3.2_ep81 and if we try to use this links with faxaddmodem, it says this is not a terminal device. We tried with NAME also to get character device: BUS=="usb", ID=="3-1:1.0", NAME+="ttyModem429", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.1:1.0", NAME+="ttyModem432", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.2:1.0", NAME+="ttyModem421", GROUP="uucp", MODE="0660" BUS=="usb", ID=="1-2.3:1.0", NAME+="ttyModem435", GROUP="uucp", MODE="0660" Unfortunately also device name created by udev do not have right group, user and mode: crw------- 1 root root 442, 4097 Nov 22 12:15 ttyModem429 furthermore faxaddmodem cannot find modem, probably these udev rules are not correct bound to attached modem (serial modem attached with Serial to USB cables). Can you help with right udev rules ? It is very important for us to avoid devise name change. Thank you. |