# OpenBTS docker image

**URL:** <https://discourse.myriadrf.org/t/openbts-docker-image/3195>\
**Category:** RAN Forum\
**Created:** [20 August 2018 17:40 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195 "2018-08-20T17:40:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cswiger](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/cswiger/32/197_2.png) [@cswiger](https://discourse.myriadrf.org/u/cswiger)\
**Post date:** [20 August 2018 17:40 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/1 "2018-08-20T17:40:56Z")

</div>

Found an Linux Container (lxc) system with a working OpenBTS system in it - when ahead and transferred it over to a Docker image and uploaded to dockerhub. Just tested on a third notebook and it came up working; a BLU phone and a DZ09 watch camped on, dialed test tone (2602), send sms, etc. Mini not supported. About 420MB to pull the image.

[https://hub.docker.com/r/cswiger/openbtslimesdr1a/](https://hub.docker.com/r/cswiger/openbtslimesdr1a/)

---

<div class="post-metadata">

**Author:** ![Bahaeddin](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bahaeddin](https://discourse.myriadrf.org/u/Bahaeddin)\
**Post date:** [30 August 2018 22:42 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/2 "2018-08-30T22:42:22Z")

</div>

Looking forward to test this when I have good internet connection

I’m new to dockers, can I use this with a windows mahine ? or do I need a linux vm and add docker to it?

---

<div class="post-metadata">

**Author:** ![Bahaeddin](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bahaeddin](https://discourse.myriadrf.org/u/Bahaeddin)\
**Post date:** [31 August 2018 08:35 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/3 "2018-08-31T08:35:06Z")

</div>

Ok, so I tried in on Ubuntu VM and had the docker installed on top of it,

I can get everything to work, I can see the network. but I can’t register the device, I tried to re-attach to the screen with trx but got this weird message

```
[INFO] [UHDSoapyDevice] L
ERR 139962247116544 08:24:22.5 UHDDevice.cpp:1382:write: Skipping buffer data: timestamp=389115720 time_end=389107560
ERR 139962247116544 08:24:22.5 UHDDevice.cpp:1382:write: Skipping buffer data: timestamp=389115720 time_end=389107560
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L
[INFO] [UHDSoapyDevice] L

```

whenever I try to register a device I get the above error about skipping something

but anyhow, I didn’t understand the last lines in this link [Docker](https://hub.docker.com/r/cswiger/openbtslimesdr1a/)

do I need to register the phone manually ?

> ```
> Register your phone sim with:
> # /OpenBTS/nmcli.py sipauthserve subscribers create "nameofthephone" IMSItheimsi
> where IMSItheimsi is the string 'IMSI' followed by the numbers, example:
> # /OpenBTS/nmcli.py sipauthserve subscribers create BLUPhone IMSI901700000005100
> 
> ```

Great job with the docker, thanks very much for the effort, by the way, for the osmo, which docker should I start testing ? 3 ?

---

<div class="post-metadata">

**Author:** ![Bahaeddin](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bahaeddin](https://discourse.myriadrf.org/u/Bahaeddin)\
**Post date:** [2 September 2018 18:32 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/4 "2018-09-02T18:32:41Z")

</div>

@cswiger

Thank you so much for docker image, I managed to use it and get the following output, however I can’t seem to authenticate even after adding my imsi using the /OpenBTS/nmcli.py command

ps: I think there is a typo it should be ( ./nmcli.py sipauthserve subscribers create name imsi msisdn) instead of ( ./nmcli.py sipauthserve subscribers create name msisdn) missing the keyword “imsi”

anyhow I get this output, meaning that everything is working great, but I want to check the logs to see what’s happening, but I didn’t find them in the usual place, /var/log/OpenBTS.log. are they being stored somewhere else ?

```
OpenBTS> tmsis
IMSI TMSI IMEI AUTH CREATED ACCESSED TMSI_ASSIGNED 
60601011XXXXX - 86741XXXX280 0 29m 29m 0             
6060010XXXX93 - 357201XXXX04190 0 33m 33m 0             
60600400XXXX485 - 352901XXXX69780 0 34m 34m 0             
6060040XXXX4 - 867418033XXXX0 0 54m 54m 0
```

---

<div class="post-metadata">

**Author:** ![cswiger](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/cswiger/32/197_2.png) [@cswiger](https://discourse.myriadrf.org/u/cswiger)\
**Post date:** [3 September 2018 00:33 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/5 "2018-09-03T00:33:43Z")

</div>

Um, page 30 of The Book { [http://openbts.org/site/wp-content/uploads/ebook/Getting\_Started\_with\_OpenBTS\_Range\_Networks.pdf](http://openbts.org/site/wp-content/uploads/ebook/Getting_Started_with_OpenBTS_Range_Networks.pdf) } has the nmcli.py format with an example and a warning that they want the string of numbers preceeded with IMSI, like IMSI214057715229963 alltogether with no space. You can read the subscribers to verify they are created as expected with:

```
root@feb140e4e238:/OpenBTS# ./nmcli.py sipauthserve subscribers read
raw request: {"command":"subscribers","action":"read","key":"","value":""}
raw response: {
	"code" : 200,
	"data" : [
		{
			"imsi" : "IMSI310410721544479",
			"msisdn" : "3045080",
			"name" : "h2ocard"
		},
		{
			"imsi" : "IMSI901700000022770",
			"msisdn" : "3045120",
			"name" : "sysmocard1"
		},
		{
			"imsi" : "IMSI310260833855921",
			"msisdn" : "3045080",
			"name" : "tracSIM"
		},
		{
			"imsi" : "IMSI901700000005100",
			"msisdn" : "3045100",
			"name" : "BLUPhone"
		}
	]
}

```

Actually, an unregistered phone should get an sms text message “your handset is not provisioned for this network” - - that was my first happy breakthrough 🙂

All that is per the Location Update configs:  
OpenBTS\> config Control.LUR  
Control.LUR.404RejectCause 0x04 [default]  
Control.LUR.AttachDetach 1 [default]  
Control.LUR.FailMode ACCEPT [default]  
Control.LUR.FailedRegistration.Message Your handset is not provisioned for this network. [default]  
Control.LUR.FailedRegistration.ShortCode 1000 [default]  
Control.LUR.NormalRegistration.Message (disabled) [default]  
Control.LUR.NormalRegistration.ShortCode 0000 [default]  
Control.LUR.OpenRegistration (disabled) [default]  
Control.LUR.OpenRegistration.Message Welcome to the test network. Your IMSI is [default]  
Control.LUR.OpenRegistration.Reject (disabled) [default]  
Control.LUR.OpenRegistration.ShortCode 101 [default]  
Control.LUR.QueryClassmark 0 [default]  
Control.LUR.QueryIMEI 0 [default]  
Control.LUR.RegistrationMessageFrequency FIRST [default]  
Control.LUR.SendTMSIs 0 [default]  
Control.LUR.UnprovisionedRejectCause 0x04 [default]

which are explained here: [http://openbts.org/w/index.php?title=OpenBTSConfig](http://openbts.org/w/index.php?title=OpenBTSConfig)  
with more here [https://en.wikipedia.org/wiki/GSM\_procedures](https://en.wikipedia.org/wiki/GSM_procedures)  
and here [https://en.wikipedia.org/wiki/Mobility\_management#Location\_update\_procedure](https://en.wikipedia.org/wiki/Mobility_management#Location_update_procedure)

---

<div class="post-metadata">

**Author:** ![Bahaeddin](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bahaeddin](https://discourse.myriadrf.org/u/Bahaeddin)\
**Post date:** [3 September 2018 20:38 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/6 "2018-09-03T20:38:48Z")

</div>

thanks for the reply

page 29 of the same book says that the comand is as follows  
./nmcli.py sipauthserve subscribers create name imsi msisdn

anyhow, I tried to usse the same example that you did and got an error, when I did it the other way, I get status 200 or something and the word OK. I honestly didn’t check the subscriber list, but I will in future tests.

\*\*Edit: \*\*  
**turns out you are right, however it was mssing the (msisdn) which is from what I understood is the phone number assigned to the phone with openbts. so the command becomes (/OpenBTS/nmcli.py sipauthserve subscribers create “huaweiSim1” IMSI606010112570110 3045102)**

```
{
		"imsi" : "IMSI606004010962824",
		"msisdn" : "3045100",
		"name" : "huaweiSim2"
	},
	{
		"imsi" : "IMSI606010112570110",
		"msisdn" : "3045102",
		"name" : "huaweiSim1"
	}

```

**I even allowed open registration as the book explains in chapter 6, (output of config Control.LUR is below) but that also didn’t work ! not sure how to troubleshoot this.**

> OpenBTS\> config Control.LUR  
> Control.LUR.404RejectCause 0x04 [default]  
> Control.LUR.AttachDetach 1 [default]  
> Control.LUR.FailMode ACCEPT [default]  
> Control.LUR.FailedRegistration.Message Your handset is not provisioned for this network. [default]  
> Control.LUR.FailedRegistration.ShortCode 1000 [default]  
> Control.LUR.NormalRegistration.Message (disabled) [default]  
> Control.LUR.NormalRegistration.ShortCode 0000 [default]  
> Control.LUR.OpenRegistration .\*  
> Control.LUR.OpenRegistration.Message Welcome to IslandNet! Call or text 101 for  
> Control.LUR.OpenRegistration.Reject (disabled) [default]  
> Control.LUR.OpenRegistration.ShortCode 101 [default]  
> Control.LUR.QueryClassmark 0 [default]  
> Control.LUR.QueryIMEI 0 [default]  
> Control.LUR.RegistrationMessageFrequency FIRST [default]  
> Control.LUR.SendTMSIs 0 [default]  
> Control.LUR.UnprovisionedRejectCause 0x04 [default]

anyhow, is the SMS sent by default or is there some config that I need to do, because all I got was error in registration.  
also\*\*, I need to know where the logs are stored in the docker that you made, as I said in the previous comment, they are not in their default place as per the book.\*\*

**Also, instead of using screens, I used this [Stackoverflow](https://stackoverflow.com/questions/42921274/docker-linux-how-to-start-multiple-console-terminals-for-one-running-container?rq=1) post to get multiple terminals for the same docker.**

thanks again @cswiger for the effort and your responses.let me know what you think

---

<div class="post-metadata">

**Author:** ![Bahaeddin](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bahaeddin](https://discourse.myriadrf.org/u/Bahaeddin)\
**Post date:** [10 September 2018 10:43 UTC](https://discourse.myriadrf.org/t/openbts-docker-image/3195/7 "2018-09-10T10:43:34Z")

</div>

I managed to get it working, the only difference I made was using ubuntu as dual boot with Windows instead of VM.

I managed to get SMS working, now we go to trying to make voice call working

Thanks

 ![Screenshot_20180910-100948](https://yyz2.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/f/fff6a5ab90a54cb89cec6cf5b8c2a538a00b228e.jpg)
