none
How 'Device Categories' USB device property is populated ? RRS feed

  • Question

  • Hello,

    i'm developing some drivers (just .inf files) for a device that can be in MTP or PTP mode. I'm currently working on Win7.

    When the device is in MTP mode, the device installs and works well. If I look at device properties (right click -> Property -> Details tab) and select 'Device Categories' property, I see : Multimedia.PMP.
    Which is good.

    When the device is in PTP mode, the device installs and works well. If I look at device properties, I still see Multimedia.PMP whereas it should be Imaging.Camera.
    I checked usb descriptor with usbview and the device enumerates with correct interface descriptor :
    bInterfaceClass:                   0x06  -> This is an Image USB Device Interface Class

    Can someone indicate me how Windows get 'Device Properties' property ?
    Is it coming from the device (so from usb descriptor) or is it from drivers (inf file which may have a mistake) ?

    Thanks

    Benoit

    Friday, May 3, 2013 3:52 PM

Answers

All replies

  • this specific property is set by the WPD driver based on the WPD device type reported by your device.  Multimedia.PMP comes from WPD_DEVICE_TYPE_MEDIA_PLAYER (2), Imaging.Camera comes from WPD_DEVICE_TYPE_CAMERA (1)

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 3, 2013 6:02 PM
  • Thanks !

    Could you indicate me which part of usb descriptor is used to send this info ? as you indicated it's provided by the device itself, and I would like to check this with usbview.

    thanks

    benoit

    Monday, May 6, 2013 10:44 AM
  • I don't know the specifics. It would either be a descriptor or a piece of data the WPD driver queries for.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, May 7, 2013 5:16 AM
  • Ok.

    If someone in this forum can shed the light on this, it's welcome :)

    WPD driver is the one from Windows. I just created a basic inf file that refers to wpdmtp.inf, like requested by MSDN docs.
    So I guess Windows driver do the query.

    We used a USB analyzer when the device is connected in PTP, but we don't see any descriptor on WPD type, just the frendly name

    So how Windows guess if the device is CAMERA or MEDIA_PLAYER ??

    Thanks


    • Edited by Bouben Tuesday, May 7, 2013 10:17 AM
    Tuesday, May 7, 2013 10:15 AM
  • The MTP/PTP class driver looks at the compatible Ids to determine what class the device belongs to.

    See the "Device Classes" section in this document for details:

    http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/video-cameras-windows-logo.docx

    • Marked as answer by Bouben Thursday, May 16, 2013 3:17 PM
    Tuesday, May 7, 2013 5:28 PM
  • Thanks,

    the document helped us to find our problem, caused by an error in the desscriptor of the parent device of MTP (a composite device).

    Benoit

    Thursday, May 16, 2013 3:17 PM