Bulk-Only Transport is a storage device. Like other common devices, BOT shares some common descriptors, such as Device descriptors, configuration descriptors, interface descriptors, endpoint descriptors, and string descriptors.
There are no other special descriptors for BOT mass storage devices.
A standard USB-enabled BOT has the following layout of bulk device descriptors:
- Device Descriptors
- Configuration Descriptors (Interface Descriptors, Endpoint Descriptors)
- String Descriptors
Device Descriptors
The BOT mass storage device type is defined in the interface descriptor, so the values of bDeviceClass, bDeviceSubClass, and bDeviceProtocol in its device descriptor must be 0.
The iSerialNumber string must be defined in the appropriate format (Windows validation is not strict); With this format, the last 12 characters of the serial number string must be hexadecimal data bits.
For example, the device descriptor of the DiskMFR flash drive is as follows:
---------------------- Device Descriptor ----------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x200 (USB Version 2.00)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x0951 (Yunze Technology Limited)
idProduct : 0x1665
bcdDevice : 0x0200
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : "DiskMFR"
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : "DiskMFR 2.0"
iSerialNumber : 0x03 (String Descriptor 3)
Language 0x0409 : "1C6F654E48EB1FC1391B7D69"
bNumConfigurations : 0x01 (1 Configuration)
Data (HexDump) : 12 01 00 02 00 00 00 40 51 09 65 16 00 02 01 02 [email protected].....
-
03 01
Configuration Descriptors
The configuration descriptors must be consistent with the standard configuration descriptors.
------------------ Configuration Descriptor -------------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x0020 (32 bytes)
bNumInterfaces : 0x01 (1 Interface)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0x80
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0x32 (100 mA)
Data (HexDump) : 09 02 20 00 01 01 00 80 32 09 04 00 00 02 08 06 .. .....2.......
-
50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 P...............
Interface Descriptors
The BOT mass storage device type is defined in the interface descriptor, so it needs to be filled in as required.
Field | Value | Instruction |
---|---|---|
bInterfaceClass | 0x08 | MASS Storage Class |
bInterfaceSubClass | 0x06 | Indicates a SCSI command set |
bInterfaceProtocol | 0x50 | BULK-ONLY TRANSPORT |
Set of commands supported by bInterfaceSubClass
SubClass Code | Command Block Specification | Comment |
---|---|---|
00h | SCSI command set not reported | De facto use |
01h | Reduced Block Commands (RBC) T10 Project 1240-D | Defined outside of USB |
02h | MMC-5 (ATAPI) | Defined outside of USB |
03h | Obsolete | Was SSF-8070i |
04h | USB Floppy Interface (UFI) | Specifies how to interface Floppy Disk Drives to USB |
05h | Obsolete | Was QIC-157 |
06h | SCSI transparent command set | Defined outside of USB |
07h | Lockable Mass Storage | LSDFS specifies how host has to negotiate access before trying SCSI. |
08h | IEEE 1667 | Defined outside of USB |
09h – FEh | Reserved | Reserved |
FFh | Specific to device vendor | De facto use |
BInterfaceProtocol Indicates the supported protocol
bInterfaceProtocol | Protocol Implementation | Comment |
---|---|---|
00h | Control/Bulk/Interrupt protocol (with command completion interrupt) | USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport |
01h | Control/Bulk/Interrupt protocol (with no command completion interrupt) | USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport |
02h | Obsolete | |
03h – 4Fh | Reserved | Reserved |
50h | Bulk-Only Transport (BBB) | USB Mass Storage Class Bulk-Only Transport |
51h – FEh | Reserved | Reserved |
FFh | Specific to device vendor | De facto use |
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x02 (2 Endpoints)
bInterfaceClass : 0x08 (Mass Storage)
bInterfaceSubClass : 0x06 (SCSI transparent command set)
bInterfaceProtocol : 0x50 (Bulk-Only Transport)
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 00 02 08 06 50 00 .......P.
Endpoint Descriptors
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 81 02 00 02 00 .......
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 02 02 00 02 00
String Descriptors
The string descriptor can be customized except that the device serial number has special requirements.
-
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
Data (HexDump) : 04 03 09 04 ....
-
------ String Descriptor 1 ------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "DiskMFR"
Data (HexDump) : 12 03 4B 00 69 00 6E 00 67 00 73 00 74 00 6F 00 ..D.i.s.k.M.F.R.
-
6E 00 n.
-
------ String Descriptor 2 ------
bLength : 0x22 (34 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "DiskMFR 2.0"
Data (HexDump) : 22 03 44 00 61 00 74 00 61 00 54 00 72 00 61 00 ".D.i.s.k.M.F.R.
-
76 00 65 00 6C 00 65 00 72 00 20 00 32 00 2E 00 v.e.l.e.r. .2...
-
30 00 0.
-
------ String Descriptor 3 ------
bLength : 0x32 (50 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "1C6F654E48EB1FC1391B7D69"
Data (HexDump) : 32 03 31 00 43 00 36 00 46 00 36 00 35 00 34 00 2.1.C.6.F.6.5.4.
-
45 00 34 00 38 00 45 00 42 00 31 00 46 00 43 00 E.4.8.E.B.1.F.C.
-
31 00 33 00 39 00 31 00 42 00 37 00 44 00 36 00 1.3.9.1.B.7.D.6.
-
39 00