How to get 3G working on the UmTRX

Introduction

Recently, our engineers made a patch for OpenBTS-UMTS that allows to launch UMTS-3G network on UmTRX hardware. In this article you will find all the details. Scroll down to see video how it works!

OpenBTS-UMTS (http://openbts.org/w/index.php?title=OpenBTS-UMTS) is a Linux-based application that uses a software radio to present a UMTS network to any standard 3G UMTS handset or modem. It builds upon the OpenBTS framework, where the Mobile Station (MS) or User Equipment (UE) is treated as an IP endpoint at the edge of the network.

3GPP UMTS, the Universal Mobile Telecommunications System is the third generation (3G) successor to the second generation GSM based cellular technologies such as GPRS and EDGE. UMTS uses a totally different air interface, but the core network elements have been migrating towards the UMTS requirements with the introduction of GPRS and EDGE.

UMTS based upon Wideband Code Division Multiple Access (WCDMA / W-CDMA) to carry the radio transmissions. It employs a 5 MHz channel bandwidth. Using this bandwidth it has the capacity to carry over 100 simultaneous voice calls, or it is able to carry data at speeds up to 2 Mbps in its original format. Code divison multiple access enables multiple handsets or user equipments to have access to the base station. Using a scheme named direct sequence spread spectrum, different UEs have different codes and can simultaneously talk to the base station even though they are using the same frequency.

umts

The UMTS network architecture consists of three main elements: User Equipment, Radio Network Subsystem (RNS) and Core Network. The User Equipment is the name given to what was previous named the Mobile Station. The new name emphasizes it could be anything between a mobile phone used for talking to a data terminal attached to a computer with no voice capability. The RNS also known as the UMTS Radio Access Network is the equivalent of the Base Station Subsystem in GSM. It provides and manages the air interface for the overall network. The Core Network provides all the central processing and management for the system. It is the equivalent of the GSM Network Switching Subsystem.

UMTS radio access network comprises two main components: Radio Network Controller (RNC) undertakes the radio resource management, encryption, connection initialization. Node B is a UMTS base station transceiver. This part of the RNS contains the transceiver to communicate with the UEs within the cell. It participates with the RNC in the resource management.

In UMTS MSC (GSM Mobile Switching Center) functions were divided between two elements: MSC-Server and MGW (Media gateway). MSC-Server is responsible for connection establishment, signalling, authentification and Interworking. All subscriber’s traffic is switched in MGW under control of MSC-Server.

Radio aspects of 3G, including UMTS may be found in 25 series of 3GPP standards (http://www.3gpp.org/DynaReport/25-series.htm).

OpenBTS-UMTS and UmTRX software installation

On the video you may find the demonstration of how 3G-UMTS works on UmTRX.

Please note, that unlike GSM, you can’t have open registration and thus you can’t just use any random SIM card – you need a programmable SIM-card.

As we have an idea about UMTS, it’s time to install the necessary dependencies, which required to run OpenBTS-UMTS software. The installation was tested on Ubuntu 14.04 and assumes that user already has installed UHD and UmTRX module. The details of the UHD and UmTRX installation may be found there: http://umtrx.org/hardware/driver/.

$ sudo apt-get install libreadline6 libreadline6-dev libosip2-dev

The GNU readline library aids in the consistency of user interface across discrete programs that need to provide a command line interface. Libosip2 header files and static libraries are used to assist in development of programs wishing to use SIP.

We also need ASN.1 C compiler that turns the formal ASN.1 specifications into the C code.

$ git clone https://github.com/vlm/asn1c.git
$ cd asn1c
$ git checkout 80b3752c8093251a1ef924097e9894404af2d304
$ ./configure
$ make
$ sudo make install

OpenBTS uses the coredumper shared library to produce meaningful debugging information if OpenBTS crashes:

$ git clone https://github.com/RangeNetworks/libcoredumper.git
$ cd libcoredumper
$ sudo ./build.sh
$sudo dpkg -i libcoredumper1_1.2.1-1_amd64.deb libcoredumper-dev_1.2.1-1_amd64.deb

We are ready to install OpenBTS-UMTS itself.

$ git clone -b fairwaves/umtrx https://github.com/fairwaves/OpenBTS-UMTS
$ cd OpenBTS-UMTS
$ git submodule init
$ git submodule update
$ sudo NodeManager/install_libzmq.sh
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

To setup OpenBTS-UMTS, we may need to modify the settings such as ARFCN, DNS, Firewall. Navigate to ~/OpenBTS-UMTS/apps folder and open OpenBTS-UMTS.example.sql file with the preferable text editor. You may need to edit following options:

  • ‘GGSN.DNS’ set to ‘8.8.8.8’ to enable Google DNS.
  • ‘GGSN.Firewall.Enable’ set to ‘0’ to disable Firewall.
  • ‘UMTS.Radio.Band’ – set the band you are going to use. Select from 850, 900, 1700, 1800, 1900 or 2100.
  • ‘UMTS.Radio.C0’ – set the UARFCN. Range of valid values depend upon the selected operating band. Please, ensure that you are using free operating band.

Now, we need to create folders and working database:

$ sudo mkdir /var/log/OpenBTS-UMTS
$ cd /etc/OpenBTS
$ sudo sqlite3 /etc/OpenBTS/OpenBTS-UMTS.db “.read OpenBTS-UMTS.example.sql”
$ sudo cp TransceiverUHD/transceiver ~/OpenBTS-UMTS/
$ sudo cp TransceiverUHD/transceiver apps

We also need to setup forwarding in iptables to properly forward data between devices, host machine, and the Internet:

$ sudo su
$ iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ exit

If you have Internet connection through the another interface (for example, Wi-Fi), you need to change eth0 to the applicable one (i.e., wlan0). Please note, that you need to setup forwarding in iptables every time after you computer rebooted.

It’s important to install Subscriber Registry API and SIP Authentication Server to be able to launch OpenBTS-UMTS. Subscriber Registry controls database of subscriber information and in fact works as HLR (Home Location Registry):

$ git clone https://github.com/RangeNetworks/subscriberRegistry.git
$ cd subscriberRegistry
$ git submodule init
$ git submodule update
$ sudo NodeManager/install_libzmq.sh
$ autoreconf -i
$ ./configure
$ make
$ sudo make install
$ sudo mkdir /var/lib/asterisk/
$ sudo mkdir /var/lib/asterisk/sqlite3dir/
$ sudo cp apps/comp128 ~/OpenBTS-UMTS/
$ sudo cp apps/comp128 ~/OpenBTS-UMTS/apps/
$ sudo cp apps/comp128 /OpenBTS

Let’s run OpenBTS-UMTS and Subscriber Registry:

$ cd OpenBTS-UMTS/apps
$ sudo ./OpenBTS-UMTS
$ cd subscriberRegistry/apps
$ sudo ./sipauthserve

To add the subscriber to the registry, you need to know IMSI and K_i value of your programmable SIM card. There are two common ways to get the values. The only way to use SIMs from another provider is to obtain the K_i through a roaming interface to the provider’s HLR/HSS. The second way is to buy test SIM-card and flash it using the programmer and pysim utility (http://cgit.osmocom.org/pysim/). Navigate to ~/subscriberRegistry/NodeManager/ and execute:

$ sudo ./nmcli.py sipauthserve subscribers create “name” imsi msisdn ki

Values imsi, msisdn and ki should be taken from your SIM-card.

Now, connect your phone to the network and test 3G. That’s it!

For those, who are eager to run UMTS on his own table as soon as possible, here is the Contact Form.