【USB描述符系列】一个FTDI芯片的USB转串口

简介

看了下手头的一个FTDI芯片的USB转串口模块的描述符是什么样的。从描述符可以看到,这个USB 转Serial设备是一个厂商自定义类Vendor specific,难怪这种类型模块有一大堆兼容性问题,原来都不是标准类,所以很多时候是需要额外安装厂商驱动的。在Configuration Descriptor中看到声明自己是一个自供电(Self-powered)的设备,让我感到很诧异。设备有两个bulk端点,传输数据使用bulk传输。是一个Full Speed设备。详细的看USB描述符。

下面是这个USB转串口模块的USB描述符。

Device Descriptor

Offset Field Size Value Description
0 bLength 1 12h Size of this descriptor
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0110h USB Spec 1.1
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h Unused
6 bDeviceProtocol 1 00h Unused
7 bMaxPacketSize0 1 08h 8 bytes
8 idVendor 2 0403h Vendor ID
10 idProduct 2 6001h Product ID
12 bcdDevice 2 0400h 4.00
14 iManufacturer 1 01h Index to string descriptor that contains the string < Your Name > in Unicode
15 iProduct 1 02h Index to string descriptor that contains the string < Your Product Name > in Unicode
16 iSerialNumber 1 00h Unused
17 bNumConfigurations 1 01h One configuration

Configuration Descriptor

Offset Field Size Value Description
0 bLength 1 09h Size of this descriptor
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 0020h Length of the total configuration block, including this descriptor, in bytes
4 bNumInterfaces 1 01h One interfaces
5 bConfigurationValue 1 01h ID of this configuration
6 iConfiguration 1 00h Unused
7 bmAttributes 1 C0h Self Powered
4…0: Reserved . . . 00000 Unused
5: Remote Wakeup . .0 . . . . . No
6: Self Powered . 1 . . . . . . Yes
7: Reserved (set to one)
(bus-powered for 1.0)
1 . . . . . . . Unused
8 bMaxPower 1 2Dh 90 mA

Interface Descriptor 0/0 Vendor-Specific, 2 Endpoints

Offset Field Size Value Description
0 bLength 1 09h Size of this descriptor
1 bDescriptorType 1 04h INTERFACE
2 bInterfaceNumber 1 00h Index of this interface
3 bAlternateSetting 1 00h Index of this setting
4 bNumEndpoints 1 02h 2 endpoints
5 bInterfaceClass 1 FFh Vendor-Specific
6 bInterfaceSubClass 1 FFh Vendor-Specific
7 bInterfaceProtocol 1 FFh Vendor-Specific
8 iInterface 1 02h Index of string descriptor describing this interface
Endpoint Descriptor 81 1 In, Bulk, 64 bytes
Offset Field Size Value Description
0 bLength 1 07h Size of this descriptor
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 . . Unused
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 00h Unused
Endpoint Descriptor 02 2 Out, Bulk, 64 bytes
Offset Field Size Value Description
0 bLength 1 07h Size of this descriptor
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 . . Unused
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 00h Unused

本文链接:https://blog.csdn.net/u012028275/article/details/115591673

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐