!!!! THIS IS FOR EDUCATIONAL PURPOSES ONLY !!!!
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, 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
- Download & Install Ubuntu 12.04 32 Bit, Do a minimalistic install with OpenSSH server.
- Update git
Pre-Reqs Installation
Once this is setup, its time to setup the pre-requisites.
Copy and paste the dependencies script and run it – it will install the dependencies. Another way to install the dependencies is to look for IFMissing in the 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.
The next step is to build uhd, that can be done by compiling GNURadio from source. Running the command below will do that, and is going to take a LOT of time, depending on your computer.
You can also follow the UHD Linux guide.
| |
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:
- libgsm1-dev
- asterisk-dev
- asterisk-config
On Ubuntu, this can be done by:
| |
You may or may not 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, it’s time to install OpenBTS.
Create a directory for OpenBTS (
obtsin our case)Change to that directory and run the following
Build libcoredumper
Build liba53
In the same directory, check out YateBTS
The next step is to remove autoloading of the FPGA since we will be loading it permanently. To do that, open up the relevant file and add
#ifdef NEVERon line 108 and#endifon line 129 – Since both lines are empty, future patches should work as well.Change to YateBTS directory and run
autogen.shThis 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.
Look for:
as_fn_err $? "Could not find Yate" "$LINENO" 5
And change it to:
as_fn_warn $? "Could not find Yate" "$LINENO" 5
Rerun configure
You only need two directories from YateBTS:
- Peering
- TransceiverRAD1
Copy the two binaries over to OpenBTS folder.
Build OpenBTS
Next step is to configure the SQLite Database. For bladeRF, a few modifications are required. Look for the following and replace their values.
Once that is done, proceed to the next step.
Create OpenBTS configuration directory
Install DB from OpenBTS source directory
Once that is done, you can test it by running the following command.
If you see a lot of output – Then the installation is successful. Proceed to the next step.
- Run OpenBTS by using the following commands.
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.
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.
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.To build sipauthserve.
This will create a binary sipauthserve in /home/openbts/obts/subscriberRegistry/apps
The next step is to configure sipauthserve.
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.Once this is done, SMQUEUE configuration needs to be imported.
bladeRF Firmware Update & FPGA Loading
Head over to the bladeRF firmware upgrade wiki and update the firmware.
Once that is done, head over to http://www.nuand.com/fpga.php to download the appropriate FPGA image for your board.
Load the FPGA image.
Patience, lots of it, or you may damage your board!
Once all of this is done, start the services one by one.
Start OpenBTSCLI by running.
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 the appropriate configuration in the OpenBTS CLI.
THIS WILL ALLOW ALL OF THE HANDSETS REGISTERING TO YOUR BTS – INCLUDING YOUR NEIGHBOURS! DO NOT USE IT PERMANENTLY!!!!
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!
Please ensure that you follow all local laws!