On 14.10.2016 18:06, Jan Kandziora wrote:
> While this is correct, it can be incredibly hard to write such a rule
> when you have two or more otherwise identical adapters.
I beg to differ. You just have to wrap your head around the whole
system, then it's reasonably easy. Just a bit tedious. ;-)

You can match devices either by serial number or, if the manufacturer
has been lazy, by USB path. If you use the latter, check their device
path (ATTRS{devpath}) with wildcards so that you explicitly match just
the digits that are actually different, as some of the others may be
assigned dynamically. (Plus, always check for idVendor and idProduct.)

Use "udevadm info --attribute-walk /sys/class/tty/ttyUSB0" (or USB1 or
…) to find matchable attributes. You want to look at the first block
that actually has an ATTRS{devpath}entry. Don't be fooled by serial
numbers (ATTRS{serial}) in blocks after that, they are part of the hub
or computer.

-- Matthias Urlichs

Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Owfs-developers mailing list

Reply via email to