On Mittwoch, 9. Januar 2019 13:29:48 CET Oliver Neukum wrote:
On Mi, 2019-01-09 at 13:01 +0100, Michal Kubecek wrote:
I tried mine and I get
unicorn:~ # udevadm info -a -n /dev/ttyUSB1 ...
ATTRS{idProduct}=="6001" ATTRS{idVendor}=="0403"
...
ATTRS{serial}=="FT92IO3D"
but I only have one so that I cannot say if the "serial" attribute is guaranteed to be unique among devices with the same vendor and product id (and if it's provided by other tty to USB adapters).
USB serial numbers are guaranteed to be unique. But not to exist. Yet we are talking about udev's notion of 'serial', which is not identical.
There is no such guarantee, and it is often false for USB-serial-converters (clones). Just search for A50285BI, which is a typical serial ID of of FTDI clones. Cheap CP210x breakout boards often have a serial of "0" set, although this can be reprogrammed at will. I have a genuine CP2102N dev board here, which has a seemingly unique 32 hex digit serial, but that is a rare one. ATTRS{serial} *is* the serial ID string retrieved from the device, if it exists. Do not confuse ATTRS (retrieved from sysfs) with the env variables, e.g. env{'ID_SERIAL'} (identifier based on name and possibly serial}, or env{'ID_SERIAL_SHORT'} (just the serial number, if it exists). Regards, Stefan-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org