Wireless USB Protocol: John S. Howard
Wireless USB Protocol: John S. Howard
Wireless USB Protocol: John S. Howard
John S. Howard
Senior Architect
Intel Corporation
Agenda
Protocol Components
Data Transfers (general model)
Device Notifications
Flow Control
2
Wireless USB Channel
Review
WiMedia Physical Layer
Beacon
Channel Time Beacon
Beacon Superframe n Superframe n+1
Period Period Period
DRP DRP DRP DRP DRP DRP
WUSB WUSB WUSB WUSB WUSB WUSB
t=0 t=0 t=0
WiMedia
MAC
M M M M M M M M M M
M M M M M M M M M M Wireless USB Channel
C C C C C C C C C C
3
Packet Layout
N * 6 OFDM Symbols 12 OFDM Symbols 30 OFDM Symbols
msb lsb
Non-secure Packet Pad Tail Payload Tail MAC PHY
FCS HCS PLCP Preamble
Format Bits Bits Variable Length: Z or more bytes Bits Header Header
WUSB
MIC Application Payload SFN Encrypt Rsrvd TKID Acc Info Seq. Control SrcID DestID Frame
Hdr
(8) (Variable Length: 0 to MaxPacketSize) (6) Offset (2) (1) (3) (2) (2) (2) (2) Control (2)
(2)
Secure Packet Isochronous
Type [8:6] Delivery Ident/Control Frame Subtype [12:9]
Format Packet Format (011B) Data Frame [12] = 1B; [11:9] = Stream Index
(001B) Control Frame [12:9] = Application Defined Control Value
Cypher Text
(Encrypted Data)
MMC MMC
HDR
HDR
Information
Elements
Basic
Transaction Group
structure used to
maintain Wireless USB Channel
5
Transaction Group
Channel Time Allocations [WCTA_IE]
MMC MMC
Protocol
Attributes Time
WXCTA [EOL]
WXCTA [0]
W XCTA [1]
HDR
HDR
WCTA_IE Header
Start Time
Start Time (s)
Type-Specific Start Time is Measured from the
beginning of the MMC packet(s)
Transaction Group
6
Transaction Group
Slot Durations
W XCTA [EOL]
HDR
HDR
Endpoint Info Endpoint Info Slot [0] Slot [1]
Flags Flags
Slot Type Slot Type
Type-Specific Type-Specific
Transaction Group
7
Time Slot Allocations
WDNTSCTA
WDRCTA
WDTCTA
8
Time Slot Allocations [cont.]
9
Transaction Group
Protocol Synchronization
MMC MMC
preamble preamble
(n-1) TS[0] TS[1] TS[2] TS[3] TS[4] (n)
10
Transaction Group
Protocol Synchronization (cont.)
Radio Medium
PLCP Preamble PLCP Header
t0
30 OFDM Symbols
11
Time Slot Scheduling
Requirements
Host Transmitted Packets Device Transmitted Packets
MMC MMC
TS[0] TS[1] TS[2] TS[3] TS[4]
MMC
Packet
t INTERS LOTTIME Standard
data + PHY Hdr Data Packet
tGUARDTIME Preamble for TS[3]
Standard
data t INTERS LOTTIME PHY Hdr Data Packet
Preamble for TS[1]
12
Data Burst Timing
tINTERSLOTTIME tSTREAMIPG
tSTREAMIPG
tBUSTURNINTERSLOTTIME
Standard PHY Hdr data Short/Std PHY Hdr data
MMC Preamble Preamble
Protocol Components
Data Transfers (general model)
Device Notifications
Flow Control
14
Data Stream Synchronization
Basic Model
Identifies: 7 3 7 3
6 4 6 4
5 5
Data ordering 0 0
9 1 1
requirements 8 2 Acknowledgement
8
9
2
(0011110000 B)
3
Guarantees advancement 7
6 4
7
6 4
3
IN OUT
Direction = IN = 1
bvDINAck Direction = OUT = 0
PHY_TXRate
Smashed MMC Data not Ready, or Internal Error Smashed MMC
NAK or
DATA HNDSK DATA Number of packets in
DATA DATA
(Seq# N+Y) (Seq# N+Y)
bvDINAck
Idle
Idle
17
Data IN Transfer
Streaming Example
TokenI.bvDINAcK =002H
TokenI .bvDINAcK =001 H
MMC MMC
Data (S0) Data (S 1)
(Token I)
(Token I)
W DTCTA
W DTCTA
HDR
HDR
Transaction 1
Transaction 0 Transaction 2
18
Data IN Transfer
End Of Transfer Example
Blank W DTCTA
BlanK .wStart = NextWxCTA.wStart
bvDINAcK=002H TokenI.bvDINAcK=000H
MMC MMC
Data (S1)
(Token I)
(Token I)
W DTCTA
W DTCTA
W DTCTA
HDR
HDR
EOL
Transaction Group N Transaction Group N + 1
Transaction N
Transaction N-1
Blank WDTCTA (IN)
WDTCTA (IN) DATA(S1) bvDINAck = 000H
bvDINAck = 002H (Use Data) wStart = NextWxCTA.wStart
End of List WxCTA (EOL)
19
Data IN Transfer
Short Packet Example
TokenI.bvDINAcK =002H
TokenI .bvDINAcK =001 H
MMC MMC
Data (S0)
(Token I)
(Token I)
W D TCTA
W D TCTA
HDR
HDR
LastPacketFlag = 1B
Blank W DT CTA
Transaction 1
Transaction 0
DATA(S0)
WDTCTA (IN) LastPacketFlag = 1 WDTCTA (IN)
bvDINAck = 001H bvDINAck = 002H
(Use Data)
MMC Device EP TX MMC
MMC MMC
Data (S 0) AcK Data (S 1) AcK
(Token O)
(Hndsk O)
(Token O)
(Hndsk O)
W DRCTA
W DRCTA
WDTCTA
W DTCTA
HDR
HDR
bvAckCode bvAckCode
10 B 01B
Transaction 1
Transaction 0
21
Data OUT Transfers
Short Packet Example
LastPacketFlag = 1
MMC MMC
Data (S 0) AcK
(Token O)
(Hndsk O)
WDTCTA
W D RCTA
HDR
HDR
bvAckCode
002 H
Transaction 1
Transaction 0
Setup + first IN Data Stage Idle Setup + first OUT Data Stage
transaction transaction
HDR WDT CTA Setup Bytes MMC HDR WDRCTA Setup Bytes WDT CTA
Smashed MMC
Data Packet
DATA NAK or DATA
Data HNDSK (Seq# 0)
(Seq# 0) STALL
bvDINAck Idle
Idle
23
Control Transaction Format
Setup w/No Data Stage; Bare Status Stage
Idle
Setup + No Data Stage Status Stage
Data
Smashed MMC
ACK or ACK or
Handshake
HNDSK NAK or HNDSK NAK or
STALL STALL
Idle Idle
24
Control Transfer
Example (Set Address - No Data Stage)
ETC.
HDR
HDR
Setup Stage Status Stage
Transaction 0
WDTCTA HNDSHK
SetupFlag = 1B Hndshk code = ACK
Ctrl/StatusFlg = 1B bvAckCode = 00H
(Handshake) Direction = IN
Setup Bytes (8) set address
Host TX (MMC) Device EP TX Host TX (MMC)
Setup Stage Status Stage
25
Control Transfer
Example (Control Write - SetKey)
(Status Stg)
(Hndsk O )
(Token O)
WDTCTA
WDTCTA
W DRCTA
ETC.
HDR
HDR
HDR
Length = Y
Transaction 0 Transaction 1
WDRCTA Data Out HNDSHK WDTCTA HNDSHK
SetupFlag = 1B Seq = 0B Hndshk code = ACK SetupFlag = 0B Hndshk code = ACK
Ctrl/StatusFlag = 0B (Set Key) bvAckCode = 02H Ctrl/StatusFlag = 1B bvAckCode = 00H
(Handshake) (Handshake) Direction = IN
Setup Bytes (8) set Key
WDTCTA - handshake
26
Control Transfer
(Control Write SetKey lost data packet)
(Status Stg)
Data (seq = 0) AcK Data (seq = 0) AcK HNSK
(Hndsk O)
(Hndsk O)
(Token O)
(Token I)
WDT CTA
WDT CTA
WDR CTA
WDT CTA
WDT CTA
ETC.
HDR
HDR
HDR
HDR
Length = Y Length = Y
Transaction 0 Transaction 1
WDRCTA Data Out HNDSHK WDRCTA Data Out HNDSHK
SetupFlag = 1B Seq = 0B Hndshk code = ACK SetupFlag = 0B Seq = 0B Hndshk
Ctrl/StatusFlag = 0B (Set Key) bvAckCode = 01H Ctrl/StatusFlag = 0B (Set Key code = ACK
(Handshake) WDTCTA - handshake bvAckCode
Setup Bytes (8) set Key = 02H
WDTCTA - handshake
27
Control Transfer
Example (Control Read Get Descriptor)
(Status St g)
(Token I)
W DTCTA
W DTCTA
Setup Bytes
ETC.
HDR
HDR
Length = Y
HDR
bvDINAcK = 002H
SetupFlag = 1 StatusStageFlag = 1
Setup
Data Stage
Stage Status Stage
Transaction 0 Transaction 1
WDTCTA Data IN WDTCTA HNDSHK
SetupFlag = 1B Seq = 1B SetupFlag = 0B Hndshk code = ACK
Ctrl/StatusFlag = 0B (Get Descriptor Data) Ctrl/StatusFlag = 1B bvAckCode = 00H
bvDINAck = 001H bvDINAck = 002H Direction = IN
Setup Bytes (8) (Handshake)
Get Descriptor
(Status Stg)
(Token I)
WDTCTA
WDTCTA
ETC.
HDR
HDR
HDR
with Data
Std. IN Transaction
MMC
X
bvDINAcK = 002H
Data (seq = 0) StatusStageFlag = 1
(Token I)
WDTCTA
Setup Bytes
HDR
Length = Y
Handshake Transaction
(Status Stg)
WDTCTA
(Token I)
(Token I)
W DTCTA
W DTCTA
ETC.
Setup Bytes
HDR
HDR
HDR
HDR
29
Agenda
Packet Layouts
Transaction Groups
Timing Constraints
Data Transfers (general model)
Device Notifications
Flow Control
30
Device Notifications Time Slots
DNTS
WDNTSCTA
WDNTSCTA indicates # Slots (N)
number of message slots
Device selects a message
slot using a uniformly
DNTS CTA Start
distributed random integer
Slot Select = uniform(1, N)
value (in range 1 to N)
Device transmits message
a message slot start time
32
Device Notifications
Reliability
33
Device Notification
Example (Device Perspective) - Connect
Transmit
Xmit (DN_Connect, Self-Beaconing, MyCDID)
Notification
Connect
Connected Ack
34
Agenda
Packet Layouts
Transaction Groups
Timing Constraints
Data Transfers (general model)
Device Notifications
Flow Control
35
Flow Control
(St atus St g)
WDNTSCTA
(Token I)
(Token I)
W DTCTA
W DTCTA
W DTCTA
Setup Bytes
ETC.
HDR
HDR
HDR
HDR
HDR
Length = Y
DN_EPRdy
bvDINAcK = 002H
SetupFlag = 1 StatusStageFlag = 1
Setup Data Stage (cont.)
Data Stage
Stage Status Stage