About USB device and interface descriptors

From: shahar (shahar_at_discussions.microsoft.com)
Date: 08/12/04


Date: Wed, 11 Aug 2004 18:17:02 -0700

Hi,
To my understading device and interface descriptors contain a usb device
class type that recognizes the functions the device implements (audio,
storage, printer, etc.).
There are a few things I do not understand about the usb device class concept:
1) What is the purpose of the device class mentioned in the device
descriptor ? The class is mentioned in the interface descriptor and a device
may have many interfaces. Are there cases where the class in the device
descriptor is not 0xFF or 0x00 or the same as in the interface ?
2) Say a usb mass storage device reports an interface class of 0x03 (HID),
but it still reports "USB Mass Storage Device" in it's device description. Am
I right in guessing that the USBSTOR.SYS will still be loaded and a file
system will still be mounted regulary ? If so, what is the credebility of
this parameter if windows doesn't really care what is it's value ?
3) Isn't there a networking usb device class ? The Wi-Fi USB device I just
bought reports a interface class of 0xFE and subclass 0x01 which according to
the documentation is an infra-red device and the infra-red device I bought
reports 0xFF in the device class and 0x00 in the interface class (and 0x00 is
illegal to my understanding) ?
4) From my observation the compatible ID's a PDO for a USB device sometime
contain the class and sub class from the device descriptor and sometimes from
the interface descriptor. What is the algorithm for this decision ?
5) To my understanding when a device implements more than one interface the
PDO reports a USB\COMPOSITE compatible ID, yet the PDO for the bluetooth
adapter I bought does not report this ID. how can this be ?

I hope this is not too many questions in one shot...
Thank you
Shahar



Relevant Pages

  • Re: audio device didnt sound.
    ... interface descriptor. ... None of the formats Audio Class/Audio streaming interfaces are supported ... (ie certain non pcm formats we don't support). ...
    (microsoft.public.development.device.drivers)
  • Re: [was: USB2 - umass problem] U3G modem unit number changes
    ... Because u3g2.c is attaching to an USB interface and not the whole USB device. ... interface driver instances on the same USB device need to peek at eachother ...
    (freebsd-current)
  • Re: help! develop a USB device driver ,but I have not devices interfa
    ... You'll have to contact the supplier of the USB device. ... what the interface is, there's zero chance that you'll be able to write a ... Because it is a secret for OEM. ... who can supply the device driver,I can bye it. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to implement multi-function device driver?
    ... For example, USB device has 2 interfaces, interface A and interface B. ... Then I create device object A for interface A and device object B for interface B in AddDevice. ... How to implement multi-function device driver? ... No. if your USB device is properly constructed with composite interfaces then you can use the "USB Common Class Generic Parent Driver". ...
    (microsoft.public.development.device.drivers)
  • Re: Question about _URB_SELECT_CONFIGURATION
    ... I can get the pointer to the interface descriptor of alternate setting 1 ... I didn't see set interface command is sent on USB bus. ...
    (microsoft.public.development.device.drivers)