Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it means for bDescriptorType is 0x24?

Tags:

usb

I find a descriptor as below.
As I know, when bDescriptorType is 0x04, it means interface descriptor.
If bDescriptorType is 0x24, what does it means?
I can't find related description in USB spec 2.0.

/*  First Interface Descriptor For Comm Class Interface */
0x09,                  /*  bLength = 9                     */
0x04,                  /*  bDescriptorType = Interface (4) */
0x00,                  /*  bInterfaceNumber                */
0x00,                  /*  bAlternateSetting               */
0x01,                  /*  bNumEndpoints (one for OUT)     */
0x02,                  /*  bInterfaceClass = Communications Interface Class (2) */
0x02,                  /*  bInterfaceSubClass = Abstract Control Model (2) */
0x01,                  /*  bInterfaceProtocol = Common "AT" commands (1), */ 
                      /*   no class specific protocol (0)                */
0x00,                  /*  iInterface                      */

/*  Header Functional Descriptor */

0x05,                  /*  bFunctionalLength = 5           */
0x24,                  /*  bDescriptorType                 */
0x00,                  /*  bDescriptorSubtype              */
0x10, 0x01,            /*  bcdCDC                          */
like image 283
LayaCCC Avatar asked Jul 01 '14 03:07

LayaCCC


2 Answers

A value of 0x24 indicates it is a class-specific interface descriptor. Please see the definition of CS_INTERFACE in Table 12 in the CDC 1.20 specification. You can find it here:

http://www.usb.org/developers/docs/devclass_docs/

Please note that 0x24 is usually written as "24h" in these USB standards.

like image 122
David Grayson Avatar answered Nov 12 '22 22:11

David Grayson


I find the descriptors 0x24 (CS_INTERFACE) and 0x25 (CS_ENDPOINT) in an interface of class 'Audio' in my iPhone.

I also found some descriptors online: https://discussions.apple.com/thread/6474393

They are named "AC" there (Audio Control). Here only two examples:

AC Input Terminal Descriptor:
------------------------------
0x11    bLength
0x24    bDescriptorType
0x02    bDescriptorSubtype
0x01    bTerminalID
0x0201  wTerminalType   (Microphone)
0x00    bAssocTerminal
0x28    bCSourceID
0x04    bNrChannels
0x00000000 bmChannelConfig
0x16    iChannelNames
0x00    bmControls
0x00    iTerminal


AC Output Terminal Descriptor:
------------------------------
0x0C    bLength
0x24    bDescriptorType
0x03    bDescriptorSubtype
0x14    bTerminalID
0x0301  wTerminalType   (Speaker)
0x00    bAssocTerminal
0x0A    bSourceID
0x28    bCSourceID
0x0000  bmControls
0x00    iTerminal

The functionality of the CS_INTERFACE descriptor depends on the subtype of the descriptor. For example with subtype 02 it is the "AC Input Terminal Descriptor" which allows access to the microfone. And with subtype 03 it is the "AC Output Terminal Descriptor" which allows access to the speaker.

The document CDC 1.20 linked by David Grayson (accepted answer) is not helpful for this type of descriptors.

I found the detailed description in the "USB Device Class Definition for Terminal Types": https://www.usb.org/sites/default/files/termt10.pdf

like image 1
Elmue Avatar answered Nov 12 '22 22:11

Elmue