Your SlideShare is downloading. ×
0
Introduction of USB Device by Using USB Storage
Overview <ul><li>Device Requests
Storage Commands </li></ul>
Device Requests Get Descriptor Get Configuration Get String Others
Device Requests <ul><li>Device Descriptor </li></ul>12 01  0002  00 00 0040  0713   6301  0001  01 02 0301 Field Offset Si...
Device Requests Configuration Descriptor 09 02 20 00  01 010080 32 09 04 00  0002 0806   50 00 07 05   01 02 0002  00 07 0...
Device Requests <ul><li>Get String </li></ul>8006 0203  0904FF00 Field Offset Size Description bLeng th 0 1 Size of this s...
Storage Command bit Byte 7 6 5 4 3 2 1 0 0-3 dCBWSignature 4-7 dCBWTag 8-11 dCBWDataTransferLength 12 bmCBWFlags 13 Reserv...
Storage Command bit Byte 7 6 5 4 3 2 1 0 0 Operation Code (28h) 1 dCBWTag 2 (MSB) 3 Logical Block Address 4 5 (LSB) 6 Rese...
Upcoming SlideShare
Loading in...5
×

Usb Device20090717

213

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
213
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Usb Device20090717"

  1. 1. Introduction of USB Device by Using USB Storage
  2. 2. Overview <ul><li>Device Requests
  3. 3. Storage Commands </li></ul>
  4. 4. Device Requests Get Descriptor Get Configuration Get String Others
  5. 5. Device Requests <ul><li>Device Descriptor </li></ul>12 01 0002 00 00 0040 0713 6301 0001 01 02 0301 Field Offset Size Example RequestType 0 1 Direction, Recipient Request 1 1 GET_STATUS, SET_ADDRESS DescriptorType 2 2 DEVICE, CONFIGURATION wLength 6 2 min(wLength, Return bLength) Format of Setup Data Field Offset Size Description bLength 0 1 Size of this package DescriptorType 1 1 Response DescriptorType DeviceClass 4 2 Assign device, like printer(0x7), vendor assign(0xFF), multiple classes(0x0) idVendor 8 2 Assigned by USB-IF idProduct 8 2 Assigned by manufacturer iManufacturer 14 1 Index of string for munufacturer Device Descriptor <ul><li>Get Descriptor </li></ul>8006 0001 0000 12 00
  6. 6. Device Requests Configuration Descriptor 09 02 20 00 01 010080 32 09 04 00 0002 0806 50 00 07 05 01 02 0002 00 07 05 81 02 0002 00 Field Offset Size Description bLength 0 1 Size of this endpoint DescriptorType 1 1 Endpoint EndpointAddress 2 1 Bit 3...0: Index of this endpoint Bit 7: 0 = OUT, 1 = In MaxPacketSize 4 2 Maximum size of this endpoint <ul><li>Get Configuration </li></ul>8006 0002 0000FF00 Field Offset Size Description bLength 0 1 Size of this configuration DescriptorType 1 1 Configuration TotalLength 2 2 Size of this package NumberInterfaces 4 1 Number of interfaces in this device Field Offset Size Description bLength 0 1 Size of this interface DescriptorType 1 1 Interface InterfaceNumber 2 1 Index of this interface InterfaceClass 5 2 Assigned by USB-IF InterfaceProtocol 7 1 Qualified by InterfaceClass Endpoint Descriptor Configuration Descriptor Device Descriptor
  7. 7. Device Requests <ul><li>Get String </li></ul>8006 0203 0904FF00 Field Offset Size Description bLeng th 0 1 Size of this string DescriptorType 1 1 String bString 2 N UNICODE encoded string UNICODE String Descriptor <ul><li>String Descriptor </li></ul>16 03 4600 6C006100 73006800 20004400 69007300 6B00 F l a s h _ D i s k <ul><li>Unknown </li></ul>A1FE0000 00000100 00 A1000000 0000F103 HMFG:ARGOX A-254 ;CMD:EPL;MDL:203dpi;CLS:PRINTER;PROTOCOLS:IEEE1284.4;
  8. 8. Storage Command bit Byte 7 6 5 4 3 2 1 0 0-3 dCBWSignature 4-7 dCBWTag 8-11 dCBWDataTransferLength 12 bmCBWFlags 13 Reserved(0) bCBWLUN 14 Reserved(0) bCBWCBLength 15-30 CBWCB Command Block Wrapper bit Byte 7 6 5 4 3 2 1 0 0-3 dCBWSignature 4-7 dCBWTag 8-11 dCBWDataTransferLength 12 bmCBWFlags Command Status Wrapper
  9. 9. Storage Command bit Byte 7 6 5 4 3 2 1 0 0 Operation Code (28h) 1 dCBWTag 2 (MSB) 3 Logical Block Address 4 5 (LSB) 6 Reserved 7 Transfer Length (MSB) 8 Transfer Length (LSB) 9 Reserved 10 Reserved 11 Reserved Command Block Wrapper Command Block - Read(10) 55534243 08603284 FC000000 80000A23 00000000 000000FC 00000000 000000 > 00000008 003C3FFE 02000200 322E3020 55534220 466C6173 … < 55534253 08603284 00000000 00 <
  10. 10. Storage Command
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×