what is the difference between ID_SERIAL and ID_SERIAL_SHORT udev attributes for a USB descriptor

3.2k Views Asked by At

What are the differences between ID_SERIAL and ID_SERIAL_SHORT udev properties. How udev is assigning values for these 2 udev property IDs. I am writing USB driver and I am using udev_device_get_property_value() method to get values for udev properties. in this case I can see there are 2 similar attributes as mentioned above. I couldn't find an explaining document for these information.

1

There are 1 best solutions below

1
On BEST ANSWER

The ID_SERIAL_SHORT value comes from the iSerial string (if present) in the USB device descriptor. The ID_SERIAL value is constructed in software and made up from various strings (vendor or manufacturer, model or product, and serial number if present) separated with _.

You can use udevadm info [DEVPATH|FILE] command to look at the udev properties (specifying a specific DEVPATH or FILE as appropriate).