none
USB Device information from WMI RRS feed

  • Question

  • When WMI is queried and returns a list of devices, I've noted some information at the END of the DeviceID string that isn't documented anywhere I've looked so far. Here's an example:

    USB\\VID_046D&PID_082D&MI_00\\7&3538A2BF&0&0000

    Now, the first two parts - both the 'USB' and the VID and PID are really well documented, as is the 'interface number' - the &MI_XX.  However, the last part of the string (shown below) isn't documented anywhere I've looked. I don't even know what to call this part of the DeviceID string: 

    \\7&3538A2BF&0&0000

    Curiously, it comes in several flavors. I've noted that if I have two identical devices plugged into the PC, I'll get different values, which I've defaulted to calling 'instance id's' for lack of better documented reference info. Here's what I see when I have two identical USB Web cameras plugged into my PC:

    USB\\VID_046D&PID_082D&MI_00\\6&DB509D0&0&0000
    USB\\VID_046D&PID_082D&MI_00\\7&3538A2BF&0&0000

    So far, so good. I can pick out that I have two identical devices plugged into the PC and can parse against these unique values.  But wait! When the OS sees these devices, it also loads anything the drivers offers for different 'interfaces' or modes of operation, so along with the above entries when I make a WMI query against Win32_PnPEntity, I also get these nice entries in the DeviceID field as well:

    USB\\VID_046D&PID_082D\\195825EF
    USB\\VID_046D&PID_082D\\36149BBF

    So the problem is that without documentation that describes what this last part of the DeviceID is, I don't know to expect, and can't separate these 'duplicate' entries in the query results. 

    The goal is to be able to scan through the WMI result set, identify the 'primary' entry for a given device and discard anything else. I could likely HACK the filtering by looking for "USB Composite Device" in the Description field, but this is rather ugly and would discard some devices that do not have an appropriate or vendor-specified 'description.'

    Anyone got an idea where the last part of the DeviceID information is documented???

    Wednesday, May 28, 2014 11:26 PM

Answers

  • Hi Reddgum,

    The third part should be instance id , and the the complete device id you got is the  device instance id. Have a check.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Friday, May 30, 2014 1:55 AM

All replies

  • Hi Reddgum,

    I am trying to involve someone familiar with this issue to come into this thread. Thank you for your understanding.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 29, 2014 3:26 AM
    Moderator
  • Hi Reddgum,

    The third part should be instance id , and the the complete device id you got is the  device instance id. Have a check.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Friday, May 30, 2014 1:55 AM