Udev rule for Digi Edgeport 8 (multi-port USB-serial adapter)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been trying to overcome the loss of the '%e' enumeration
variable to make a version of the Edgeport rules that will work with
the current version of Udev.

Old version:

BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}=="0244"
SYSFS{serial}=="*-0" NAME="%k" SYMLINK="ttyEDGE8_0_%e"
BUS="usb" SYSFS{idVendor}="1608" SYSFS{idProduct}=="0244"
SYSFS{serial}=="*-1" NAME="%k" SYMLINK="ttyEDGE8_1_%e"

Replacing it with '%m" doesn't work, because then the numbering is
dependent on the presence of other USB-serial devices.

I tried this:

ENV{portnum}=ATTRS{port_number}
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="I01846004-0",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="I01846004-1",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="I01846004-2",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`
BUS=="usb",SYSFS{idVendor}=="1608",SYSFS{idProduct}=="0244",SYSFS{serial}=="I01846004-3",
NAME="%k",SYMLINK="ttyEDGE8_%E{portnum}"`

but this didn't work, I think because the 'port_number' attribute is
defined at a different hierarchical level than the 'serial' attribute:

  looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4/7-2.4:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="edgeport_ti_2"
    ATTRS{uart_mode}=="0"
    ATTRS{port_number}=="0"

  looking at parent device
'/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4/7-2.4:1.0':
[....]

looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2.4':
    KERNELS=="7-2.4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{urbnum}=="38"
    ATTRS{idVendor}=="1608"
    ATTRS{idProduct}=="0244"
    ATTRS{bcdDevice}=="0001"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="ff"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{speed}=="12"
    ATTRS{busnum}=="7"
    ATTRS{devnum}=="18"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{authorized}=="1"
    ATTRS{manufacturer}=="Digi International"
    ATTRS{product}=="Edgeport/8"
    ATTRS{serial}=="I01846004-0"


Any clues or ideas would be welcome!

-- 
Philip J. Tait
Software Engineer, FMOS
http://subarutelescope.org
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux