Dig The Code
Dig The Code

Reputation: 692

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

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.

Upvotes: 3

Views: 3810

Answers (1)

Ian Abbott
Ian Abbott

Reputation: 17438

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).

Upvotes: 6

Related Questions