Bleamer
Bleamer

Reputation: 647

How does windows identify a USB device uniquely?

How does windows identify a USB device uniquely, even though the device data supplied from the USB device is common to all devices of that make ? To state this alternatively, Windows can distinguish between two instances of Dell keyboards of same model, without the keyboard supplying any unique serial number. What is the exclusive data field windows searches for when initializing the USB device ?

Upvotes: 1

Views: 7623

Answers (2)

user2198653
user2198653

Reputation: 61

When we connect a device to the host the device, enumeration process will happen, At the end of this process, the host will supply a unique address to the newly connected device. So each device connected to the system will have a unique Id which is supplied by the system, using this id devices can be identified and the communication happens

Upvotes: 1

Sergey Podobry
Sergey Podobry

Reputation: 7199

Windows uses Device Instance ID for identification. As you can see in the documentation it contains a device part and an instance part.

The device part is taken from a USB device.

It is up to a bus driver how to generate the instance part. The bus driver cannot solely rely on the information returned from the usb device. Because two identical devices will break the system - Device Instance IDs must be unique! So usually it appends additional info - port number and etc (the exact algorithms is unknown and depends on driver manufacturer). Also PNP manager can add more uniqueness to the Instance ID.

Upvotes: 4

Related Questions