【USB描述符系列】U盘

【USB描述符系列】U盘

简介

读取了一下手头一个USB3.0的U盘的USB描述符,U盘接到了电脑的USB2.0口上,作为USB2.0设备使用。从描述符上看,相对不是很复杂,一个interface,两个endpoint。毕竟U盘的主要信息还是通过Mass Storage Class Request来获取。详细的看USB描述符。

下面是这个U盘接到USB2.0口上的USB描述符。

Device Descriptor

OffsetFieldSizeValueDescription
0bLength112hSize of this descriptor
1bDescriptorType101hDevice
2bcdUSB20210h2.10
4bDeviceClass100hClass info in Ifc Descriptors
5bDeviceSubClass100hUnused
6bDeviceProtocol100hUnused
7bMaxPacketSize0140h64 bytes
8idVendor20951hVendor ID
10idProduct21666hProduct ID
12bcdDevice20110h1.10
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
16iSerialNumber103hIndex to string descriptor that contains the string < Your Serial Number > in Unicode
17bNumConfigurations101hOne configuration

Device Qualifier Descriptor

OffsetFieldSizeValueDescription
0bLength10AhSize of descriptor
1bDescriptorType106hDevice Qualifier
2bcdUSB20200hUSB Spec 2.0
4bDeviceClass100hClass info in Ifc Descriptors
5bDeviceSubClass100hUnused
6bDeviceProtocol100hUnused
7bMaxPacketSize0140h64 bytes
8bNumConfigurations101hNumber of Other-speed Configurations
9bReserved100hUnused

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
7bmAttributes180hBus Powered
4…0: Reserved. . . 00000Unused
5: Remote Wakeup. .0 . . . . .No
6: Self Powered. 0 . . . . . .No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0)
1 . . . . . . .Unused
8bMaxPower196h300 mA

Interface Descriptor 0/0 Mass Storage, 2 Endpoints

OffsetFieldSizeValueDescription
0bLength109hSize of this descriptor
1bDescriptorType104hInterface
2bInterfaceNumber100hIndex of this interface
3bAlternateSetting100hIndex of this setting
4bNumEndpoints102h2 endpoints
5bInterfaceClass108hMass Storage
6bInterfaceSubClass106hSCSI Transparent Command Set
7bInterfaceProtocol150hBulk-Only Transport
8iInterface100hUnused
Endpoint Descriptor 81 1 In, Bulk, 512 bytes
OffsetFieldSizeValueDescription
0bLength107hSize of this descriptor
1bDescriptorType105hEndpoint
2bEndpointAddress181h1 In
3bmAttributes102hBulk
1…0: Transfer Type. . . . . .10Bulk
7…2: Reserved000000 . .Unused
4wMaxPacketSize20200h512 bytes
6bInterval100hUnused
Endpoint Descriptor 02 2 Out, Bulk, 512 bytes
OffsetFieldSizeValueDescription
0bLength107hSize of this descriptor
1bDescriptorType105hEndpoint
2bEndpointAddress102h2 Out
3bmAttributes102hBulk
1…0: Transfer Type. . . . . .10Bulk
7…2: Reserved000000 . .Unused
4wMaxPacketSize20200h512 bytes
6bInterval100hUnused

Other Speed Configuration Descriptor

OffsetFieldSizeValueDescription
0bLength109hSize of this descriptor
1bDescriptorType107hOther Speed Configuration
2wTotalLength20020hTotal length of data returned
4bNumInterfaces101hOne interfaces
5bConfigurationValue101hID of this configuration
6iConfiguration100hUnused
7bmAttributes180hBus Powered
4…0: Reserved. . . 00000Unused
5: Remote Wakeup. .0 . . . . .No
6: Self Powered. 0 . . . . . .No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0)
1 . . . . . . .Unused
8bMaxPower100hUnused

Interface Descriptor 0/0 Mass Storage, 2 Endpoints

OffsetFieldSizeValueDescription
0bLength109hSize of this descriptor
1bDescriptorType104hInterface
2bInterfaceNumber100hIndex of this interface
3bAlternateSetting100hIndex of this setting
4bNumEndpoints102h2 endpoints
5bInterfaceClass108hMass Storage
6bInterfaceSubClass106hSCSI Transparent Command Set
7bInterfaceProtocol150hBulk-Only Transport
8iInterface100hUnused
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/118881469

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值