These instructions are for setting up and running OpenBTS with Nuand’s BladeRF x40 Board , These are a work in progress and should be taken as is. This was possible with the help of @mambrus on #bladerf and @rwr on #bladerf.[1] and is a collection of different how-tos linked at the end of the post.

OS Used : Ubuntu 12.04 LTS Server 32 bit , The ISO can be downloaded from here

1. Download & Install Ubuntu 12.04 32 Bit , Do a minimalistic install with OpenSSH server.
2. Update git

$ sudo apt-get install software-properties-common python-software-properties
$ sudo add-apt-repository ppa:git-core/ppa (press enter to continue)
$ sudo apt-get update
$ sudo apt-get install git

Pre-Reqs Installation

Once this is setup , its time to setup the pre-requisites

Copy and Paste this , and run it – it will install the dependencies:

sudo apt-get install $(
    wget -qO - https://raw.githubusercontent.com/RangeNetworks/dev/master/build.sh | \
    grep installIfMissing | \
    grep -v "{" | \
    cut -f2 -d" ")

Another way to install the dependencies is to look for IFMissing in the above file and install them via apt-get or you can build from source.

Two of the packages would fail (libzmq3 & libzmq3-devel) – They can be installed on Ubuntu with the following commands

$ sudo add-apt-repository ppa:chris-lea/zeromq
$ sudo apt-get update
$ sudo apt-get install libzmq3-dbg libzmq3-dev 

The next step is to build uhd , that be done by compiling GNURadio from source , running the command below will do that , and is going to a take a LOT of time , depending on your computer. [ http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Linux <= You can following this link as well for UHD] [bash] $ wget http://www.sbrac.org/files/build-gnuradio && chmod a+x ./build-gnuradio && ./build-gnuradio [/bash] Once that is done , you'll get either a success or a failure message , you can use the -v option to do a verbose install again to find out and fix the issue. Next step is to install some more dependencies for OpenBTS , they are the following 1. libgsm1-dev 2. asterisk-dev 3. asterisk-config On ubuntu , this can be done by [bash] $ sudo apt-get install libgsm1-dev asterisk-dev asterisk-config [/bash] You may or maynot need to update libusb as well , depending on your system , head over to www.libusb.org and download the latest copy in /usr/src and compile. copy it over to /usr/lib/x86_64-linux-gnu/libusb.so after taking a backup of the original file.

OpenBTS Installation

Once you have all the dependencies sorted out , Its time to install openBTS

1. Create a directory for OpenBTS (obts in our case )
2. Change to that directory and run the following


git clone https://github.com/RangeNetworks/openbts.git
git clone https://github.com/RangeNetworks/smqueue.git
git clone https://github.com/RangeNetworks/subscriberRegistry.git

#From here and downwards you can copy&paste (that's why the ';' are for)
for D in *; do (
    echo $D;
    echo "=======";
    cd $D;
    git clone https://github.com
/RangeNetworks/CommonLibs.git; git clone https://github.com/RangeNetworks/NodeManager.git); done; git clone https://github.com/RangeNetworks/libcoredumper.git; git clone https://github.com/RangeNetworks/liba53.git

3. Build libcoredumper

cd libcoredumper;
./build.sh && \
   sudo dpkg -i *.deb;
cd ..

4. Build liba53

cd liba53;
make && \
   sudo make install;
cd ..;

5. In the same directory , check out YateBTS

svn checkout http://voip.null.ro/svn/yatebts/trunk yatebts 

6. The next step is to remove autoloading of the FPGA since we will be loading it permanently. To do that , open up

vim ./yatebts/mbts/TransceiverRAD1/bladeRFDevice.cpp

and add #ifdef NEVER on line 108 and #endif on line 129 – Since both lines are empty , future patches should work as well.

7. Change to YateBTS directory and run autogen.sh

$ cd opbts/yatebts
$ ./autogen.sh

8. This will generate a configure script , Now if you run the configure script immediately , it will fail while looking for YATE , so open up the configure file

$vim configure

Look for as_fn_err $? “Could not find Yate” “$LINENO” 5 and change it to as_fn_warn $? “Could not find Yate” “$LINENO” 5

9. Rerun configure

$ ./configure

10. You only need two directories from YateBTS

a) Peering

$ cd /home/openbts/obts/yatebts/mbts/Peering
$ make

b) TransceiverRAD1

$ cd /home/openbts/obts/yatebts/mbts/TransceiverRAD1
$ make

11. Copy the two binaries over to OpenBTS folder.

$ cd ..
$ cp ./yatebts/mbts/TransceiverRAD1/transceiver-bladerf openbts/apps/
$ cd openbts/apps/
$ ln -sf transceiver-bladerf transceiver

12. Build OpenBTS

$ cd /home/openbts/obts/openbts
$ ./autogen.sh
$ ./configure --with-uhd
$ make

13. Next step is to configure the SQL-lite Database , For bladeRF , a few modifications are required. They can be done as

$ vim /home/openbts/obts/openbts/apps/OpenBTS.example.sql

Look for the following and replace their values

GSM.Radio.RxGain from 47 to 5 
GSM.Radio.PowerManager.MaxAttenDB to 35
GSM.Radio.PowerManager.MinAttenDB to 35

Once that is done , proceed to the next step

14. Create OpenBTS configuration directory

$ sudo mkdir /etc/OpenBTS

15. Install DB , from OpenBTS source directory

$ sudo sqlite3 -init ./apps/OpenBTS.example.sql 
/etc/OpenBTS/OpenBTS.db ".quit"

16. Once that is done , you can test it by running the following command

$ sqlite3 /etc/OpenBTS/OpenBTS.db .dump

If you see a lot of output – Then the installation is successful , Proceed to the next step

17. Run OpenBTS by using the following commands

$ cd /home/openbts/obts/openbts/apps
$ sudo ./OpenBTS

If you see system ready – Your BTS is up and running and now if you do a search for networks from your phone , it should show Test PLMN or 00101 in your phone.

18. If you see the above , shutdown openBTS and proceed to the next step for installation of subscriber registry, sipauthserve and smqueue , both of these are required for running openBTS – Without them , the phone will not register to the test network.

19. To setup the Subscriber Registry database you must first create the file path the db will reside in. By default, this is /var/lib/asterisk/sqlite3dir . Create that directory

$ sudo mkdir -p /var/lib/asterisk/sqlite3dir

20. To build sipauthserve

$ cd subscriberRegistry
$ ./autogen.sh
$ ./configure
$ make

This will create a binary sipauthserve in /home/openbts/obts/subscriberRegistry/apps

21. The next step is to configure sipauthserve , this can be done by

$ cd /home/openbts/obts/subscriberRegistry
$ sudo sqlite3 -init subscriberRegistry.example.sql /etc/OpenBTS/sipauthserve.db ".quit"

22. The next step is to build and install SMQUEUE , SMQUEUE will complain about missing SubscriberRegistry.h – Which can be fixed by creating a symlink to subscriberRegistry directory in smqueue build path.

$ cd /home/openbts/obts/smqueue
$ ln -s /home/openbts/obts/subscriberRegistry/ SR
$ autoreconf -i
$ ./configure
$ make

23. Once this is done , SMQUEUE configuration needs to be imported.

$ cd /home/openbts/obts/smqueue
$ sudo sqlite3 -init smqueue/smqueue.example.sql /etc/OpenBTS/smqueue.db ".quit"

bladeRF Firmware Update & FPGA Loading

24. Head over to [https://github.com/Nuand/bladeRF/wiki/Upgrading-bladeRF-firmware] and update the firmware.

25. Once that is done , Head over to [http://www.nuand.com/fpga.php] to download the appropriate FPGA image for your board.

26. Load the FPGA image

$ bladeRF-cli -L <path to fpga image file>

patience , lots of it, or you may damage your board!

27. Once all of this is done , start the services one by one

$ cd /home/openbts/obts/smqueue
$ sudo ./smqueue &
$ cd /home/openbts/obts/subscriberRegistry/apps
$ sudo ./sipauthserve &
$ cd /home/openbts/obts/openbts/apps
$ sudo ./OpenBTS &

25. Start OpenBTSCLI by running

$ cd /home/openbts/obts/openbts/apps/
$ sudo ./OpenBTSCLI

28. By default , OpenBTS will not accept your registration , till you do the following

a) Enter a regex for your IMSI
b) Allow all IMSIs to be accepted by setting

config Control.LUR.OpenRegistration .*

in the openBTS cli.


29. You should now be able to search your network on your phone , and latch onto it – Dial 600 to do an echo test on Asterisk from your phone!

30. Please ensure that you follow all local laws!

[1] https://github.com/Nuand/bladeRF/wiki/Minimalistic-build-and-run-test-for-OpenBTS-5
[2] https://wush.net/trac/rangepublic/wiki/BuildInstallRun#ConfiguringOpenBTS
[3] https://wush.net/trac/rangepublic/wiki/CommonErrors
[4] http://openbts.org/w/index.php/Main_Page
[5] https://github.com/Nuand/bladeRF/wiki/Upgrading-bladeRF-firmware

Poor Man’s GSM BTS :: Nuand’s BladeRF & OpenBTS 5 Setup Instructions

9 thoughts on “Poor Man’s GSM BTS :: Nuand’s BladeRF & OpenBTS 5 Setup Instructions

  • April 28, 2015 at 10:02 pm

    You can try that on USRP, you will really enjoy that as well.

    • July 17, 2015 at 4:30 pm

      USRPs are too expensive , unfortunately i damaged my bladeRF board , so this is on hold.

  • Pingback:Ziggy’s Embedded BTS | Ziggy's of the world

  • July 24, 2015 at 6:17 pm

    Hello, Please I can’t find the TransceiverRAD1 folder in the yatebts – I mean the mbts – folder when I checkout yatebts. Please I need help.

    Its not even online.

    I think its available on reviosion 4.2 but not on trunk.

    • February 2, 2016 at 1:39 pm

      Have you tried to run YateBTS on the x40 board ?

  • November 2, 2016 at 10:51 pm

    hi does it work with the x115 board ?

    • June 5, 2018 at 5:51 pm

      No reason it shouldn’t!

  • January 15, 2018 at 1:30 am

    do you have a preconfigured vmware or virtualbox


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.