this article introduce install and configure openbts on ubuntu 16.04

if you are from China you can download ubuntu 16.04 livecd which has been install openbts, the openbts folder is under /opt/openbts

and you can go to step 2. the livecd url: https://pan.baidu.com/s/1hBh7nmWO9HlAOZUdN88jUw extract code: z3g3

 

1. install openbts and uhd

if you are from China, I suggest you change apt-get source to other. I use 清华大学 source which work fine for me, open /etc/apt/sources.list and replace all the content as below:

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

run command one by one below:

sudo apt-get update
sudo apt-get install g++ erlang libreadline6-dev bind9 ntp autoconf libboost-all-dev ntpdate
sudo apt-get -f install
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:chris-lea/zeromq
sudo apt-get update
sudo apt-get install git
cd ~
mkdir openbts
git clone https://github.com/RangeNetworks/dev.git
cd dev
./clone.sh
./switchto.sh master
cd liba53
sudo make install
sudo ldconfig
cd ..
./build.sh B210

build.sh B210 will install all required package include uhd. but still need to download uhd images. run:

sudo uhd_images_downloader

now you will see your build folder under BUILDS:

ls BUILDS

install all built deb package:

cd BUILDS/{your built folder}
sudo dpkg -i *.deb

then run command below:

cd ../../../
git clone https://github.com/nadiia-kotelnikova/openbts_systemd_scripts.git
cd openbts_systemd_scripts
sudo cp systemd/* /etc/systemd/system/

 

2. run openbts

now we finish openbts installation. go to your openbts_systemd_scripts folder, for the livecd iso the path is /opt/openbts/openbts_systemd_scripts connect b210 run openbts:

sudo ./openbts-start.sh

wait a few seconds b210 will turn on TX and RX led and start working.

to stop openbts just run:

sudo ./openbts-stop.sh

 

3. configure openbts

you may want to add your sim card to your openbts. open /etc/asterisk/sip.conf then add below information on the end of sip.conf. you need to replace below imsi number as your imsi number.

[IMSI460010100001101]
callerid=1101
canreinvite=no
type=friend
context=sip-external
allow=gsm
host=dynamic
dtmfmode=info

the 1101 is the phone number you assign to this sim card.

open /etc/asterisk/extensions.conf then add below information on the end of extensions.conf. you need to replace below imsi number as your imsi number.

exten => 1101,1,Dial(SIP/IMSI460010100001101@127.0.0.1:5062)

you can enter openbts CLI to configure openbts:

cd openbts/dev/openbts/apps
sudo ./OpenBTSCLI

type help to read the instruction:

OpenBTS> help

for example allow all cell phone register:

OpenBTS> config Control.LUR.OpenRegistration .*