Getting Started with OpenBTS: Build Open Source Mobile Networks

Views: 444
Ratings: (0)

Deploy your own private mobile network with OpenBTS, the open source software project that converts between the GSM and UMTS wireless radio interface and open IP protocols. With this hands-on, step-by-step guide, you’ll learn how to use OpenBTS to construct simple, flexible, and inexpensive mobile networks with software.

OpenBTS can distribute any internet connection as a mobile network across a large geographic region, and provide connectivity to remote devices in the Internet of Things. Ideal for telecom and software engineers new to this technology, this book helps you build a basic OpenBTS network with voice and SMS services and data capabilities. From there, you can create your own niche product or experimental feature.

  • Select hardware, and set up a base operating system for your project
  • Configure, troubleshoot, and use performance-tuning techniques
  • Expand to a true multinode mobile network complete with Mobility and Handover
  • Add general packet radio service (GPRS) data connectivity, ideal for IoT devices
  • Build applications on top of the OpenBTS NodeManager control and event APIs

List price: $16.99

Your Price: $13.59

You Save: 20%

 

11 Slices

Format Buy Remix

1. Getting Set Up

ePub

In this chapter, we will guide you through the selection of hardware, installation of a base operating system, and development environment setup, as well as actually compiling and installing the components that compose the OpenBTS software suite. Several shortcuts can be taken along the way—for example, if you would prefer to use the official binary packages instead of compiling your own—but the entire process is detailed for those wishing to build from scratch.

Although OpenBTS implements most of the complexity involved in building a mobile network in software, radio waves must still be transmitted and received somehow. This section details which hardware components you should procure to implement this capability in a development setting. The configuration of these components is covered in Chapter 2.

The first requirement is a standard commodity Linux server. Other architectures are beginning to be supported, but stick to an x86 processor running a 32-bit operating system for the best results for now. This computer can be a separate machine in your test environment or it can actually be a virtual machine on the laptop or desktop you use daily.

 

2. Initial Testing and Configuration

ePub

The software and hardware should now be in place. This chapter will guide you through some initial sanity checks, functional testing, and basic configuration customization. By the end of this chapter, you will have successfully exchanged the first SMS messages and voice calls among phones over your private mobile network!

Some of the manual steps that follow will conflict and fail if other instances of the services are already running. To make sure that nothing else is running on this system, execute the following:

Now you can proceed to confirm connectivity at each step in the chain before running the first basic tests.

The first thing you should verify is that the transceiver application can communicate with the radio hardware. Different vendors have different methods for accomplishing this.

All Ettus hardware uses the Transceiver52M binary, which was installed in /OpenBTS in the last chapter. Run it as follows to see if the hardware device is detected:

 

3. Troubleshooting and Performance Tuning

ePub

As your network becomes ever more production-ready, you will need some additional techniques to help debug problems as they arise. While some errors are directly related to misconfiguration, others are less obvious. Depending on the deployment conditions and network usage patterns, problems with the network may actually be related to poor performance. Optimizing the network’s performance for your particular scenario can be key. Because of this, troubleshooting and tuning are presented together.

A quick and easy way to observe when events occur in OpenBTS is by using the stats command. There are several dozen event types that are tracked. To get a full list of them, run the stats command with no arguments:

Each event type is simply a key name in a small SQLite3 database and the value for each key corresponds to the number of times this event has happened since the last time the stats database was cleared. Clearing the database is handy to give yourself a known starting count for the events you are interested in. To clear the database, execute the following:

 

4. From Single to Multinode

ePub

A mobile network with a single tower is infinitely more useful than one with zero towers. However, there comes a point where no matter how well that single tower is tuned, it cannot effectively cover a given area.

Because OpenBTS uses the same software stack to implement large and small coverage areas and has even been made to run on a Raspberry Pi, try to free your mind of the classic “cell tower” image. A tower could easily fit in a shoebox or blend in with your WiFi access point.

This chapter describes how to expand your network to multiple physical sites but still maintain a single logical network. This logical network will support Mobility and Handover as any commercial network would.

There is some confusion among these terms. While they do mean very specific things, even experts in the field will throw them around in discussion and expect the other party to understand the correct meaning from the context. To clear up this ambiguity each term will be outlined briefly.

 

5. GPRS

ePub

Mobile networks have, in many areas of the world, been reduced to being data networks. Over-the-top (OTT) services like WhatsApp and Skype only need a data pipe and participants can connect regardless of carrier. Fees between the participants are also not dependent upon geographic location, unlike local versus long-distance charges.

GPRS is much too slow to support bidirectional streaming video but can suffice for a low-quality voice call. Its speeds are ideal for email and OTT text messaging.

The world of sensors and infrastructure such as heat and flow sensors or electrical and parking meters also needs data connectivity. These low-bandwidth machine-to-machine (M2M) devices, now referred to as Internet of Things (IoT) devices, are a very common use for GPRS.

GPRS is actually not a part of GSM. It was developed after GSM had been standardized and is usually referred to as 2.5G, whereas plain GSM is 2G. OpenBTS abstracts these differences and presents a unified configuration where possible.

 

6. OpenRegistration

ePub

OpenRegistration is an OpenBTS-specific feature that provides a WiFi captive portal-like implementation for mobile networks. Captive portals are familiar to anyone who has used an airport or hotel’s public WiFi connection. Your device can connect to the WiFi network but is denied access to certain features until you answer a question, watch an advertisement, enter a pin, etc. The device is used to provision itself.

Similarly, OpenRegistration allows a handset to join a mobile network with initially restricted access. It may be able to dial out but the handset does not have an assigned number and as such cannot be called by other participants in the network. However, it can be used to provision its own number via SMS.

This type of network is very useful in any ad hoc installation where the users are temporary and fluid or the network itself is only temporarily needed: emergency response, remote work areas, tourist destinations, large festivals, etc. Because an administrator is not needed to create accounts and assign numbers, OpenRegistration networks are easier to deploy and still very useful for the users.

 

7. NodeManager APIs

ePub

NodeManager is a common control interface across OpenBTS, SMQueue, and SIPAuthServe used for system configuration and monitoring. All components support some common functionality (such as configuration manipulation) with specialized APIs available for component-specific tasks or data sources. The NodeManager APIs are divided into two main categories: request/response and streaming. Both types use JSON formatted messages and communicate over ZeroMQ, a library that creates simple and robust socket connections between processes. NodeManager APIs were implemented to simplify the remote management of multiple OpenBTS instances, as well as Central Services like SMQueue and SIPAuthServe.

APIs are such a normal part of the Internet that this might not seem too exciting. However, keep Figure I-1 in mind when reading through PhysicalStatus API. No need for a dozen protocols and entities—the core radio measurement data is now available directly as a stream of JSON messages! Additional APIs will be added to the NodeManager interface in future releases.

 

8. Onward and Upward

ePub

Hopefully you’ve completed the book having succeeded at implementing the areas you were interested in. Here are a few jumping-off points for further research and experimentation.

To connect your handsets with “real” phones in the outside world, you will need an Internet Telephony Service Provider (ITSP). ITSPs accept the SIP signaling and RTP media coming from your network and bridge them to the PSTN.

Finding ITSPs for voice service is straightforward. There are already online directories for these companies and a variety of plans are offered from prepaid minutes to flat monthly rates. Inbound phone numbers, or Direct Inward Dials (DIDs), are also offered in the majority of countries around the world. Many of these companies also supply instructions for how to connect to them when using Asterisk and can provide technical assistance for your installation.

SMS is more difficult. There are not very many ITSPs offering SIP MESSAGE to SMS service. Providers that do offer this service do not usually pair it with a voice DID so a single handset will have a different caller ID when making voice calls than when it sends SMS messages. This situation is improving but for now alternatives are needed.

 

A. Quick Reference

ePub

Here’s a quick reference for many facts scattered throughout the book. I find myself looking these things up constantly and wanted to present them in a unified section.

This book cannot attempt to teach you GSM in a few short chapters. However, a very helpful thing to have a grasp on is a hierarchy of GSM jargon from macro to micro.

A tower is the mast with antennas that we’re all familiar with, sometimes disguised as a cactus or tree. Each tower can be divided into multiple sectors. These sectors cover a portion of the possible 360º (e.g., four 90º sectors on a tower). A single sector tower covers all 360º. Each sector will be assigned one or more ARFCNs, sometimes also called carriers, because they are the actual pair of frequencies where data is physically exchanged.

Each ARFCN has eight time slots. Each time slot has a combination assigned to it. Each combination is composed of multiple logical channels. These logical channels are divided into two main categories of signaling and media. SDCCHs (standalone dedicated control channels) carry signaling such as handset registration traffic or SMS traffic. TCHs (traffic channels) carry media such as GPRS data or voice traffic. Logical channels are made up of multiple frames and frames are made up of bursts.

 

B. Operating System Installation

ePub

On either a fresh computer or in a virtual machine, follow these steps to produce a compatible minimal OS installation. If you already have a compatible operating system installed, feel free to skip to Git Compatibility.

When using a virtual machine, at least two cores must be assigned to the instance.

The Ubuntu 12.04 LTS installation image (an .iso file) is available from this page. In the “Server install CD” section, download the file linked from “PC (Intel ×86) server install CD.” This is the 32-bit server installer.

Ubuntu Desktop will also work equally as well as Ubuntu Server, but the Server edition has a smaller install footprint.

Once the image has been downloaded, it can be burnt onto a physical disk for installation on standalone server hardware. If you are using a virtual machine, simply select this .iso image file when prompted for boot media.

If you are using VMware software, uncheck the “Use Easy Install” option.

Once the physical server has this fresh disk in its CD tray, power it on. Similarly, the new virtual machine can now be started.

 

C. Capturing Traffic

ePub

Two sources can be used to capture activity on an OpenBTS installation. The IP side of the network can be recorded for debugging or analysis, as can the raw GSM and GPRS radio frames. Unified into a single stream, it provides a very powerful research tool for baseband developers, application authors, and network engineers.

The first source is the raw IP packets being sent between the individual components of OpenBTS. In addition to VoIP signaling and media streams, there are a multitude of other ports exchanging data. A list of these ports, their settings, and their types can be found in Table A-3.

To capture data from these ports, a small utility named tcpdump is needed. It can listen to any network interface on your system and display and/or record the traffic to a file. Install it now:

The exact usage of tcpdump is outside of the scope of this book so only a few examples will be presented. To learn more about it, use the man (manual) command:

 

Details

Print Book
E-Books
Slices

Format name
ePub (DRM)
Encrypted
true
Sku
9781491924297
Isbn
9781491924297
File size
0 Bytes
Printing
Disabled
Copying
Disabled
Read aloud
No
Format name
ePub
Encrypted
No
Printing
Allowed
Copying
Allowed
Read aloud
Allowed
Sku
In metadata
Isbn
In metadata
File size
In metadata