What’s going to be the next big thing in wireless technology? My bet is software-defined radio, and thanks to a piece of hardware called the Universal Software Radio Peripheral, or USRP, you can get right to the bleeding edge today.
Currently, adding an audio, video, or data stream to a radio signal so it can be broadcast—a process known as modulation—is nearly always done by dedicated electronics. The same is true with the reverse process—demodulation—required to receive a transmission. Radio waves can be modulated in any number of ways, and each way requires different circuitry. This is why you can’t, say, use a TV designed for the U.S. NTSC broadcast standard and expect it to work in Europe, which uses mostly the PAL standard.
The idea behind software-defined radio is to do all that modulation and demodulation with software instead of with dedicated circuitry. The most obvious benefit is that instead of having to build extra circuitry to handle different types of radio signals, you can just load an appropriate program. One moment your computer could be an AM radio, the next a wireless data transceiver—and then perhaps a TV set. Or you could leverage the flexibility of software to do things that are difficult, if not impossible, with traditional radio setups. Want to broadcast an emergency message on every FM band? Scan a dozen walkie-talkie channels at once? Or design and test a new wireless data protocol? No problem with the software radio.
Researchers are currently using software radiobased systems to help them work on problems in realms that include radio astronomy, telecommunications, and medical imaging. Already a number of commercial products rely on software radio.
While software radio is still very much a work in progress, and general-purpose processors still lack the computing power to fulfill all the dreams of enthusiasts, you can get a taste of the future with the USRP. The hardware works in concert with free software developed by the GNU Radio project, an international collaboration of programmers who donate their time and skills.
The USRP acts as an RF front end for a computer running the GNU Radio software, converting radio waves picked up by an antenna into digital copies that the computer software can handle or, conversely, converting a wave synthesized by the computer into a radio transmission. I tested GNU Radio and the USRP together on both Linux and Mac OS X computers, but the GNU Radio software will also work with other RF front ends, and it can be used with prerecorded signal samples in the absence of any radio hardware. Likewise, the USRP can be used with proprietary software such as Matlab and LabView, or with home-brewed code.
The USRP is made by Ettus Research, in Mountain View, Calif., and costs US $550 for the basic motherboard. This square motherboard, 16 centimeters on a side, houses a field-programmable gate array (FPGA) to do heavy-duty signal processing, as well as the circuitry required for talking with a Mac or PC via a USB 2.0 connection.
The motherboard has four expansion ports—two for receiving radio signals and two for transmitting signals. Various daughterboards sold separately by Ettus Research are plugged into these ports; different daughterboards handle different frequency ranges, giving the USRP an overall potential range of 0 hertz to 2.9 gigahertz, which covers everything from AM radio, through FM and television, to beyond Wi-Fi.
Daughterboards sell for $75 to $275 each; a typical example would be the TVRX, which can receive signals in the 50- to 870-megahertz range and sells for $100. The USRP is not restricted to tuning in one frequency at a time, because it can handle signals as wide as 16 MHz. The architecture also supports MIMO—multiple input, multiple output of simultaneous radio signals—which is the underlying technical approach behind next-generation wireless data and cellphone standards.
The USRP is clearly a labor of love for Matt Ettus, the man behind Ettus Research, and the motherboard and daughterboards are an engineer’s delight. Plenty of interconnects for hardware hackers are provided, and detailed schematics, along with the Verilog code that configures the FPGA, can be downloaded from the Ettus Research Web site at http://www.ettus.com.
Ettus also sells a number of antennas and cables, and the company supplied me with a general-purpose antenna optimized for 900 MHz to 2.6 GHz. And maybe it’s just me, but make sure you add cables to your purchase: Most of the USRP daughterboards use SMA-F connectors for hooking up antennas, and it turned out to be surprisingly difficult to find a local retailer who could sell me a suitable cable [see ”The Back Story” in this issue].
Aside from the cable woes, setting up the hardware was easy. Unfortunately, the software side didn’t go as smoothly.
The GNU Radio software, in addition to its own code, relies on a lot of third-party software from other free and open-source projects. Getting all this additional software up and running is actually the trickiest part of setting up GNU Radio, and the difficulty was compounded by both a lack of reliable documentation and out-of-date software.
In the end it took many frustrating hours, lots of Googling, a phone call to Matt Ettus (who is also a contributor to the GNU Radio project), and several false starts to get my Linux-based system up and running properly.
The root of my problem was twofold. First, the official release of the GNU Radio software provided on the project’s Web site (http://www.gnu.org/software/gnuradio) was obsolete, as was the installation tutorial the site linked to—which led to my second problem. Following these instructions, I had tried to install all the supporting software by compiling it from source code: a long, difficult process that I never got to work quite right.
Finally, following tips from Ettus, along with parts of the available documentation that still seemed to make sense, I started over with a blank slate, using a fresh install of Linux Mandriva 2006 Free Edition as my operating system. My plan was to download the supporting infrastructure in the form of prebuilt binaries that didn’t have to be compiled, and then download and compile the latest version of the GNU Radio software directly from the developers’ own source code repository.
Two and a half fairly pain-free hours later, I had a local FM station blaring from my computer’s speakers. [For a step-by-step description of what worked for me, see ” Installing the USRP and GNU Radio”.] As a more advanced exercise to make sure everything was working, I downloaded and installed additional code for viewing analog TV signals; while I was able to get it to run pretty easily, I still couldn’t produce a watchable picture, because this feature is so new that no one’s yet written the code to de-interlace the raw TV transmission! (There is code available for watching HDTV digital transmissions, but because of the performance limits of current processors, the signal can’t be decoded in real time.)
Incidentally, I had first installed the USRP and GNU Radio system on my OS X system fairly easily, mainly thanks to a good installation guide (http://staff.washington.edu/jon/gr-osx/gr-osx.html). Unfortunately, I’d used the official release of the GNU Radio software, which did not include sound support for OS X at that time.
To be fair, problems with third-party code, rapidly evolving software, and documentation are endemic to free and open-source software projects. Still, there is no getting around the fact that installing GNU Radio is a particularly difficult process for those new to it. Ettus says the GNU Radio project hopes to establish a stable working official release before too long, and the project will soon replace, or at least remove, the dead-end software and documentation that’s on the home page.
Soul of the Machine
The Universal Software Radio Peripheral motherboard provides slots into which daughterboards, such as the one in the upper left corner, can be inserted. Different daughterboards handle various frequency ranges.
Once you have the software up and running, you’ll need to know that programs for GNU Radio are written using the C++ and Python languages. The conceptual approach is to treat the various parts of the system as modules that send information to one another, allowing programmers to concentrate on whatever piece they are interested in, while treating the other modules as black boxes.
Routing between modules is done with Python, so that a developer might write a Python program that uses an off-the-shelf ”source” module, which grabs a chunk of radio spectrum from the hardware, and a similar ”sink” module, which sends the output of the program to, say, a set of speakers or a radio transmitter. In between the source and sink modules the developer could put a custom signal-processing module, which itself would be written in C++ (signal processing is not done with Python for performance reasons). This gives developers the ability to assemble working systems rapidly. Plenty of sample programs are included with the software to give new developers a head start.
Ultimately, despite the installation headaches I encountered, it is clear that the USRP and GNU Radio have immense potential, and the full range of possible applications is not yet foreseeable. For those who have the technical chops and want a sneak preview of things to come, the USRP and GNU Radio deserve attention.