UWB the the WiMedia Way

The goals listed above could not be satisfied with one hardware interface. Plugging a USB dongle into a PC and connecting to a printer through a wireless hub works well, but this scheme can’t scale to a large number of devices or to storage devices that demand high transfer rates.

The theoretical throughput of a USB host to device connection is 352 Mbps . Practical implementation of CWUSB can vary widely. There are tradeoffs between convenience, cost and throughput. The CWUSB specification allows for two methods of support on the host side:

Host Wire Adapter (HWA); this is a USB dongle.

Wireless Host Controller (WHCI); this is a PCI or PCI Express interface that mimics a conventional high speed wired USB interface.

On the device side there are two choices:

Device Wire Adapter (DWA); devices connect as though there were a wired connection. DWA also supports wireless hubs.

Native device; devices know they are talking to CWUSB and can optimize for maximum performance and minimum power consumption and cost of goods.

The optimum performance can be achieved when a WHCI controller on the host talks to a native device. The most convenient implementation is when a HWA connects to a device through a DWA or wireless hub.

The first devices appearing on the market are dongle/hub pairs. Throughput has not been impressive, and even as devices evolve the HWA/DWA connection will never fully exploit the bandwidth promised by CWUSB. Nevertheless many people will find it convenient to move their printer off their desk and over to a table on the other side of a room. Wireless is a huge win over stringing an USB cable across a room. We lived for years with USB 1.2 at 12 Mbps and even the worst HWA/DWA implementation beats that.

A Host Wire Adapter (HWA) is a convenient way to connect to Wireless USB devices, as it is a dongle that plugs into a Windows or Macintosh host; however, from a performance point of view, there is significant software overhead as the HWA must use one control and bulk endpoint to create the fiction that USB device drivers are directly addressing wired devices and endpoints.

The Remote pipe or RPIPE construct makes it possible that software at higher levels can operate in a virtualized environment where legacy drivers can operate just as though they were directly connected over wired USB. There is no free lunch. The overhead necessary to maintain this fiction is costly and performance suffers.

The RPIPE construct allows device drivers to address devices and endpoints as though the devices were connected directly via wired USB. In order to maintain this fiction the HWA must take messages sent to it and direct them to the wireless hub which must know which port and endpoint to direct the message to. All of this involves allocation of buffer memory in the HWA and in the hub and significant overhead of messages between HWA and hub and HWA and software running in the host.

For example interrupt endpoints must be polled at regular intervals. With a wired USB interface, the polling schedule is handled by hardware. With a DWA interface the interrupt endpoint must be emulated through a control and bulk endpoint.

The HWA/DWA or ‘cable replacement’ model was necessary for marketing reasons. There are billions of wired USB devices. Even if only a small percentage of customers was to replace their cable with HWA/DWA combinations that would be a large number.

The USB Implementers Forum has published a specification for a Wireless Host Controller Interface (WHCI). This is a PCI or PCI Express interface which allows CWUSB to operate at speeds near the theoretical maximum rate. The interface is a superset of existing wired USB hardware interfaces and supports the direct DMA into host buffers. WHCI provides hardware support for control, isochronous, interrupt and bulk endpoints. Drivers which have been working with wired USB can be more directly supported with WHCI than they can with the HWA virtualization scheme.

Today, Wired USB is built into motherboard chipsets from all manufacturers. To date no motherboard chipset manufacturer has announced WHCI in a motherboard chipset, but as WHCI is very similar to EHCI (USB 2.0) an announcement can’t be too far off.

The availability of WHCI interfaces will prove that CWUSB can come close to matching wired USB for both capacity and transfer speed. Both approaches are necessary. In the real world ease of setup, reliability and reasonable prices are the factors which will sell CWUSB.

The host interface is only half the equation. In order to get maximum performance and convenience devices should operate as native Certified Wireless USB. CWUSB makes a distinction between Device Wire Adapters and native devices. Device wire adapters can plug into anything, and there is extra protocol overhead associated with supporting arbitrary connections. Native devices can be optimized to perform the task for which they are designed rather than support for arbitrary devices.

In a strict cable replacement model, a USB device has no idea it is connected wirelessly. This includes first-time association. This requires a two digit display and pushbutton. The display and pushbutton must be controlled from the CWUSB radio as the wired device does not understand association.

It would be clumsy for a digital camera to have two displays, one for normal operation and one for first-time association. If an embedded designer is going to support native mode CWUSB in their product, they must handle first-time association. The USB Implementers Forum did not define an interface to aid the embedded designer to deal with supporting CWUSB. In addition to the association issues (How many host relationships should a device remember?), there are myriad other issues that an embedded designer may want to take into consideration in order to optimize their product.

For example a camera must appear as a USB device when uploading pictures to a PC, but it might want to appear as a USB host when talking to a printer. It may want to run internet protocols in addition to CWUSB.

Staccato Communications has developed what it calls the Ripcord Control Library or RCL, which provides the necessary tools to support embedded system engineers achieve these goals.

RCL is shipped as ANSI C source code and is structured in such a way that it can easily be ported to real time environments. Today the Ripcord hardware supports both USB and SDIO interfaces and will support other hardware interfaces in the future. RCL abstracts the hardware interface between the radio and the device such that details of the hardware interface are hidden.

RCL allows access to software modules running inside the radio in a structured fashion.

CWUSB InternalsWired USB works on what it calls a Host/Device model. The Host is usually a PC and usually running some form operating system. The design philosophy behind USB was that the bulk of both hardware and software complexity resides in the host.

This model has been carried to CWUSB. Even though the WiMedia MAC and PHY were designed to support peer-to-peer transactions, CWUSB forces a master slave model on top of the WiMedia peer-to-peer structure.

CWUSB is one Protocol Abstraction Layer or PAL that runs on top of WiMedia. Under Microsoft’s Vista, CWUSB will run simultaneously with WiNet which is WiMedia’s PAL for running internet protocols. Multiple PALs can run simultaneously.

CWUSB uses WiMedia’s Distributed Reservation Protocol (DRP) to reserve sufficient bandwidth to handle traffic it intends to use, and it uses WiMedia addressing and encryption technology, but CWUSB runs its own protocols and enforces the Host/Device paradigm. The host is in charge, and devices do what they are told.

CWUSB relies on a microsecond accurate clock which enables the Micro-scheduled Management Command or MMC. MMCs are sent from the host to devices and are of the form “Do something at this time” where time is in terms of a microsecond accurate counter. This makes power management very easy for CWUSB devices as they know when they need to be awake and when they don’t have to listen. Since listening requires significant power resources for a WiMedia radio, not listening is a big power savings.

Through MMCs, the host sets up ‘transactions’. Transactions can group several transfers such as reads, writes and ACKs. More importantly the device knows a few microseconds or milliseconds in advance what the transaction is going to be so it can set up buffers, and it knows exactly when the transaction is scheduled to take place. Transactions group reads and writes together so as to minimize radio ‘turn around time’. This is the time it takes a radio to switch from receiving to transmitting.

Wired USB is a deterministic communications system. Devices negotiate with the host and know how big buffers will be and what bit rates are expected (how many buffers a second). For example a mouse might expect a maximum of eight bytes every 8 milliseconds while a hard disk can support maximum sized packets back to back. The MMC and transaction paradigm allow CWUSB to support these same timing characteristics over a wireless link with a minimum of over the air chatter.

While the overall philosophy of USB is complexity in the host and simplicity in the device, there are significant differences between a Device Wire Adapter (DWA) and a Native Certified Wireless USB device. The DWA must support any device it is plugged into, and in the case of a hub this can be several devices and downstream devices on top of that. This means performance may be limited by buffer space in the DWA, and control traffic between host and DWA constitutes overhead.

A Native Certified Wireless USB device allows for a more efficient implementation. The device knows exactly how many endpoints it supports and timing and throughput characteristics of the connection it expects to maintain with the host.

A cottage industry developed for implementation of wired USB devices. There are many consultants and ‘how to’ books on building wired USB devices. Most wired USB devices are based on variants of the Intel 8051 microprocessor. By today’s standards the processing power, buffer space and number of lines of code necessary to implement a wired USB device seems rather quaint.

CWUSB is a more complicated than wired USB. Staccato’s Ripcord SC350x provides ample horsepower in its embedded ARM processor and ample buffer memory. The Ripcord Control Library allows the embedded designer low level control and a structured environment such that embedded designers can customize their device to build an efficient native Certified Wireless USB device that can exploit the bandwidth, low latency and low power consumption that WiMedia radios are capable of supporting. Continued…

Use of this site is governed by our Terms of Use and Privacy Policy. Copyright 1996-2016 Ziff Davis, LLC.PCMag Digital Group All Rights Reserved. ExtremeTech is a registered trademark of Ziff Davis, LLC. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis, LLC. is prohibited.