In the last post we covered the config required to provision a new BTS in our BSC.
We’re going to do roughly the same thing this time around, as we connect our SDR based BTS to our BSC.
Before we fire up the BTS side of things make sure you’ve stopped the virtual BTS and disabled it.
systemctl stop osmo-bts-virtual systemctl disable osmo-bts-virtual
Configure Osmo-BTS-TRX
Next up we’ll edit the config of osmo-bts-trx.
vi /etc/osmocom/osmo-bts-trx.cfg
We’ll edit the oml remote-ip to the IP of the server running your BSC, if you’re running on on the same machine you can leave it as localhost (127.0.0.1).
Next up we’ll set the Unit-ID of the BTS, this identifies the BTS inside the BSC,
I’ll set it to unit-id 1234 by changing ipa unit-id 1234 0
Finally we’ll change the logging config to show everything by changing it to:
log stderr logging filter all 1 !
Next up we’ll configure the BTS on the BSC
BSC Provisioning
This is essentially a copy of the provisioning process we followed in the last post, the only difference is we’ll use BTS 2 (as BTS 1 is setup for our Virtual BTS) in the config, and set the few different identifier such as the ipa unit id for the SDR based BTS.
telnet localhost 4242 OsmoBSC> enable OsmoBSC# configure terminal OsmoBSC(config)# network OsmoBSC(config-net)# bts 2 OsmoBSC(config-net-bts)# type sysmobts OsmoBSC(config-net-bts)# description "LimeSDR Based BTS" OsmoBSC(config-net-bts)# ipa unit-id 1234 0 OsmoBSC(config-net-bts)# band DCS1800 OsmoBSC(config-net-bts)# codec-support fr hr efr amr OsmoBSC(config-net-bts)# cell_identity 1234 OsmoBSC(config-net-bts)# location_area_code 1234 OsmoBSC(config-net-bts)# base_station_id_code 1234 OsmoBSC(config-net-bts)# base_station_id_code 12 OsmoBSC(config-net-bts)# ms max power 40 OsmoBSC(config-net-bts)# trx 0 OsmoBSC(config-net-bts-trx)# max_power_red 20 OsmoBSC(config-net-bts-trx)# arfcn 876 OsmoBSC(config-net-bts-trx)# timeslot 0 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config CCCH+SDCCH4 OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 1 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 2 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 3 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 4 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 5 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 6 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# timeslot 7 OsmoBSC(config-net-bts-trx-ts)# phys_chan_config TCH/F OsmoBSC(config-net-bts-trx-ts)# exit OsmoBSC(config-net-bts-trx)# exit OsmoBSC(config-net-bts)# exit OsmoBSC(config-net)# exit OsmoBSC(config)# exit OsmoBSC# copy running-config startup-config
Starting the SDR based BTS
Before we start the SDR based BTS it’s probably best to have 3 terminals open,
One logged into Osmo-BSC with logging enabled (see the last post for info on how to do that).
We’ll start another terminal for running the TRX modem / Layer 1 interface:
osmo-trx-lms -C /etc/osmocom/osmo-trx-lms.cfg
And in another new terminal we’ll start the BTS side;
osmo-bts-trx -c /etc/osmocom/osmo-bts-trx.cfg
All going well our terminal with Osmo-BSC should report the connection:
OsmoBSC# <0016> input/ipa.c:287 0.0.0.0:3003 accept()ed new link from 10.0.1.252:39595 <0003> osmo_bsc_main.c:291 bootstrapping RSL for BTS/TRX (2/0) on ARFCN 875 using MCC-MNC 001-01 LAC=1234 CID=1234 BSIC=12
And the osmo-trx-lms and osmo-bts-trx windows should have data flying by at a rate of knots.
Verifying Cell Operation
If all is going to plan, our SDR is connected to our machine via osmo-trx-lms which is acting as a modem for osmo-bts-trx which is now connected to the BSC. Lot to go through, but it gets easier from here.
Let’s run a scan of the networks on our phone. I found putting mine on GSM only before scanning for networks meant it popped up a heck of a lot faster.
And lo, there it is.
Our cell is online and broadcasting it’s info. You won’t be able to connect to it at this stage as we’ve still got a few more steps to go.
In the next post we’ll introduce the Home Location Register and then the MSC.
Hello. Thank u for this series is really detailed.I have reached this stage but after enabling bts-trx after a few seconds I have an error “Shutting down BTS 0, Reason No clock from osmo-trx”. Do u know what to do with this ?
Hi Angel,
Which SDR hardware are you using?
Are you using an external clock?
Are you connecting on a VM or bare metal?
Are you connected via USB-3 or USB-2?
I solved this problem. The issue was that, I connected my limesdr mini by 2.0 usb in vwmare. I added the extension pack to use usb 3.0 and it works 🙂