Скачиваний:
31
Добавлен:
02.05.2014
Размер:
3.51 Mб
Скачать

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Table 7-1. Standard Request Availability in Wireless USB Device States (cont.)

Request

Available in

Note

 

UnAuthenticated

 

 

Device State

 

GET_STATUS

Yes

 

 

 

 

LOOPBACK_DATA_READ

Yes

 

LOOPBACK_DATA_WRITE

Yes

 

SET_ADDRESS

Yes

Note, see Section 7.3.1.3 for additional special

 

 

requirements for handling this request in Wireless

 

 

USB.

SET_CONFIGURATION

No

 

SET_DESCRIPTOR

No

 

 

 

 

SET_FEATURE

Yes

 

SET_INTERFACE

No

This request is only valid in the Configured device

 

 

state because it queries the current configuration.

SET_INTERFACE_DS

No

This request is optional. It is supported by devices

 

 

with interfaces that support the dynamic switching

 

 

mechanism.

SYNCH_FRAME

No

 

7.3.1 Wireless USB Extensions to Standard Requests

This section describes extensions to the standard set of device requests defined in the USB 2.0 specification [1]. This includes extensions to the requests defined in the USB 2.0 specification (Section 9.4) and specific requests defined for Wireless USB. Table 7-2 summarizes the standard Wireless USB device requests and Table 7-20 summarizes the Wireless USB Security Requests.

Table 7-2. Wireless USB-specific Standard Device Requets

bmRequestType

bRequest

wValue

wIndex

wLength

Data

 

 

 

 

 

 

00000000B

CLEAR_FEATURE

WUSB_DEVICE

WUSB Feature

Zero

None

 

 

 

Selector and

 

 

 

 

 

Feature Value

 

 

 

 

 

 

 

 

10000000B

GET_STATUS

Zero

Device Status

Variable

Status

 

 

 

Selector

 

Selector Data

 

 

 

 

 

 

00000000B

SET_ADDRESS

Device Address

Zero

Zero

None

 

 

 

 

 

 

00000000B

SET_FEATURE

WUSB_DEVICE

WUSB Feature

Zero

None

 

 

 

Selector and

 

 

 

 

 

Feature Value

 

 

 

 

 

 

 

 

00000001B

SET_INTERFACE_DS

Alternate Setting

Interface

2

Presentation

 

 

 

 

 

Time

 

 

 

 

 

 

00000000B

SET_WUSB_DATA

WUSB Data

Zero

WUSB Data

WUSB

 

 

Selector

 

Length

Selector Data

 

 

 

 

 

 

00000000B

LOOPBACK_DATA_WRITE

Zero

Zero

Data Length

Data

 

 

 

 

 

 

10000000B

LOOPBACK_DATA_READ

Zero

Zero

Data Length

Data

 

 

 

 

 

 

The USB 2.0 specification [1], Section 9.4 lists request codes for the standard device commands over the Default Pipe. Table 7-3 is an annotated list of additional standard request codes for devices. The annotations indicate whether the request code is specific to security.

141

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Table 7-3: Wireless USB Standard Request Codes

bRequest

Value

Purpose

 

 

 

SET_ENCRYPTION

13

Security

 

 

 

GET_ENCRYPTION

14

Security

SET_HANDSHAKE

15

Security

GET_HANDSHAKE

16

Security

 

 

 

SET_CONNECTION

17

Security

SET_SECURITY_DATA

18

Security

GET_SECURITY_DATA

19

Security

 

 

 

SET_WUSB_DATA

20

General

LOOPBACK_DATA_WRITE

21

General

LOOPBACK_DATA_READ

22

General

 

 

 

SET_INTERFACE_DS

23

General

The USB 2.0 specification, Section 9.4 lists standard feature selector values for enabling or setting specific features. Table 7-4 is a list of additional standard features selectors for devices. Wireless USB uses one feature selector value (WUSB_DEVICE) then defines a family of Wireless USB specific features which are relative to WUSB_DEVICE feature selector. The commands ClearFeature, SetFeature and GetStatus detail how Wireless USB uses these features.

Table 7-4. Wireless USB Standard Feature Selectors

Feature Selector

Recipient

Value

Wireless USB Feature Selectors

 

 

 

 

 

WUSB_DEVICE

Device

3

Feature Name

Code

 

 

 

TX DRP IE

0

 

 

 

DEV XMIT_PACKET

1

 

 

 

COUNT PACKETS

2

 

 

 

CAPTURE PACKETS

3

7.3.1.1Clear Feature

This request is used to clear a specific feature. The USB 2.0 defined uses of this command remain in effect for Wireless USB, see Section 9.4.1 in the USB 2.0 specification. The following description details extensions to this request for Wireless USB.

bmRequestType

bRequest

wValue

wIndex

wLength

Data

 

 

 

 

 

 

00000000B

CLEAR_FEATURE

Feature Selector =

Wireless USB Feature

Zero

None

 

 

WUSB_DEVICE

Selector

 

 

 

 

 

 

 

 

 

 

 

Zero or Feature Value

 

 

 

 

 

 

 

 

When the feature selector field (wValue) is set to WUSB_DEVICE, the least significant byte of wIndex is used to further qualify which Wireless USB device feature is to be modified with this request. Wireless USB device features are summarized in Table 7-13. Table 7-5 summarizes which of the Wireless USB features can be modified with the ClearFeature() request.

UnAuthenticated State: If the the specified feature selector is WUSB_DEVICE, device behavior when this request is received while the device is in the UnAuthenticated state is not specified..

142

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Default State: If the specified feature selector is WUSB_DEVICE, device behavior when this request is received while the device is in the Default state is not specified.

Address State: This request is valid in the Addressed state. Configured State: This request is valid in the Configured state.

Table 7-5. Features Modifiable via ClearFeature()

Wireless USB

Explanation

Feature Selector

 

 

TX DRP IE

On receipt of this request, the device will remove the associated DRP IE from its

 

MAC Layer Beacon. This request must only be sent to Self Beaconing devices.

DEV XMIT_PACKET

On receipt of this request, the device will be disabled from directed packet

 

transmission. This request must only be sent to Directed Beaconing devices. See

 

Section 4.3.7.2.1.

COUNT PACKETS

On receipt of this request, the device will be disabled for count packets operation.

 

This request must only be sent to Directed Beaconing devices. See Section

 

4.3.7.2.2.

CAPTURE PACKET

On receipt of this request, the device will be disabled for capture a packet

 

operation. This request must only be sent to Directed Beaconing devices. See

 

Section 4.3.7.2.3.

7.3.1.2Get Status

This request returns status information about different portions of a device. The following description details the extensions to the GetStatus() request for Wireless USB. For a description of the standard USB 2.0 request, refer to Section 9.4.5 in the USB 2.0 specification.

bmRequestType

bRequest

wValue

wIndex

wLength

Data

 

 

 

 

 

 

10000000B

GET_STATUS

Zero

Device Status Selector

Variable

Status Selector Data

 

 

 

 

 

 

The format of this request is a standard GetStatus() request as defined in USB2.0, with extended definition of the wIndex field when the recipient is DEVICE. The USB 2.0 specification requires that wIndex have a value of zero when bmRequestType specifies the recipient is the device (with a bRequest of GET_STATUS). The extension for Wireless USB encodes wIndex with a value indicating the specific device information the host is interested in. Note that the availability of this request depends on the state of the device and the addressed recipient. For example, a host should not address this request to an endpoint when the device is in the Default state because it has undefined results.

UnAuthenticated State: This request is valid in the UnAuthenticated state.

Default State:

This request is valid in the Default state (depending on recipient).

Address State:

This request is valid in the Addressed state.

Configured State:

This request is valid in the Configured state.

Table 7-6. Device-Level Status Selector Encodings for wIndex

wIndex

Status Type

Description

 

 

 

0000H

USB 2.0

This is the default encoding for this command defined in the USB 2.0

 

Standard

specification. It summarizes a small set of device level status indicators. This

 

Status

set of status indicators has been extended as described below for Wireless

 

 

USB

0001H

Wireless USB

This encoding returns the current values of Wireless USB specific features.

 

Feature

 

0002H

Channel Info

This encoding indicates the device must return information about its view of

 

 

the Wireless USB channel. The format of the data returned is defined below.

143

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Table 7-6. Device-Level Status Selector Encodings for wIndex (cont.)

wIndex

Status Type

Description

0003H

Received Data

This encoding instructs the device to return the data collected during the last

 

 

count packets or capture a packet operation. This request must only be sent

 

 

to Directed Beaconing devices.

0004H

MAS

This encoding instructs the device to return its MAS Availability information,

 

Availability

see below for details. This request must only be sent to Self Beaconing

 

 

devices.

0005H

Current

This encoding instructs the device to return its current transmit power

 

Transmit

settings for Notifications and Beacons, see below for details.

 

Power

 

USB 2.0 Standard Features

When the wIndex value is USB 2.0 Standard Status, the device returns the information illustrated in Figure 7-2.

Byte

D7

D6

D5

D4

D3

 

D2

D1

D0

 

 

 

 

 

 

 

 

 

 

0

 

Reserved, must be set to zero

 

 

Battery

Remote

Self

 

 

 

 

 

 

 

Powered

Wake

Powered

 

 

 

 

 

 

 

 

 

 

1

 

 

 

Reserved, must be set to zero

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 7-2. USB 2.0 Standard Status Information Returned by a GetStatus() Request to a Device

Refer to Section 9.4.5 of the USB 2.0 specification for descriptions of the Remote Wake and Self Powered fields. The Self Powered field should always return set to a one (1B) for a Wireless USB device. The default value for Remote Wake is defined in the USB 2.0 specification.

The Battery Powered field indicates whether the device is currently battery-powered. If D2 is reset to zero, the device is powered by a supply that is not a battery. The Battery Powered field value may not be changed by the SetFeature() or ClearFeature() requests.

Wireless USB Features

When the wIndex value is Wireless USB Feature Status, the device returns the information illustrated in Figure 7-3. The default values of these features after any device power-up or reset event is zero.

Byte

D7

D6

D5

 

D4

D3

D2

D1

D0

 

 

 

 

 

 

 

 

 

 

0

 

Reserved, must be set to zero

 

Capture

Count

Transmit

TX DRP

 

 

 

 

 

 

Packet

Packets

Packet

IE

 

 

 

 

 

 

 

 

 

 

Figure 7-3. Information Returned by GetStatus(WirelessUSBFeatures)

The TX DRP IE field indicates whether the device is enabled to add a DRP IE to its beacon. If TX DRP IE is a one, the device transmits the DRP IE information set by the cluster host. This field is changed by SetFeature() and ClearFeature(). This is a read-only field unless the device is a Self-beaconing device.

The Transmit Packet field indicates whether the Directed Packet Transmission feature is active. See Section 4.3.7.2.1 for a description of device behavior when doing Directed Packet Transmission.

The Count Packets field is set if the device is enabled for counting packets and reset otherwise. See Section 4.3.7.2.2 for a description of device behavior when enabled for counting packets.

The Capture Packets field is set if the device is enabled for capturing a packet and reset otherwise. See Section 4.3.7.2.3 for a description of device behavior when enabled for capturing a packet.

144

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Channel Information

When wIndex value is equal to Channel Info, the device must return the information it has gathered with regards to the state of the underlying PHY channel. The format of the data returned is summarized in Table 7-7. A host can use this command to determine how well the device is receiving MMCs from the host.

Table 7-7. Wireless USB Channel Status Information Returned by Device

Offset

Field

Size

Value

Description

0

LQI

1

Number

LQI value of the last MMC packet received from the Host.

Received Data

When wIndex value is equal to Received Data, the device must return the information it has gathered from the latest Count Packets or Capture Packet operation. Section 4.3.8.3 describes operation of the Count Packets and Capture Packet operations. The format of the data returned is dependent on which operation was last completed.

Table 7-8 shows the format of data returned from a Count Packets operation. For each counted packet the device returns a 10 byte block that includes the Reception Time, the LQI, and the first six bytes of the MAC header.

Table 7-8. Count Packets Data format

Offset

Field

Size

Description

 

 

 

 

0

Packet

1

Number of packets that were counted and whose info is returned. Bits

 

Count

 

0-6 hold the actual packet count. Bit 7 is set if there was a buffer

 

 

 

overrun and zero otherwise.

1

Reception

3

USB Channel Time when this packet was received. Time marker is the

 

Time

 

beginning of the preamble.

4

MAC

6

First six bytes of the MAC header of the counted packet.

 

Header Info

 

 

10

LQI

1

LQI value of the counted packet. A definition of LQI value is provide

 

 

 

below.

11

Next Packet

10

The block of information for the next counted packet.

 

info Block

 

 

Table 7-9 shows the format of data returned from a Capture Packet operation. For the captured packet, the device returns the MAC header and payload. The device also provides the time the packet was received and indicates if there was any problem receiving the packet.

145

Chapter 7

 

Wireless USB Framework

Wireless Universal Serial Bus Specification, Revision 1.0

Table 7-9. Capture Packet Data format

Offset

Field

Size

Description

0

Receive

1

Bit vector that provides reception information about the captured

 

Status

 

packet. Bit 0 is set if the captured packet did not have a valid FCS. Bit

 

 

 

1 is set of the captured packet was larger than the available buffer area.

 

 

 

Bits [7:2] are reserved and must be set to zero.

1

Reception

3

USB Channel Time when this packet was received. Time marker is the

 

Time

 

beginning of the preamble

4

MAC

10

MAC Layer header from the captured packet.

 

Header

 

 

14

Payload

N

Payload of the captured packet.

14+N

LQI

1

LQI value of the capture packet. A definition of LQI value is provided

 

 

 

below.

LQI is an average SNR value at the FFT output for the received packet.

Table 7-10. Definition of LQI values

LQI Value

SNR

0

Too low to be accurately

 

measured

1

- 6 dB

2

- 5 dB

 

 

31

24 dB

32-255

Reserved

MAS Availability

When the wIndex value is equal to MAS Availability, the device will then proceed to accumulate information from its neighbor’s beacons about which MAS slots are available for this device to use (not reserved by any neighbor not a member of the Wireless USB cluster). Note that the device may have MAS Availability information that is current so that it does not have to accumulate the information. The data content of the data

returned by the device is formatted as illustrated in Table 7-11. The device must ignore its hosts DRP IEs for the current Wireless USB channel when building its availability map.

The host must only issue this GetStatus request to a device that has identified itself as a Self-beaconing device. A Nonor Directed Beaconing device must respond to this request with a Request Error.

Table 7-11. MAS Availability Device Status Format

Offset

Field

Size

Value

Description

 

 

 

 

 

0

bmMASAvailability

32

Bitmap

This is a 256-bit map, where each bit location

 

 

 

 

corresponds to a MAS slot in the MAC Layer super-

 

 

 

 

frame. A 1B in a bit location means that the device is

 

 

 

 

available for a reservation in the corresponding MAS

 

 

 

 

slot. A 0B indicates the device is not available. Bit 0

 

 

 

 

corresponds to MAS slot 0.

146

Соседние файлы в папке Wireless USB Specification Revision 1.0 May 12, 2005