OpenBTS docker image

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/

7 Likes

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?

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

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 ?

@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

Um, page 30 of The Book { 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 :slight_smile:

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
with more here https://en.wikipedia.org/wiki/GSM_procedures
and here https://en.wikipedia.org/wiki/Mobility_management#Location_update_procedure

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 post to get multiple terminals for the same docker.

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

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