net/templates: support running osmo-bts-virtual

New config variables:
* BTS0_RUN_IN_OSMO_DEV
* BTS0_IP
* BTS1_RUN_IN_OSMO_DEV
* BTS1_IP

Change-Id: Ibc8efe75abffcefc0a719b6323a9ceca39f14ea1
changes/42/27442/1
Oliver Smith 2022-02-21 16:25:37 +01:00
parent af9b9d8c42
commit 321a47c451
5 changed files with 39 additions and 4 deletions

View File

@ -149,11 +149,14 @@ connect it to the HNBGW as configured by the templates.
=== 2G BTS
At the time of writing, there are no osmo-bts.cfg files, since this is intended
for the core network and BSC components only. Feel free to add!
You can either let osmo-dev run osmo-bts-virtual, or connect a real BTS to the
BSC + CN started by osmo-dev.
Typically you'd need to edit only the /etc/osmocom/osmo-bts.cfg to match your
IP address and ipa unit-id:
To start osmo-bts-virtual, set BTS0_RUN_IN_OSMO_DEV=1 and/or
BTS1_RUN_IN_OSMO_DEV=1 in your copy of config_2g3g.
To connect your real BTS, typically you'd need to edit only the
/etc/osmocom/osmo-bts.cfg to match your IP address and ipa unit-id:
bts 0
oml remote-ip 192.168.0.23

View File

@ -39,6 +39,9 @@ BTS0_LAC=${BTS_LAC}
BTS0_MAX_POWER_RED=${BTS_MAX_POWER_RED}
BTS0_NOMINAL_POWER=${BTS_200mW}
BTS0_CODEC_SUPPORT=${BTS_CODEC_SUPPORT}
# set to 1 to have osmo-dev run osmo-bts-virtual
BTS0_RUN_IN_OSMO_DEV=0
BTS0_IP="127.0.0.12"
BTS1_DESCRIPTION="my test BTS 1"
BTS1_IPA_UNIT="1 0"
@ -56,6 +59,9 @@ BTS1_LAC=${BTS_LAC}
BTS1_MAX_POWER_RED=${BTS_MAX_POWER_RED}
BTS1_NOMINAL_POWER=${BTS_200mW}
BTS1_CODEC_SUPPORT=${BTS_CODEC_SUPPORT}
# set to 1 to have osmo-dev run osmo-bts-virtual
BTS1_RUN_IN_OSMO_DEV=0
BTS1_IP="127.0.0.13"
HLR_IP=127.0.0.5

View File

@ -4,3 +4,9 @@ ${include(common_osmo_bts)}
bts 0
ipa unit-id ${BTS0_IPA_UNIT}
oml remote-ip ${BSC0_IP}
ctrl
bind ${BTS0_IP}
line vty
bind ${BTS0_IP}

View File

@ -0,0 +1,12 @@
${include(common_template_warning)}
${include(common_osmo_bts)}
bts 0
ipa unit-id ${BTS1_IPA_UNIT}
oml remote-ip ${BSC1_IP}
ctrl
bind ${BTS1_IP}
line vty
bind ${BTS1_IP}

View File

@ -181,6 +181,7 @@ stp4cn="osmo-stp -c osmo-stp-cn.cfg"
stp4ran="osmo-stp -c osmo-stp-ran.cfg"
bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
bscnat="osmo-bsc-nat"
bts="osmo-bts-virtual"
if [ "x${MSC_MNCC}" != "xinternal" ]; then
sipcon="osmo-sip-connector -c osmo-sip-connector.cfg"
@ -272,6 +273,13 @@ else
term "$bsc -c osmo-bsc-1.cfg" BSC1
fi
${foreach(BTS)}
if [ "${BTSn_RUN_IN_OSMO_DEV}" = 1 ]; then
term "$bts -c osmo-bts-${BTSn}.cfg" BTS${BTSn}
fi
${foreach_end}
if [ "x${MSC_MNCC}" != "xinternal" ]; then
sleep .2
term "$sipcon" SIPCON