Version 23 (modified by 9 years ago) ( diff ) | ,
---|
Orbit + OpenBTS
All that you will need to create a tiny GSM network using Orbit Hardware is a GSM Phone, any SIM Card and the OpenBTS software. Actually you need a few more pieces of software but they are included in the steps below. The additional software is Asterisk which handles Voice over IP, you need Asterisk because OpenBTS "just" implements the GSM wireless communication between the phone and the base station, but asterisk stitches voice calls together using the TCP/IP stack. Additional software also includes SMQueue to give you Text Messaging and the NMCli.py software makes it easy to add "subscribers" to your tiny GSM network, we will also install SIPAUTHSERVE.
The following book was my guide when I was doing this install → http://openbts.org/site/wp-content/uploads/ebook/Getting_Started_with_OpenBTS_Range_Networks.pdf
The first thing you should ask is → Which SDR's does OpenBTS support for GSM? → http://openbts.org/w/index.php/RadioIntegration
I have had all of my success with the N210, which was available on Orbit Sandbox 3 at the time of writing this article. How did I know the N210 was available on SB3? → If you can find the "Orbit Online Scheduler" then you should be able to find the "Orbit Status Page", you can ask the "Orbit Status Page", "On which nodes is the N210 installed?"
Once you know which box is hosting your target SDR, the next thing you should do is to verify that the SDR is working on your target box.
Starting from scratch, let's make sure we start with an Image that already has SDR support:
davemsolomon@console.sb3:~$ omf load -t node1-1 -i ubuntu-14-04-64bit-sdr.ndz davemsolomon@console.sb3:~$ omf tell -a on -t node1-1
SSH to the target box with the SDR:
davemsolomon@console.sb3:~$ ssh root@node1-1
Before doing anything with OpenBTS, make sure the SDR is happy:
root@node1-1:~# uhd_usrp_probe linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.002-86-g566dbc2b -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes _____________________________________________________ / | Device: USRP2 / N-Series Device | _____________________________________________________ | / | | Mboard: N210r4 | | hardware: 2577 | | mac-addr: 00:80:2f:0a:cc:db | | ip-addr: 192.168.10.2 | | subnet: 255.255.255.255 | | gateway: 255.255.255.255 | | gpsdo: none | | serial: F297B6 | | FW Version: 12.4 | | FPGA Version: 10.1 ...
OK! the SDR looks happy! Let's move on.
Install the dependencies
root@node1-1:~# apt-get install software-properties-common python-software-properties root@node1-1:~# add-apt-repository ppa:git-core/ppa root@node1-1:~# apt-get update root@node1-1:~# apt-get install git root@node1-1:~# apt-get install bind9 root@node1-1:~# apt-get -f install
Download and prepare to build OpenBTS, Asterisk, SMQueue and Node Manager
root@node1-1:~# git clone https://github.com/RangeNetworks/dev.git root@node1-1:~# cd dev root@node1-1:~/dev# ./clone.sh root@node1-1:~/dev# ./switchto.sh master
Build packages for OpenBTS with support for our SDR as well as Asterisk, SMQueue, SIPAUTHSERVE and Node Manager:
(this will take about 10 minutes, grab a cup of coffee)
root@node1-1:~/dev#./build.sh N210
Now that all of our packages are built, let's install OpenBTS:
root@node1-1:~/dev# cd BUILDS/ root@node1-1:~/dev/BUILDS# cd 2015-10-13--03-22-27/ root@node1-1:~/dev/BUILDS/2015-10-13--03-22-27# dpkg -i openbts_5.0_amd64.deb
Now that we have installed OpenBTS let's verify that OpenBTS is happy with our SDR:
root@node1-1:~/dev/BUILDS/2015-10-13--03-22-27# cd /OpenBTS/ root@node1-1:/OpenBTS# ./transceiver linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.002-86-g566dbc2b Using internal clock reference -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes
Excellent! Let's start OpenBTS and make sure there aren't any errors in the log:
root@node1-1:/OpenBTS# service openbts start openbts start/running, process 12711 root@node1-1:/OpenBTS# tail /var/log/upstart/openbts.log -- Successfully tuned to 945.200000 MHz -- 1444721928.697975 139804996573056: system ready 1444721928.698023 139804996573056: use the OpenBTSCLI utility to access CLI 1444721928.698218 139804996573056: OpenBTSCLI network socket support for tcp:49300
Perfect!
Let's add text message support:
root@node1-1:/OpenBTS# cd ~/dev/BUILDS/2015-10-13--03-22-27/ root@node1-1:~/dev/BUILDS/2015-10-13--03-22-27# dpkg -i smqueue_5.0_amd64.deb root@node1-1:~/dev/BUILDS/2015-10-13--03-22-27# service smqueue start smqueue start/running, process 12904
Let's check the SMQueue Logs:
root@node1-1:~/dev/BUILDS/2015-10-13--03-22-27# tail /var/log/upstart/smqueue.log EMERG 0:12904 2015-10-13T03:45:50.6 ../SR/SubscriberRegistry.cpp:183:init: /var/lib/asterisk/sqlite3dir does not exist ALERT 12904:12904 2015-10-13T03:45:50.7 smqueue.cpp:2798:main: smqueue (re)starting smqueue logs to syslogd facility LOCAL7, so there's not much to see here
I think that is healthy.
At this point we can most likely prove text messaging works, let's add a subscriber to our tiny GSM network.
We need the IMEI of the phone you are using, your phone can tell you it's IMEI when you dial a special code.
Dial *#06#
If your phone is on and OpenBTS is running then by now your Phone and OpenBTS have most likely seen each other. Since we are using a SIM card we did not create we do not know anything about the encryption keys that were used when the SIM Card was created. Our tiny GSM network won't be encrypted but setting up subscribers will be easy. We can tell OpenBTS to give us a list of every IMEI (International Mobile Equipment Identity) and IMSI (International Mobile Subscriber Identity) it has seen, we will need the IMSI of our Test Phone so that we can tell OpenBTS to authorize the phone to use our GSM network.