This page is user-contributed information, and not official documentation by the Osmocom project. It might be outdated or inaccurate.
Please help by improving this document, or reporting any issues to the relevant mailing list.

This page will describe how to install and configure OpenBSC, OsmoBTS, OsmoTRX, OsmoPCU and OpenGGSN to create an opensource 2G/GSM network with your Ettus USRP B200/B210 SDR hardware.

This page in under development, please stay tuned.


The following guide is created on Ubuntu 14.14.03 LTS 64bit with kernel 3.19.0-26-lowlatency

Installing the UHD driver stack for Ettus USRP SDRs:

Installing dependencies:

apt-get install libdbi0-dev libdbd-sqlite3 build-essential libtool autoconf automake git-core pkg-config libssl-dev libpcsclite-dev libusb-1.0 libncurses5-dev libgsm1-dev libpcap-dev libc-ares-dev libtalloc-dev libsctp-dev

Get Opencore AMR:

tar xvzf opencore-amr-0.1.3.tar.gz
cd opencore-amr-0.1.3
make install
cd ..


Note: 0.24.2 is not working with OpenBSC!

tar xvzf ortp-0.22.0.tar.gz
cd ortp-0.22.0
make install
cd ..

Please refer to Build from source to get, built and install source for the projects listed below.

  • libosmocore
  • libosmo-abis
  • libosmo-netif
  • openggsn
  • libosmo-sccp
  • openbsc after command autoreconf -fi enter @export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  • osmo-pcu
  • osmo-trx
  • osmo-bts

for osmo-bts use branch: 201509-fairwaves-rebase by issuing command bellow:

 git checkout 201509-fairwaves-rebase

./configure --enable-trx

Get mISDN kernel and user space:

Note: if you see "configure: error: kernel build tree does not exist" then you need to install kernel headers.

git clone git://
cd mISDN
cp mISDN.cfg.default standalone/mISDN.cfg
make modules
make modules_install
cd ..

git clone git://
cd mISDNuser
sudo make install
cd ..
depmod –a
modprobe mISDN_core
modprobe mISDN_dsp
modprobe mISDN_l1loop nchannel=30 interfaces=2

To auto-load the mISDN kernel modules do:

cd /etc/modules-load.d/
 cat > misdn-modules.conf
 mISDN_l1loop nchannel=30 interfaces=2

Hit Ctrl+C
chmod 644 misdn-modules.conf
cd /

Install Asterisk (ver 1.8 !):

On Ubuntu 14.04 there is no version 1.8 Asterisk anymore, to get it, do the following:

dpkg -i *.deb
apt-get -f install

Otherwise the Asterisk channel driver (chan_lcr) will not compile.

Get LCR (master):

git clone git://
cd lcr
autoreconf -fi
./configure --with-gsm-bs --with-misdn --with-asterisk
make install
cp /usr/lib/asterisk/modules/
cd ..

Configure the LCR interfaces:

cat > /usr/etc/lcr/interface.conf 
tones no
earlyb no
bridge ast

remote asterisk
context from-lcr
earlyb no
tones yes
bridge GSM

Hit Ctrl+C

Add the following two lines to the bottom of options.conf:

nano /usr/etc/lcr/options.conf

socketuser asterisk
socketgroup asterisk

Configuration of Asterisk:

You can find an attached configuration file called "extensions.conf". Please put that file and overwrite the original configuration at /etc/asterisk/exetensions.conf

Then restart asterisk:

sudo service asterisk restart

Configuring the GGSN:

Use the example configuration file called "ggsn.conf" and put it to /etc/ggsn.conf

The traffic from the UEs (mobiles, USB modems etc) are terminated on a TUN interface with the IP address:
The UEs are going to get an address from this range: -
The GGSN will listen on In this example all the services (BSC, GGSN, SGSN, PCU etc.) are running on the same computer.

Configuring OpenBSC, OsmoSGSN, OsmoPCU

Please use the attached examle config files at the bottom fo this page.

Starting the services

Please note that in this example we are going to need quite a few terminals to be open, because except for LCR, GGSN and Asterisk, we are going to run the services in foreground.

Start the GGSN:


Start LCR:

lcr fork

Open a new terminal and start the SGSN (with the sample config file provided):

sudo osmo-sgsn -c sgsn.conf

Open a new terminal and start the BSC (with the sample config file provided):

sudo osmo-nitb -C -c openbsc.conf -T -P -m

Open a new terminal and start Osmo-TRX:

sudo osmo-trx

Open a new terminal and start Osmo-BTS (with the sample config file provided):

sudo osmobts-trx -c osmo-bts.cfg

Open a new terminal and start Osmo-PCU (with the sample config file provided):

sudo osmo-pcu -c osmo-pcu.cfg

Setting up NAT for GPRS:

In order for the UEs to be able to "see" the internet, we need to enable network address translation (NAT).

First determine which network interface is connected to the internet with:


After you know the interface name (for example: eth0 or eth1 or em1 etc.), run the following commands.

Note that in the second command you need to use your interface name instead of "em1".

sudo echo 1 > /proc/sys/net/ipv4/ip_forward
sudo iptables -A POSTROUTING -s -t nat -o em1 -j MASQUERADE

ggsn.conf Magnifier - GGSN config file, put it to /etc/ggsn.conf (529 Bytes) csaba, 09/23/2015 04:07 PM

extensions.conf Magnifier - Asterisk config file, put it to /etc/asterisk/extensions.conf (1.5 KB) csaba, 09/23/2015 04:08 PM

osmo-bts.cfg - Example Osmo-BTS config file (1.38 KB) csaba, 09/23/2015 04:08 PM

osmo-pcu.cfg - Example Osmo-PCU config file (1.04 KB) csaba, 09/23/2015 04:09 PM

sgsn.conf Magnifier - Example Osmo-SGSN config file (1.12 KB) csaba, 09/23/2015 04:09 PM

openbsc.conf Magnifier - Example OpenBSC config file (3.98 KB) csaba, 09/23/2015 04:09 PM