I think I already found one.
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.
Gives for the first
Code: Select all
looking at parent device '/devices/platform/bcm2708_usb/usb1/1-1/1-1.2':
KERNELS=="1-1.2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.2"
ATTRS{idVendor}=="067b"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="4"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0300"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 1.10"
ATTRS{urbnum}=="1486"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Prolific Technology Inc."
ATTRS{removable}=="removable"
ATTRS{idProduct}=="2303"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="USB-Serial Controller"
And for the other
Code: Select all
looking at parent device '/devices/platform/bcm2708_usb/usb1/1-1/1-1.3':
KERNELS=="1-1.3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.3"
ATTRS{idVendor}=="067b"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="5"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0300"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="64"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Prolific Technology Inc."
ATTRS{removable}=="removable"
ATTRS{idProduct}=="2303"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="USB-Serial Controller"
Then look at the differences and ad one that is different to the 99-usb-serial.rules file.
If you put in the USB always at the same fysical port you can use the ATTRS{devpath}=="1.3" and ATTRS{devpath}=="1.2". Then you have to place the code below in the 99-usb-serial.rules file.
Code: Select all
SUBSYSTEM=="tty", ATTRS{devpath}=="1.2", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSB12"
SUBSYSTEM=="tty", ATTRS{devpath}=="1.3", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSB13"