当前位置 博文首页 > dadalaohua的博客:【USB描述符系列】一个FTDI芯片的USB转串口

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

    作者:[db:作者] 时间:2021-07-27 08:49

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

    简介

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

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

    Device Descriptor

    OffsetFieldSizeValueDescription
    0bLength112hSize of this descriptor
    1bDescriptorType101hDevice
    2bcdUSB20110hUSB Spec 1.1
    4bDeviceClass100hClass info in Ifc Descriptors
    5bDeviceSubClass100hUnused
    6bDeviceProtocol100hUnused
    7bMaxPacketSize0108h8 bytes
    8idVendor20403hVendor ID
    10idProduct26001hProduct ID
    12bcdDevice20400h4.00
    14iManufacturer101hIndex to string descriptor that contains the string < Your Name > in Unicode
    15iProduct102hIndex to string descriptor that contains the string < Your Product Name > in Unicode
    16iSerialNumber100hUnused
    17bNumConfigurations101hOne configuration

    Configuration Descriptor

    OffsetFieldSizeValueDescription
    0bLength109hSize of this descriptor
    1bDescriptorType102hConfiguration
    2wTotalLength20020hLength of the total configuration block, including this descriptor, in bytes
    4bNumInterfaces101hOne interfaces
    5bConfigurationValue101hID of this configuration
    6iConfiguration100hUnused
    7bmAttributes1C0hSelf Powered
    4…0: Reserved. . . 00000Unused
    5: Remote Wakeup. .0 . . . . .No
    6: Self Powered. 1 . . . . . .Yes
    7: Reserved (set to one)
    (bus-powered for 1.0)
    1 . . . . . . .Unused
    8bMaxPower12Dh90 mA

    Interface Descriptor 0/0 Vendor-Specific, 2 Endpoints

    OffsetFieldSizeValueDescription
    0bLength109hSize of this descriptor
    1bDescriptorType104hINTERFACE
    2bInterfaceNumber100hIndex of this interface
    3bAlternateSetting100hIndex of this setting
    4bNumEndpoints102h2 endpoints
    5bInterfaceClass1FFhVendor-Specific
    6bInterfaceSubClass1FFhVendor-Specific
    7bInterfaceProtocol1FFhVendor-Specific
    8iInterface102hIndex of string descriptor describing this interface

    Endpoint Descriptor 81 1 In, Bulk, 64 bytes

    OffsetFieldSizeValueDescription
    0bLength107hSize of this descriptor
    1bDescriptorType105hEndpoint
    2bEndpointAddress181h1 In
    3bmAttributes102hBulk
    1…0: Transfer Type. . . . . .10Bulk
    7…2: Reserved000000 . .Unused
    4wMaxPacketSize20040h64 bytes
    6bInterval100hUnused

    Endpoint Descriptor 02 2 Out, Bulk, 64 bytes

    OffsetFieldSizeValueDescription
    0bLength107hSize of this descriptor
    1bDescriptorType105hEndpoint
    2bEndpointAddress102h2 Out
    3bmAttributes102hBulk
    1…0: Transfer Type. . . . . .10Bulk
    7…2: Reserved000000 . .Unused
    4wMaxPacketSize20040h64 bytes
    6bInterval100hUnused

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

    cs