Telephones are cool. Yes, smartphones are cool, too, but I’m talking about plain old two-wire, curly corded telephones. The ability to transmit your voice between any two points on Earth is an amazing human accomplishment.
Perhaps even more amazing is how quickly this accomplishment has been taken for granted. Monumental efforts were undertaken over the past 100 years to build the public switched telephone network. Webs of copper were hung and buried. Long distance lines between cities and then towns were laid. Humans manually routed and connected calls, then analog machines and finally digital computers did that automatically. Along the way, mobile networks were invented and deployed. The same infrastructure story took place as technologies advanced: equipment was upgraded, mobile phones repeatedly replaced.
Now, with both wired and wireless telephony networks delivering voice service solidly for decades, the next upgrade cycle is under way for data bandwidth: fiber optic to your home and LTE to your smartphone.
OpenBTS bridges these two worlds. By converting between the wireless radio interface and open IP protocols, it allows anyone with IP connectivity to deploy a mobile network.
Many places on Earth still do not have home telephone lines or mobile network reception. But, more often than not, they do have an Internet connection via satellite or long-haul WiFi. Properly integrated, OpenBTS can convert and distribute this Internet connection as a mobile network across a large geographic region. Any GSM phone can connect and use voice services or SMS, even basic data. Connectivity can be brought to remote regions while skipping the entire cycle of infrastructure build-out and upgrades.
The combination of OpenBTS and software defined radios changes the way we should think about mobile networks. This new technology allows the construction of complex radio networks purely in software. OpenBTS is a C++ application that implements the GSM stack. As new features are implemented or protocol support added, an existing OpenBTS mobile network’s capabilities can be enhanced via a simple software update!
Also, because OpenBTS is just software, you can make it do whatever you’d like. You no longer need a hardware vendor’s permission to access its closed black box implementations. You can build a niche product or experimental feature; the mobile network is finally open for innovation.
Telecom engineers—wired or wireless, circuit-switched, or packet-switched—should be able to latch onto this introduction to the OpenBTS project. At the risk of spreading the material too thin, care has been taken to explain both the radio and IP sides of OpenBTS. If you are a radio frequency (RF) expert, you will learn something about Internet telephony. If you are comfortable with SIP and RTP, you will pick up a thing or two about radio systems and protocols.
Software engineers of baseband firmware, smartphone apps, or hosted services will learn about how the mobile network itself can now be controlled and inspected at a very low level. If you’re interested in debugging an application on a mobile device, OpenBTS provides several raw interfaces to see exactly what’s going on over the air. There are also new data APIs your software can consume to build applications for search-and-rescue, emergency response, power optimization, roadway traffic analytics, etc.
My background is mainly in VoIP. When I began working with OpenBTS, I was blissfully unaware of how complex radio systems can be. Conversely, other people I was working with were radio experts but had never touched VoIP. Documentation for the OpenBTS project is plentiful but very broad to support this wide audience of interested parties; it needed simplification.
We wanted a new book that would be able to give a complete newcomer to the technology enough information to successfully set up their own network: get voice calls working, exchange some SMS messages, etc. This initial success should then build confidence and let that person set out on their own.
I’ve tried to mix a healthy amount of context into the step-by-step sections. Mobile networks are still quite complex on the GSM and RF side. Every hint helps. I’m hoping you will be able to avoid the large gotchas when setting yours up!
I also wanted the book to be interesting enough to read in the absence of hardware. This book should give you enough information to scope the required resources before diving into an OpenBTS-related project.
As Marc Andreessen famously stated, “Software is eating the world.” This is definitely true in the mobile industry. As processing power gets faster and cheaper, it is now viable to implement extremely complex signal processing algorithms in software. This software is also able to run on increasingly generic hardware. The days of vendor lock-in due to specialized hardware and protocols are numbered and a chance for some real competition and innovation in mobile infrastructure seems to be getting closer.
A few years ago, a “build-your-own-mobile-network” book would have been a tome for a very different audience. The words “compile” and “customize” may not even have made an appearance. The architecture for such a network is illustrated in Figure I-1.
This network architecture is an incredible piece of engineering that many people examined over many years. It is very robust and scalable, though unfortunately, quite inflexible and very expensive.
There is a growing focus on this problem at universities, most notably UC Berkeley’s Technology and Infrastructure for Emerging Regions (TIER) group and Carnegie Mellon University’s CyLab Mobility Research Center in Silicon Valley, which recently published a paper on the limitations of this traditional mobile architecture, including evolutionary baggage from the traditional wired network.
Multiple open source projects have sprung up to address this. To name a few: Osmocom, OpenLTE, and YateBTS. Each project has different goals and architectures, tackling the pain points of traditional networks in its own way.
This book, however, is about the veteran of the group, OpenBTS. The OpenBTS project is a collection of open source software components that can be used to build a more modern, lightweight network. OpenBTS allows the “Um” radio interface of the traditional mobile network to directly interconnect with Internet telephony protocols. This new “hybrid” architecture is illustrated in Figure I-2.
Software or configuration changes on the handset are unnecessary, as the radio interface to the mobile network is identical to a traditional network. The network core, however, is no longer comprised of an array of complex protocols and servers. It consists of open protocols and uses IP as its transport. Many software projects already exist that implement these open protocols. Some new components were also developed alongside OpenBTS to provide functionality, which was still unavailable, to bridge the GSM and Internet worlds.
With so much excitement around “the cloud” and so much excitement around “apps,” it seems that finally the conduit between these two is beginning to bloom.
By the end of this book, you will have built a fully functional mobile network. It will appear as any other network does on your handset and route calls and SMS among the participants in the network, as well as provide data connectivity between handsets and the Internet.
The following typographical conventions are used in this book:
Constant width bold
Constant width italic
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.
Please address comments and questions concerning this book to the publisher:
|O’Reilly Media, Inc.|
|1005 Gravenstein Highway North|
|Sebastopol, CA 95472|
|800-998-9938 (in the United States or Canada)|
|707-829-0515 (international or local)|
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://oreil.ly/1yPbnN2.
To comment or ask technical questions about this book, send email to email@example.com.
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Harvind Samra and David Burgess brought OpenBTS to life. This book would not have been possible without them. A special thanks to David for inviting me to join Range. I haven’t stopped learning since!
Thanks to the community who never fails to surprise me with possible applications for OpenBTS, and to Rangers past and present who’ve humored my questions: Tom, Pat, John, Donald, Faith, and Doug.
My editor, Brian MacDonald, was very kind to this first-time author and provided great direction. Technical reviews from Kurtis Heimerl, Ralph Schmid, and Neel Pandeya kept the material honest. Thanks to everyone involved in that process, especially to John Callon for deflecting bureaucracy.
Manuel Kasper was the first one to introduce me to VoIP during the Free World Dialup days. Without that push, I would have never have dove in so deep to Internet telephony. Congrats to the entire Askozia team for building such a fine company from that project and to Diederich Wermser for believing in the concept from day one.
On a more personal note: I would never have been able to study abroad nor finish my CS degree without Tom Halverson of Dakota State University and Peter Riegler of the Fachhochschule Braunschweig Wolfenbüttel. Both went above and beyond their duties to make the exchange happen, which allowed me to start my IMS research. Thanks also to the Madison and Wolfenbüttel release celebration teams: Berger, Bobby, Dan, Jon, Jorj, Levi, Mitch, Phil, Seth, Steve, Dege, Markus, Milo, Raiko, Sid, and Löloff.
And finally to my family: Big G, Little M, Ry, and Norus. Let’s never stop making each other laugh.