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

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

Chapter 8

Wire Adapter

The Wire Adapter Class definition provides a generic abstraction that delivers the capabilities of a Wired or Wireless USB Host Controller through a USB device interface. This definition includes devices that are used to connect wired USB devices to a Wireless USB host (Device Wire Adapter) and also to those devices that add Wireless USB capabilities to a USB 2.0 host (Host Wire Adapter).

This chapter contains all necessary information for a designer to build a compliant Wire Adapter device. It specifies the standard and class-specific descriptors that must be present in each Wire Adapter. It further explains the use of class-specific requests that allow for full control of the Wire Adapter. This chapter is intended to be useful for:

A hardware device vendor or firmware engineer intending to build and program a Wired or Wireless USB connected Wire Adapter which adheres to this specification, and

A software driver developer.

This chapter first describes the common operation model and control mechanisms for Wire Adapters. This is followed by a Device Wire Adapter-specific section then a Host Wire Adapter specific section. The last section details requirements for a radio management interface, which is a required interface for a Host Wire Adapter.

8.1Operational Model

This chapter defines two forms of Wire Adapters as illustrated in Figure 8-1. A Host Wire Adapter (HWA) is a USB device whose upstream connection is a USB 2.0 wired interface. The HWA operates as a host to a cluster of downstream Wireless USB devices. The Device Wire Adapter (DWA) is a USB device whose upstream connection is a Wireless USB interface. The DWA operates as a USB 2.0 (wired) host to devices connected below its downstream port(s). Figure 8-1 illustrates the USB device connection topology enabled when HWAs and DWAs are ‘connected’ in series. The HWA is the host to the DWA and WUSB Dev devices and the DWA is the host for the Mass Storage and other USB2 device.

Figure 8-1. Wire Adapter Enabled USB Device Topology

8.1.1 Functional Characteristics

The basic functional block models for a HWA and DWA are illustrated in Figure 8-2. The common functional components of a Wire Adapter (WA) include the device control and WA functions. Device control is accessed via the Default Control Pipe using the USB 2.0 or Wireless USB standard device requests. These requests are defined in Chapter 9 of the USB 2.0 specification and Section 7.3 of this specification. Host Wire Adapters provide an interface for controlling the UWB radio (see Section 8.6). Device Wire Adapters provide an Isochronous Streaming interface to support isochronous data streams (see Section 8.4.1).

195

Note 1

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

Figure 8-2. Wire Adapter Functional Model Block Diagrams

The WA function is operationally common to all WA implementations. The WA function is managed via the WA Data Transfer Interface (see Section 8.1.2). HWA and DWA-specific portions of the Data Transfer interface are described in Sections 8.5 and 8.4, respectively.

8.1.2 Data Transfer Interface

This interface has a minimum of three function endpoints. These endpoints, plus the default Control endpoint are used to accomplish all of the data and control communications between the USB host system and the Wire Adapter. The endpoints and their purposes are enumerated below:

Control Endpoint

This is the standard Default Control Pipe. It handles all non-transfer

 

requests including all of the required standard requests which are

 

defined in chapter 9 of the USB 2.0 specification and the WA class

 

specific requests defined in Section8.3.

Notification Endpoint

This Interrupt IN endpoint provides transfer status notifications to the

 

host. Transfer status is not returned on this endpoint. Instead, it

 

provides a notification that transfer status or data is available on the

 

Data Transfer Read Endpoint. Other asynchronous notifications are

 

also returned on this endpoint.

 

A Wire Adapter can send multiple notifications (up to the max packet

 

size of the interrupt endpoint) when it is polled. See Section 8.3.2 for

 

the types of notifications that may be sent to a host by a Wire Adapter.

Data Transfer

This set of paired (IN/OUT) endpoints is used to move data and data

Endpoint Pair

transfer requests through the Wire Adapter to/from the client function

 

endpoint. Note 1

 

The bulk OUT endpoint is used to send transfer requests and transfer

 

data from the host to the Wire Adapter.

 

The bulk IN endpoint is used to return transfer status and transfer data

 

from the Wire Adapter to the host. See below for details.

A DWA does not use the Data Transfer endpoint pair in the Data Transfer Interface to perform Isochronous transfers. All DWAs that support Isochronous transfers must have an Isochronous Streaming interface (See Section 8.4.1).

196

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

8.1.3 Remote Pipe

A Remote Pipe is a logical abstraction that provides a data flow through the Wire Adapter to a specific endpoint on a specific device. Pipes are described in detail in Chapters 5 and 10 of the USB Specification 2.0.

A Wire Adapter provides a fixed number of Remote Pipes. The number of Remote Pipes supported is up to the implementer. A simple Wire Adapter must provide at least 1 Remote Pipe to provide support for a single attached device that only requires a control endpoint. The maximum number of Remote Pipes that a Wire Adapter would need to support is 3937 (127 devices X 31 endpoints/device); however Wire Adapter implementations are never expected to support 3937 physical Remote Pipes. Host software will multiplex Remote Pipes between Asynchronous endpoints. Periodic endpoints that have active transfers will require dedicated Remote Pipes. The minimum number of Remote Pipes is twice the number of devices (HWA) or ports (DWA) that the Wire Adapter supports at the same time.

The Default Control Pipe is used to initialize and manage individual Remote Pipes and the Data Transfer Pair is used to move data through them. The general operational flow of a Remote Pipe is:

1.Host initializes a Remote Pipe resource on the Wire Adapter via requests on the Default Control Pipe (see Section 8.3.1).

2.To start a control, bulk, or interrupt transfer to a device connected downstream of a Wire Adapter, the host sends a Transfer Request (Section 8.3.3) over the Data Transfer OUT endpoint to the Wire Adapter function. The Transfer Request is addressed to a specific Remote Pipe resource on the Wire Adapter. If the associated client function endpoint is an OUT, the OUT data will immediately follow the Transfer Request. In general the Data Transfer OUT endpoint is used for the following purposes:

Send Transfer Requests

Send data destined for a device connected to one of the ports of the Wire Adapter

Stop a Transfer Request by sending Abort Transfer Request

The Wire Adapter must check the length and transfer request type of the Transfer Request packet received and ensure that they match. It also must check that the target Remote Pipe is configured to the same transfer type.

If the Transfer Request received by the Wire Adapter is an OUT transaction, then the data destined for the downstream device will be sent immediately after the request in the next packet. The amount of data that follows the Transfer Request is described in the Transfer Request.

The Wire Adapter does not STALL the endpoint when the Transfer Request is incorrect. Rather, it continues to accept the Transfer Request and any data that may follow the request. The Wire Adapter must then send a Transfer Completion notification on the notification endpoint. The host will respond by polling the associated Data Transfer IN endpoint to get the Transfer Result, which must state that the Wire Adapter detected an error in the Transfer Request. The error values are defined in Table 8-15 (see Section 8.3.3.4).

3.When the transfer completes, the Wire Adapter sends a Transfer Complete Notification (Section 8.3.3.3) to the host on the notification endpoint.

4.The data and transfer results generated from a bulk, interrupt or control transfer request are transferred to the host from the Wire Adapter through the Data Transfer IN endpoint. The data stream on this endpoint is organized as a Transfer Result (Section 8.3.3.4) followed by an optional stream of transfer data from the associated endpoint. The amount of data to be returned to the host is described in the Transfer Result.

If a transfer does not complete successfully, the Wire Adapter will only return a Transfer Result and will not return any data back to the host.

If the host sends more Transfer Requests than a Remote Pipe in the Wire Adapter can concurrently handle (as reported in its RPipe descriptor) the Wire Adapter will NAK the transaction until it has completed a pending transfer on that Remote Pipe.

Section 8.5.1 describes how isochronous transfers are handled on a HWA and Section 8.4.1 describes how they are handled on a DWA.

197

Chapter 8

 

Wire Adapter

Wireless Universal Serial Bus Specification, Revision 1.0

8.1.4 Wire Adapter Functional Blocks

The Wire Adapter consists of five functional blocks as illustrated in Figure 8-3.

Upstream Port

Upstream Endpoint

 

RPipe Controller

Controller

 

 

 

 

 

 

Downstream Host Controller

Downstream Port(s)

Figure 8-3. General WA Function Blocks

8.1.5 Downstream Port(s)

A Device Wire Adapter has one or more downstream ports. The ports behave like those in the USB 2.0 hubs. The Device Wire Adapter monitors the status of all of the ports and reports them to the host if there is any change.

The number of downstream ports that is implemented on a Device Wire Adapter is indicated in the bNumPorts field of the Wire Adapter Class Descriptor. The maximum number of downstream ports that can be implemented on a Wire Adapter is 127. The functions and behavior of the downstream port on a DWA are the same as the ones of a USB 2.0 Hub which are described in the Section 11.5 of the USB 2.0 Specification.

A Host Wire Adapter does not have downstream ports since all the devices it can communicate with are Wireless. The HWA will forward all asynchronous notifications (connect/reconnect/disconnect/sleep etc) received from a downstream device to Host software. Host software is responsible for handling the various downstream port functions for an HWA. However, an HWA needs to store some information for each device connected downstream of it, See Section 8.5.3.6. An HWA specifies the total number of devices that can be connected to it in the bNumPorts field in its Wire Adapter descriptor.

8.1.6 Upstream Port

A host communicates with a Wire Adapter via its upstream port. The port is used for:

Control of the Wire Adapter function

Notification of changes to the host

Communicating with the devices connected downstream of the Wire Adapter (via Remote Pipes)

A HWA may be a Bus Powered USB 2.0 device. The upstream port of the HWA must operate at Full-speed and High-speed. If the HWA is operating at full speed then Isochronous transfers are not supported. The upstream port of an HWA is the device side interface of a USB 2.0 device which is described in Section 11.6 of the USB 2.0 Specification.

The upstream port of a DWA is the device side interface of a Wireless USB device which is described in Chapter 7 of this specification.

198

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