The democratization of radio

This article brought to you by LWN subscribers Subscribers to LWN.net made this article — and everything that surrounds it — possible. If you appreciate our content, please buy a subscription and make the next set of articles possible.

David Rowe started off his linux.conf.au 2015 talk by saying that he is excited about what is happening to radio. The era of proprietary control is fading away, and, at this point, the free-software community owns the whole stack — or something close to it. If we can overcome a few remaining obstacles, we will have succeeded in taking control of a crucial communications technology.

There are several components in a typical radio-based system, starting with the antenna where signals are transmitted and received. From the antenna, a received signal goes through a filter module to cut it down to the frequency range, and an amplifier to make that signal accessible. There is an oscillator/mixer step to convert a signal to a more useful frequency range. After that, it goes into a modem to convert analog signals to digital, some sort of forward error-correction module, a codec, then finally to protocol-handling code and the final application. For transmission, of course, that sequence of steps is reversed.

Once upon a time, every one of those steps was implemented by a separate hardware module. Over time, software has been able to take over more of them. David's question is: how much closer to the antenna can we push open software? In the Open Radio miniconf held earlier in the week, developers still had to build a hardware-based module for the filter and oscillator steps to use with their software-based systems. David would like to reach a point where the only hardware in the system is the antenna itself.

Case studies

Why do software-based radio systems make sense? David had a few case studies of projects he had worked on showing where the advantages lie; the first of them being the Mesh Potato project, which has produced a voice-over-IP (VOIP) router based on a mesh network. This project, which started in 2008, was meant to enable the creation of telephony networks in remote villages; they were trying to help people, not to get rich. In the process, they ran into trouble with the AR2317 chipset used in the router; it was a closed device with proprietary drivers and it was impossible to get information about it. In the absence of support from the vendor, they ran into no end of "pain, frustration, and delay" in the project. In contrast, the more complex parts of the system (the kernel, the Asterisk telephony system, and Speex) "just worked."

To summarize, the parts of the project that worked well were those based on open-source software. The closed radio hardware, instead, was an impediment. David also noted that "WiFi sucks for VOIP" — a point he came back to later on.

The next case study had to do with echo cancellation — keeping a voice signal from echoing back to the speaking party. It was, he said, a big problem for Asterisk. Telephony developers who knew this area said that the only solution was to put a digital signal processor (DSP) into the system; it had to be a hardware-based solution, and, by the way, there were a lot of patents to deal with in that area.

But, David said, open-source software gave them an edge. The ability to get widespread, crowdsourced testing for echo-cancellation software allowed the quick discovery and fixing of strange corner cases. It also eliminated the need for formal speech testing. The self-instrumentation built into the code allowed users to dump out its state when things went wrong. In short, David said, the echo-cancellation project was successful and open-source software delivered a superior solution. It worked quickly, and with relatively little effort.

Finally, David mentioned the FreeDV project, which is concerned with digital voice service over high-frequency (HF) radio. HF, he said, is the last bastion of analog radio technology; this frequency range is lossy in ways that degrade modem signals in particular. It is a difficult technical problem to solve. Until recently, the only way to approach it was with proprietary, hardware-based modems and codecs; there was no way to develop components that cross between the layers of the system.

Except that, with software, you can mix the layers. So David designed an HF modem to suit the codec that would be used, and the codec was designed specifically for the HF channel. He was able to mix in some analog techniques like boosting the power for the more important parts of a speech signal. That's something that can't be done with proprietary solutions, and it led to a better solution overall.

From hardware to software

In general, realtime speech compression has gone through an evolution over the years. In the 1940s, it was handled with vacuum-tube-based hardware. By the 1970s, the industry had moved to custom hardware at the chip level. The 1980s saw the first programmable DSP chips; by the 1990s it was possible to do realtime compression on an x86 processor. In the 2010s, it can be done with a fraction of a $2 microcontroller. This same evolution has applied to the other components of a digital radio system.

That evolution points to the way forward: over time, hardware-based functionality always moves to software. And that's a good thing: software can be free, and, thus, radio communications can be free. Indeed, he said, they must be free.

There are a lot of interesting new chipsets out there, providing radio-frequency modems, up/down converters, and so on. But David doesn't normally get all that excited about chips, since hardware vendors control them. So they will always have bugs that can't be fixed and end-of-life issues. They cannot be modified, and, often, one must sign non-disclosure agreements to work with them at all. There can also be security issues with proprietary, hardware-based solutions.

The better approach is to use a general-purpose CPU and to design the system to minimize the amount of hardware needed. We should not rely on black boxes and binary blobs, he said. If we work with open software we'll benefit from better development, better security, and better performance.

Spectrum and standards

As radio moves into software, there are going to be some interesting issues around spectrum use. Radio spectrum is a scarce resource; it is heavily regulated by governments and mostly reserved. A recent study showed that, of all the allocated spectrum, only about 15% of it is actually used. That creates a temptation for unlicensed uses, something that will get harder to police as the costs of using that spectrum go down. The HF range is already difficult to use in many areas due to the amount of urban noise. On the other hand, many interesting things have happened in the unregulated parts of the spectrum, with WiFi being the classic example.

Another would be the AirJaldi project, which provides free Internet service for over 30,000 people. It is, he said, a poster child demonstrating what can be done when spectrum is free.

Then there is the issue of pirating — the illegal use of spectrum which, most of the time, is unused anyway. The cost of using spectrum will approach zero over time; the legal model around spectrum, David said, is fracturing. The situation is much like that with illegal movie downloading. There are some ethical questions to be addressed; is "pirating" spectrum really wrong if that use is not bothering anybody? And can it be stopped even if we as a society want to stop it?

Consider the AirChat project, which enables the creation of inexpensive communication devices using unlicensed spectrum. There's voice communications, a computer-based modem, texting, chatting, email, and more. Can a project like this be stopped? And, again, do we want to stop it?

Then there is the issue of standards, which often get in the way. As mentioned before, VOIP over WiFi is highly inefficient. By using the right protocols, a thousand-times improvement in efficiency can be obtained. With software-defined radio, it is possible to send a non-802.11 signal in the WiFi bands, so why not do it? Standards, he said, should not be confused with the laws of physics. They are often not the best solution to the problem and, in many cases, they may just exist to support somebody's patent pool. The limitations on what we can do with radio come from physics, he said, not from big business.

The open-source-software culture is poised to make big changes in the radio world. We like to work in small teams, and we are not content with being told what we may or may not do. We have motives like helping people or simply having fun. A lot of interesting things are going to happen with open-software radios in the coming year. We'll have communications that are portable, free, secure ("as in Snowden"), hackable, and accessible. We are heading toward fully software-defined radios, and that is a good thing; when hackers get control, wonderful things happen.

[Your editor would like to thank linux.conf.au for funding his travel to the event.]

