Windows侧常见USB接口描述符综述
- 1. 术语
- 2. CDC类设备综述
- 2.1. 概述
- 2.2. CDC类Communications Interface描述符
- 2.2.1. Header Functional Descriptor
- 2.2.2. Union Functional Descriptor
- 2.2.3. MBIM接口Class Functional Descriptors
- 2.2.3.1. MBIM Functional Descriptor
- 2.2.3.2. MBIM Extended Functional Descriptor
- 2.2.4. NCM接口Class Functional Descriptors
- 2.2.4.1. NCM Functional Descriptor
- 2.2.4.2. CDC Ethernet Networking Functional Descriptor
- 2.2.5. ACM接口Class Functional Descriptors
- 2.2.5.1. Abstract Control Management Functional Descriptor
- 2.2.5.2. Call Management Functional Descriptor
- 2.2.6. RNDIS接口Class Functional Descriptors
- 2.2.7. RMNET接口Class Functional Descriptors
- 2.3. CDC类Data Interface描述符
- 3. 网络类描述符
- 3.1. MBIM接口
- 3.1.1. 概述
- 3.1.2. 主机侧驱动
- 3.2. NCM接口
- 3.2.1. 概述
- 3.2.2. 主机侧驱动
- 3.3. RNDIS接口
- 3.3.1. 概述
- 3.3.2. 主机侧驱动
- 3.4. RMNET接口
- 3.4.1. 概述
- 3.4.2. 主机侧驱动
- 4. 串口类描述符
- 4.1. ACM接口
- 4.1.1. 概述
- 4.1.2. 主机侧驱动
- 4.2. 普通串行接口
- 4.2.1. 概述
- 4.2.2. 主机侧驱动
- 5. 附录
- 5.1. 接口描述符
- 5.2. MBIM接口描述符
- 5.3. NCM接口描述符
- 5.4. RNDIS接口描述符
- 5.5. RMNET接口描述符
- 5.6. ACM接口描述符
- 5.7. 普通串行接口描述符
- 5.8. Function descriptors通用格式
市面上有很多通信类模块,有高通、展锐、MTK各大平台,这些平台的产品根据USB协议组织的划分,隶属于CDC类设备,而CDC类设备有划分为多个子类,本文重点给出两种子类,一是网络接口类,二是串行接口类,其中网络接口主要包括MBIM接口、NCM接口、RNDIS接口和RMNET接口,而串行接口主要包括ACM接口和普通的串行接口,本文会从如下两个方面,分别介绍这些接口:
- 接口自身的描述符信息
- 针对接口的驱动加载策略,也就是加载什么驱动。
1. 术语
名词 | 全称 | 说明 |
---|---|---|
MBIM | Mobile Broadband Interface Model | 基于MBIM消息的通信模式 |
RNDIS | Remote NDIS | 基于USB实现RNDIS实际上就是TCP/IP over USB,就是在USB设备上跑TCP/IP |
ACM | Abstract Control Model | 虚拟的串口通信模式 |
NCM | Network Control Model | 基于以太网的通信模式 |
RMNET | Remote Manager NET | 一种高通独有的网络通信模式 |
CDC | Communication Device Class | 通信类设备 |
2. CDC类设备综述
2.1. 概述
我们知道主机侧在枚举USB设备的过程中,会通过GET_DESCRIPTOR命令来获取USB设备的设备描述符USB_DEVICE_DESCRIPTOR、配置描述符 USB_CONFIGURATION_DESCRIPTOR、接口描述符USB_INTERFACE_DESCRIPTOR(详情查看附录5.1小节)和端点描述符USB_ENDPOINT_DESCRIPTOR等,并根据接口描述符中的bInterfaceClass、bInterfaceSubClass和bInterfaceProtocol用来区分interface类型,其中一般情况,复合设备的一个USB_INTERFACE_DESCRIPTOR就代表了一个function功能,而CDC类复合设备的有些function功能,需要模块侧上报两个USB_INTERFACE_DESCRIPTOR描述符信息,一个是Communications Interface,一个是Data Interface,比如MBIM接口、NCM接口以及ACM接口。
关于USB总线的一些基础知识,请查看《Universal Serial Bus 3.2 Specification》和《Universal Serial Bus Class Definitions for Communications Devices》。
2.2. CDC类Communications Interface描述符
Communications Interface有一个重要功能就是用来区分不同的CDC子类设备,其中bInterfaceClass用于指示USB设备为CDC类设备。
bInterfaceSubClass用于区分CDC类设备这个大类下不同的子类,比如MBIM、RNDIS、NCM和ECM。bInterfaceProtocol用于区分各个子类使用的协议。而USB协议组织给CDC类设备分配的码值信息,如下所示。
一般的interface主要包含interface描述符以及3个EP描述符信息,而CDC设备类的Communications interface描述符除了几个标准描述符外,还新增了class-specific描述符信息,由于这些class-specific描述符仅仅存在于interface层面,所以又称Functional Descriptors,比如Header Functional Descriptor、Union Functional Descriptor以及各个CDC设备子类独有的Class Functional Descriptors,如下所示,关于Functional Descriptors的通用格式,请查看附录5.8小节。
对于CDC类设备Communications interface描述符而言,有两点需要注意
- Header Functional Descriptor描述符的位置要排在所有的Functional Descriptor前面。
- 对于CDC类Communications Interface接口而言,其所需的EP个数一般为不超过1个,而且是中断类型的EP。
2.2.1. Header Functional Descriptor
Header Functional Descriptor代表一个interface的function descriptors集开始,在所有的function descriptors中,其必须处于第一个位置。
2.2.2. Union Functional Descriptor
Union Functional Descriptor描述了一组接口group中,各个接口的relationship,简单的说也就是表明那个是master接口,那个是slave接口,也就是下图中的bControlInterface指示的接口为master接口,而bSubordinateInterfaceN指示的接口为slave接口,通过下图也可以知道,master接口有且只有一个,而slave接口可以有1到多个。
2.2.3. MBIM接口Class Functional Descriptors
MBIM接口的Function Descriptor主要包括两种:一种为MBIM Functional Descriptor,另一种为MBIM Extended Functional Descriptor,下面分别给出这两种Functional Descriptor的具体格式信息。
2.2.3.1. MBIM Functional Descriptor
MBIM Functional Descriptor是必须的,其function descriptors code=0x1B,而且必须在Header Functional Descriptor的后面,具体格式如下所示。
2.2.3.2. MBIM Extended Functional Descriptor
MBIM Extended Functional Descriptor也是必现的,其function descriptors code=0x1C,而且必须紧跟着MBIM Functional Descriptor的后面,具体格式如下所示。
2.2.4. NCM接口Class Functional Descriptors
NCM接口是在ECM基础之上进行了优化改进,兼容ECM,所以这里只要给出NCM接口完整的Function Descriptors即可,主要为NCM接口新增的NCM Functional Descriptor和ECM原有的CDC Ethernet Networking Functional Descriptor,分别如下所示。
2.2.4.1. NCM Functional Descriptor
NCM Functional Descriptor格式如下所示,其function descriptors code=0x1A,
2.2.4.2. CDC Ethernet Networking Functional Descriptor
CDC Ethernet Networking Functional Descriptor格式如下所示,其function descriptors code=0x0F,
2.2.5. ACM接口Class Functional Descriptors
ACM接口就是一个虚拟的串行接口,俗称COM端口,这样在主机侧就能以com端口的方式使用该接口,比如可以直接使用现存的常用串口工具SSCOM以及PUTTY,无需开发新的工具,方便快捷,其主要为Abstract Control Management Functional Descriptor和Call Management Functional Descriptor。分别如下所示。
2.2.5.1. Abstract Control Management Functional Descriptor
该Functional Descriptor是必须的,详细格式如下所示,其function descriptors code=0x02,
2.2.5.2. Call Management Functional Descriptor
该Functional Descriptor是必须的,详细格式如下所示,其function descriptors code=0x01,
2.2.6. RNDIS接口Class Functional Descriptors
关于RNDIS接口,在本文只需要知道其是一个基于USB接口进行TCP/IP协议通信的接口即可,关于更详细的信息,比如在windows侧的架构图以及RNDIS相关的OID码值等,请查看如下微软官方网址:
https://docs.microsoft.com/en-us/windows-hardware/drivers/network/remote-ndis–rndis-2
另外,RNDIS接口没有特定的Functional Descriptor,其只是复用ACM接口的Functional Descriptor,关于这点,3.3小节会给出更详细的描述符说明,本小节不在陈述。
2.2.7. RMNET接口Class Functional Descriptors
RMNET接口是高通独有的通信接口,其就是一个普通的接口,没有特定的Functional Descriptor,3.4小节会给出更详细的描述符说明,本小节不在陈述。
2.3. CDC类Data Interface描述符
Data Interface的一个重要功能就是用来指示各个CDC子类接口的数据通道,也就是Bluk EP信息,而USB协议组织给CDC类设备分配的码值信息,如下所示。
3. 网络类描述符
3.1. MBIM接口
3.1.1. 概述
MBIM接口需要两个interface,一个是communications interface,另一个是data interface,其中communications interface中的bInterfaceClass=0x02,bInterfaceSubClass=0x0E和bInterfaceProtocol=0x00,而data interface中的bInterfaceClass=0x0A,bInterfaceSubClass=0x00和bInterfaceProtocol=0x02,MBIM接口详细描述符如下所示。附录5.2小节会给出一个完整的接口描述符。
注意:
上图中带option字样的,是可选项。
3.1.2. 主机侧驱动
主机侧识别到MBIM接口后,会自动加载微软的内置驱动cxwmbclass.sys或wmbclass.sys,下面以19H2系统为例,给出如下截图信息,我们以Fibo L831模块为例。
有一点需要讲解一下,cxwmbclass.sys和wmbclass.sys都是微软OS针对MBIM接口的内置驱动,只是两者是在不同的操作系统上提供,其中wmbclass.sys自win8系统就开始提供,而cxwmbclass.sys是win10系统才开始提供。
3.2. NCM接口
3.2.1. 概述
NCM接口需要两个interface,一个是communications interface,另一个是data interface,其中communications interface中的bInterfaceClass=0x02,bInterfaceSubClass=0x0D和bInterfaceProtocol=0x00,而data interface中的bInterfaceClass=0x0A,bInterfaceSubClass=0x00和bInterfaceProtocol=0x01,NCM接口详细描述符如下所示。附录5.3小节会给出一个完整的接口描述符。
3.2.2. 主机侧驱动
主机侧识别到NCM接口后,会自动加载微软的内置驱动usbncm.sys,注意该驱动自win11系统才开始提供,下面给出L860 R+ USB接口模式下,NCM接口的截图,如下所示。
3.3. RNDIS接口
3.3.1. 概述
由于RNDIS接口直接复用ACM接口的function描述符,除了ACM接口自身所需的两个interface外,还需要一个Association Interface,用于表明告知主机侧这是一个RNDIS接口,所以需要三个interface,其中Association Interface的bInterfaceClass=0xE0,bInterfaceSubClass=0x01和bInterfaceProtocol=0x03,另外两个就是ACM接口中所需的communications interface,另一个是data interface,关于ACM接口详细的信息,查看4.1小节,这里不再陈述。RNDIS接口详细描述符如下所示。附录5.4小节会给出一个完整的接口描述符。
3.3.2. 主机侧驱动
主机侧识别到RNDIS接口后,会自动加载微软的内置驱动rndismp6.sys和usb80236.sys,下面以19H2系统为例,给出如下截图信息。
3.4. RMNET接口
3.4.1. 概述
RMNET接口是高通独有的网络通信接口,其本质上就是一个普通接口,所以只需要一个自定义的interface即可,该interface的bInterfaceClass=0xFF,bInterfaceSubClass=0xFF和bInterfaceProtocol=0x30,RMNET接口详细描述符如下所示。附录5.5小节会给出一个完整的接口描述符。
3.4.2. 主机侧驱动
由于RMNET接口是一个普通的自定义接口,所以windows系统中没有专门的inbox驱动,需要针对该接口,需要IHV厂商自己开发一个驱动,就像下图中的fbusbwwan.sys驱动一样,下面以高通SDX12平台Fibo厂商FM101为例。
4. 串口类描述符
公司常用的USB串口,主要两类,一种是ACM串口,另一种就是普通串口,本文就这两者串口进行讲解。
4.1. ACM接口
4.1.1. 概述
ACM接口需要两个interface,一个是communications interface,另一个是data interface,其中communications interface中的bInterfaceClass=0x02,bInterfaceSubClass=0x02和bInterfaceProtocol=0x01,而data interface中的bInterfaceClass=0x0A,bInterfaceSubClass=0x00和bInterfaceProtocol=0x00,ACM接口详细描述符如下所示。附录5.6小节会给出一个完整的接口描述符。
4.1.2. 主机侧驱动
主机侧识别到ACM接口后,会自动加载微软的内置驱动usbser.sys,如下图所示
4.2. 普通串行接口
4.2.1. 概述
普通串行接口本质上就是一个普通接口,所以只需要一个自定义的interface即可,该interface的bInterfaceClass=0xFF,bInterfaceSubClass=0xFF和bInterfaceProtocol=0xXX,该接口详细描述符如下所示。附录5.7小节会给出Fibo 厂商FM101项目中一个普通串口的完整接口描述符。
4.2.2. 主机侧驱动
由于普通串行接口是一个普通的自定义接口,所以windows系统中没有专门的inbox驱动,需要针对该接口,需要IHV厂商自己开发一个驱动,就像下图中的fbusbser.sys驱动一样。
5. 附录
5.1. 接口描述符
//
// USB 1.1: 9.6.3 Interface, Table 9-9. Standard Interface Descriptor
// USB 2.0: 9.6.5 Interface, Table 9-12. Standard Interface Descriptor
// USB 3.0: 9.6.5 Interface, Table 9-17. Standard Interface Descriptor
//
typedef struct _USB_INTERFACE_DESCRIPTOR {UCHAR bLength;UCHAR bDescriptorType;UCHAR bInterfaceNumber;UCHAR bAlternateSetting;UCHAR bNumEndpoints;UCHAR bInterfaceClass;UCHAR bInterfaceSubClass;UCHAR bInterfaceProtocol;UCHAR iInterface;
} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
5.2. MBIM接口描述符
Interface Association Descriptor CDC Control
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 08h | |
1 | bDescriptorType | 1 | 0Bh | Interface Association |
2 | bFirstInterface | 1 | 00h | |
3 | bInterfaceCount | 1 | 02h | |
4 | bFunctionClass | 1 | 02h | CDC Control |
5 | bFunctionSubClass | 1 | 0Eh | |
6 | bFunctionProtocol | 1 | 00h | |
7 | iFunction | 1 | 00h |
Interface Descriptor 0/0 CDC Control, 1 Endpoint
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 00h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 01h | |
5 | bInterfaceClass | 1 | 02h | CDC Control |
6 | bInterfaceSubClass | 1 | 0Eh | |
7 | bInterfaceProtocol | 1 | 00h | |
8 | iInterface | 1 | 05h |
Header Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 00h | Header |
3 | bcdCDC | 2 | 0110h | 1.10 |
Union Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 06h | Union |
3 | bControlInterface | 1 | 00h | |
4 | bSubordinateInterface0 | 1 | 01h | CDC Data |
Unknown Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 0Ch | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 1Bh\ Unknown | |
3 | 9 | 00 01 00 10 20 80 00 08 20 |
Unknown Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 08h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 1Ch | Unknown |
3 | 5 | 00 01 40 DC 05 |
Endpoint Descriptor 81 1 In, Interrupt, 32 ms
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 81h | 1 In |
3 | bmAttributes | 1 | 03h | Interrupt |
1…0: Transfer Type | …11 | Interrupt | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0040h 64 bytes | |
6 | bInterval | 1 | 09h | 32 ms |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
7…0: Reserved | 00000000 | |||
4 | wBytesPerInterval | 2 | 0040h |
Interface Descriptor 1/0 CDC Data, 0 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 01h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 00h | |
5 | bInterfaceClass | 1 | 0Ah | CDC Data |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 02h | |
8 | iInterface | 1 | 00h |
Interface Descriptor 1/1 CDC Data, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 01h | |
3 | bAlternateSetting | 1 | 01h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | 0Ah | CDC Data |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 02h | |
8 | iInterface | 1 | 06h |
Endpoint Descriptor 8E 14 In, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 8Eh | 14 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 06h | Up to 7 packets at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
Endpoint Descriptor 0F 15 Out, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 0Fh | 15 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 02h | Up to 3 packets at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
5.3. NCM接口描述符
Interface Association Descriptor CDC Control
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 08h | |
1 | bDescriptorType | 1 | 0Bh | Interface Association |
2 | bFirstInterface | 1 | 00h | |
3 | bInterfaceCount | 1 | 02h | |
4 | bFunctionClass | 1 | 02h | CDC Control |
5 | bFunctionSubClass | 1 | 0Dh | |
6 | bFunctionProtocol | 1 | 00h | |
7 | iFunction | 1 | 04h |
Interface Descriptor 0/0 CDC Control, 1 Endpoint
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 00h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 01h | |
5 | bInterfaceClass | 1 | 02h | CDC Control |
6 | bInterfaceSubClass | 1 | 0Dh | |
7 | bInterfaceProtocol | 1 | 00h | |
8 | iInterface | 1 | 05h |
Header Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 00h | Header |
3 | bcdCDC | 2 | 0120h | 1.20 |
Union Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 06h | Union |
3 | bControlInterface | 1 | 00h | |
4 | bSubordinateInterface0 | 1 | 01h | CDC Data |
Unknown Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 06h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 1Ah | Unknown(NCM Functional Descriptor subtype) |
3 | 3 | 00 01 00 |
Ethernet Networking Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 0Dh | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 0Fh | Ethernet Networking |
3 | iMACAddress | 1 | 06h | |
4 | bmEthernetStatistics | 4 | 00000000h | Get Ethernet Statistic request not supported |
8 | wMaxSegmentSize | 2 | 0800h | 2048 bytes |
10 | wNumberMCFilters | 2 | 0000h | |
15: Hashing | 0… … | Perfect multicast address filtering (no hashing) | ||
14…0: MC Filters | .0000000 00000000 | Set Ethernet Multicast Filters request not supported | ||
12 | bNumberPowerFilters | 1 | 00h |
Endpoint Descriptor 81 1 In, Interrupt
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 81h | 1 In |
3 | bmAttributes | 1 | 03h | Interrupt |
1…0: Transfer Type | …11 | Interrupt | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0040h | 64 bytes |
6 | bInterval | 1 | 04h |
Interface Descriptor 1/0 CDC Data, 0 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 01h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 00h | |
5 | bInterfaceClass | 1 0Ah | CDC Data | |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 01h | |
8 | iInterface | 1 | 08h |
Interface Descriptor 1/1 CDC Data, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 01h | |
3 | bAlternateSetting | 1 | 01h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | 0Ah | CDC Data |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 01h | |
8 | iInterface | 1 | 09h |
Endpoint Descriptor 82 2 In, Bulk, 512 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 82h | 2 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0200h | 512 bytes |
6 | bInterval | 1 | 00h |
Endpoint Descriptor 02 2 Out, Bulk, 512 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 02h | 2 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0200h | 512 bytes |
6 | bInterval | 1 | 00h |
5.4. RNDIS接口描述符
Interface Association Descriptor RF Controller
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 08h | |
1 | bDescriptorType | 1 | 0Bh | Interface Association |
2 | bFirstInterface | 1 | 00h | |
3 | bInterfaceCount | 1 | 02h | |
4 | bFunctionClass | 1 | E0h | Wireless Controller |
5 | bFunctionSubClass | 1 | 01h | RF Controller |
6 | bFunctionProtocol | 1 | 03h | Remote NDIS |
7 | iFunction | 1 | 05h | “REMOTE NDIS Device” |
Interface Descriptor 0/0 CDC Control, 1 Endpoint
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 00h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 01h | |
5 | bInterfaceClass | 1 | 02h | CDC Control |
6 | bInterfaceSubClass | 1 | 02h | Abstract Control Model |
7 | bInterfaceProtocol | 1 | FFh | Vendor-Specific |
8 | iInterface | 1 | 03h | “RNDIS Communication Interface” |
Header Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 00h | Header |
3 | bcdCDC | 2 | 0110h | 1.10 |
Call Management Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 01h | Call Management |
3 | bmCapabilities | 1 | 00h | |
7…2: Reserved | 000000… | |||
1: Data Ifc Usage | …0. | Call management only over Comm Ifc | ||
0: Call Management | …0 | Does not handle call management itself | ||
4 | bDataInterface | 1 | 01h |
Abstract Control Management Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 04h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 02h | Abstract Control Management |
3 | bmCapabilities | 1 | 00h | Requests/notifications not supported |
7…4: Reserved | 0000… | |||
3: Connection | …0… | |||
2: Send Break | …0… | |||
1: Line Coding | …0. | |||
0: Comm Features | …0 |
Union Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 06h | Union |
3 | bControlInterface | 1 | 00h | “RNDIS Communication Interface” |
4 | bSubordinateInterface0 | 1 | 01h | “RNDIS Data Interface” |
Endpoint Descriptor 82 2 In, Interrupt, 125 us
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 82h | 2 In |
3 | bmAttributes | 1 | 03h | Interrupt |
1…0: Transfer Type | …11 | Interrupt | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0040h | 64 bytes |
6 | bInterval | 1 | 01h | 125 us |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
7…0: Reserved | 00000000 | |||
4 | wBytesPerInterval | 2 | 0040h |
Interface Descriptor 1/0 CDC Data, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 01h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | 0Ah | CDC Data |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 00h | |
8 | iInterface | 1 | 04h | “RNDIS Data Interface” |
Endpoint Descriptor 81 1 In, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 81h | 1 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 02h | Up to 3 packets at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
Endpoint Descriptor 01 1 Out, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 01h | 1 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 02h | Up to 3 packets at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
5.5. RMNET接口描述符
Interface Descriptor 0/0 Vendor-Specific, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 00h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | FFh | Vendor-Specific |
6 | bInterfaceSubClass | 1 | FFh | |
7 | bInterfaceProtocol | 1 | 30h | |
8 | iInterface | 1 | 00h |
Endpoint Descriptor 81 1 In, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 81h | 1 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
Endpoint Descriptor 01 1 Out, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 01h | 1 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 Bulk | |||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
5.6. ACM接口描述符
Interface Association Descriptor Abstract Control Model
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 08h | |
1 | bDescriptorType | 1 | 0Bh | Interface Association |
2 | bFirstInterface | 1 | 02h | |
3 | bInterfaceCount | 1 | 02h | |
4 | bFunctionClass | 1 | 02h | CDC Control |
5 | bFunctionSubClass | 1 | 02h | Abstract Control Model |
6 | bFunctionProtocol | 1 | 01h | AT Commands: V.250 etc |
7 | iFunction | 1 | 0Bh |
Interface Descriptor 2/0 CDC Control, 1 Endpoint
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 02h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 01h | |
5 | bInterfaceClass | 1 | 02h | CDC Control |
6 | bInterfaceSubClass | 1 | 02h | Abstract Control Model |
7 | bInterfaceProtocol | 1 | 01h | AT Commands: V.250 etc |
8 | iInterface | 1 | 0Ch |
Header Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 00h | Header |
3 | bcdCDC | 2 | 0120h | 1.20 |
Union Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 06h | Union |
3 | bControlInterface | 1 | 02h | |
4 | bSubordinateInterface0 | 1 | 03h | CDC Data |
Call Management Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 05h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 01h | Call Management |
3 | bmCapabilities | 1 | 00h | |
7…2: Reserved | 000000… | |||
1: Data Ifc Usage | …0. | Call management only over Comm Ifc | ||
0: Call Management | …0 | Does not handle call management itself | ||
4 | bDataInterface | 1 | 03h |
Abstract Control Management Functional Descriptor
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bFunctionLength | 1 | 04h | |
1 | bDescriptorType | 1 | 24h | CS Interface |
2 | bDescriptorSubtype | 1 | 02h | Abstract Control Management |
3 | bmCapabilities | 1 | 07h | |
7…4: Reserved | 0000… | |||
3: Connection | …0… | |||
2: Send Break | …1… | Send Break request supported | ||
1: Line Coding | …1. | Line Coding requests and Serial State notification supported | ||
0: Comm Features | …1 | Set/Clear/Get Comm Feature requests supported |
Endpoint Descriptor 83 3 In, Interrupt
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 83h | 3 In |
3 | bmAttributes | 1 | 03h | Interrupt |
1…0: Transfer Type | …11 | Interrupt | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0040h | 64 bytes |
6 | bInterval | 1 | 04h |
Interface Descriptor 3/0 CDC Data, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 03h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | 0Ah | CDC Data |
6 | bInterfaceSubClass | 1 | 00h | |
7 | bInterfaceProtocol | 1 | 00h | |
8 | iInterface | 1 | 0Dh |
Endpoint Descriptor 84 4 In, Bulk, 512 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 84h | 4 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0200h | 512 bytes |
6 | bInterval | 1 | 00h |
Endpoint Descriptor 04 4 Out, Bulk, 512 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 04h | 4 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0200h | 512 bytes |
6 | bInterval | 1 | 00h |
5.7. 普通串行接口描述符
Interface Descriptor 4/0 Vendor-Specific, 2 Endpoints
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | |
1 | bDescriptorType | 1 | 04h | Interface |
2 | bInterfaceNumber | 1 | 04h | |
3 | bAlternateSetting | 1 | 00h | |
4 | bNumEndpoints | 1 | 02h | |
5 | bInterfaceClass | 1 | FFh | Vendor-Specific |
6 | bInterfaceSubClass | 1 | FFh | |
7 | bInterfaceProtocol | 1 | 30h | |
8 | iInterface | 1 | 00h |
Endpoint Descriptor 03 3 Out, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 03h | 3 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |
Endpoint Descriptor 86 6 In, Bulk, 1024 bytes
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 86h | 6 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | …10 | Bulk | ||
7…2: Reserved | 000000… | |||
4 | wMaxPacketSize | 2 | 0400h | 1024 bytes |
6 | bInterval | 1 | 00h |
SuperSpeed Endpoint Companion
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 06h | |
1 | bDescriptorType | 1 | 30h | SuperSpeed Endpoint Companion |
2 | bMaxBurst | 1 | 00h | One packet at a time |
3 | bmAttributes | 1 | 00h | |
4…0: MaxStreams | …00000 | |||
7…5: Reserved | 000… | |||
4 | wBytesPerInterval | 2 | 0000h |