OpenBTS

What is OpenBTS?

OpenBTS is a Unix application that uses a software radio to present a GSM air interface to standard 2G GSM handset and uses a SIP softswitch or PBX to connect calls. (You might even say that OpenBTS is a simplified form of IMS that works with 2G feature-phone handsets.) The combination of the global-standard GSM air interface with low-cost VoIP backhaul forms the basis of a new type of cellular network that can be deployed and operated at substantially lower cost than existing technologies in many applications, including rural cellular deployments and private cellular networks in remote areas.

Where can I get the latest code?

The best way to get OpenBTS is by pulling the code directly from there source code repository as an anonymous read-only user.

You do this by entering the following command into a new terminal window

git clone https://github.com/RangeNetworks/dev.git

like seen here

0

when u have entered that command

u can press Enter

and next u will see this

1

now that this i done we are going to change that Directory name into OpenBTS so u can remember it easily

to do that u need to enter the following command:

 mv dev OpenBTS

like seen here

2

when u typed this command u can press Enter

So now we renamed the folder dev to OpenBTS

Next we need to enter that directory, you do this by entering the following command:

cd OpenBTS

like seen here

3

after thats done press Enter

and you should now be here

4

Now, to download all of the components simply run the clone.sh script.

u do this entering the following command

./clone.sh

like seen here

5

after that u can press Enter

 

Now if u pressed enter it’s going to pull all the needed software from the github

Component master status
asterisk Build Status
asterisk-config Build Status
liba53 Build Status
libcoredumper Build Status
libsqliteodbc Build Status
libzmq Build Status
openbts Build Status
smqueue Build Status
subscriberRegistry Build Status
system-config Build Status

it’s a whole list, so i am not going to post the whole list in screenshots, but it should end with this

6

now that this is done we need to build it

Building

The build.sh script will automatically install any build dependencies (building them manually when required).

After dependencies are taken care of, each component is compiled into an installable package.

To do this we need to enter the following command:

./build.sh SDR1

like seen here

7

after u entered that command press Enter

This is a very long process, so go grab yourself a drink and lay back

After a while when it’s done

you should see this

8

Now the building is done !

Next we need to configure all the things

Configuring OpenBTS

With OpenBTS built, you now need to configure it to run correctly. There are a two key files that must be created for this to happen.

/etc/OpenBTS/OpenBTS.db

OpenBTS.db is the database store for all OpenBTS configuration. It must be installed at /etc/OpenBTS, which likely does not exist. So, to create this file, we first need to enter the OpenBTS directory

you do this by entering the following command

cd openbts

like seen here

9

now that this in entered u can press Enter

and should be here

10

now that u are in this location

we are going to make a directory elsewhere, it’s the one we need for putting the database

so enter the following command:

mkdir /etc/OpenBTS

like seen here

11

now that u typed this command press Enter

You will see nothing happening but should come out back here again

12

next we need to run the following command:

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

like seen here

13

when u typed that command u can press Enter

and should see this

14

To make sure that it worked we are going to test it

Test this by running the following command :

sqlite3 /etc/OpenBTS/OpenBTS.db .dump

like seen here

15

after u pasted that command press Enter

If you see a lot of configuration variables, the DB has been installed correctly.

so like this

16

this means that the database is configured correctly

At this point, we should be able to perform a basic sanity check of OpenBTS.

so we are going to do this

the openbts executable is in the apps folder

so we need to enter that by typing the following command here:

cd apps

like seen here

17

after that press Enter

and you should now be here

18

next we need to create a script with the filename transceiver with the following content and make it executable:

#!/bin/bash
exec <your path to osmocom-bb>/src/host/layer23/src/transceiver/transceiver 1

so to do that we need to type the following command:

nano transceiver

like seen here

19

when u typed out this u can press Enter

and should then see this

20

now that u have this open

we should paste the following lines here:

#!/bin/bash
exec /root/osmocom-bb/src/host/layer23/src/transceiver/transceiver 1

like seen here

21

If you followed all my guides, it should be correct..But if u installed osmocom-bb in another location u should change that here

Whereas 1 needs to be replaced with the ARFCN of the reference cell you want to use for synchronization

(find a strong one with the rssi-app for example).

But when that is done we can continue

Press CTRL+X to close

and you should then see this

22

now that u see this u can press Y on your keyboard

and should then see this

23

now when you see this u can just press Enter

and it should be saved now

And you should now come back out here again

24

now that u are here again, we need to make the file we just created executable

we do this by running the following command:

chmod +x transceiver

like seen here

25

now that u typed this command, u can press Enter

You will see nothing happening but the file should be executable

you can check this by running the following command:

ls

and should then see this

26

the file transceiver in green (which means it’s executable!)

Now that this is done we need to make some changes to the OpenBTS database.

We do this by entering the following command:

sqlitebrowser /etc/OpenBTS/OpenBTS.db

like seen here

27

now that u entered that command press Enter

and should now see this

28

now that u see this we need to click on the Tab Browse Data

like seen here

29

when you clicked that, u should see this

30

now we need to make some changes here

find the line

GSM.Radio.NeedBSIC

like seen here

31

now that u see this double click on the 0 (zero) next to it

and you should then see this

32

when u have this edit window open

change the 0 (zero) to 1 (one)

like seen here

33

and then click OK

and should then come back out here again

34

now that this is done find the following line

GSM.Radio.Band

like seen here

35

and make sure the VALUESTRING is set to 900

next look for the following line

GSM.RACH.MaxRetrans

like seen here 36

and change that VALUESTRING 1 to 3

like seen here

37

and then press OK

and you should then have this

38

now that this is done

we need to look for the following line

GSM.RACH.TxInteger

like seen here

39

now that u found this change the VALUESTRING from 14 to 8

like seen here

40

now that this is done click on OK

and you should then have this

41

Leave a Reply