aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-11-13 13:11:15 +0100
committerOliver Smith <osmith@sysmocom.de>2019-11-13 14:20:11 +0100
commit84a8beaa8e4e390bc9c993fc8451ee602a9c446f (patch)
tree92ae4be443a3c3c418f47925bab7932e1d2d0e4b
parentb7172a075c56ed914706e2a42aa6d9bfdb87ea16 (diff)
net: run osmo-bts-trx and virtual mobileosmith/freeswitch-bbmobile
FIXME: virtual mobile can't make calls with this configuration, codecs are probably not configured right Change-Id: I013d28cd5641ba13468feadf854c439b068dbaf3
-rw-r--r--3G+2G.deps1
-rw-r--r--default.opts1
-rw-r--r--net/config_2g3g23
-rw-r--r--net/templates/mobile.cfg66
-rw-r--r--net/templates/osmo-bts.cfg34
-rwxr-xr-xnet/templates/run.sh25
6 files changed, 148 insertions, 2 deletions
diff --git a/3G+2G.deps b/3G+2G.deps
index cc3109e..17736a9 100644
--- a/3G+2G.deps
+++ b/3G+2G.deps
@@ -20,3 +20,4 @@ osmo-sip-connector libosmocore
osmocom-bb_layer23 libosmocore
osmocom-bb_trxcon libosmocore
+osmo-bts libosmocore libosmo-abis
diff --git a/default.opts b/default.opts
index 7181f58..5d9cd97 100644
--- a/default.opts
+++ b/default.opts
@@ -1,2 +1,3 @@
osmo-msc --enable-smpp
openbsc --enable-smpp --enable-osmo-bsc --enable-nat
+osmo-bts --enable-trx
diff --git a/net/config_2g3g b/net/config_2g3g
index 5ce0db6..b5ea075 100644
--- a/net/config_2g3g
+++ b/net/config_2g3g
@@ -18,6 +18,11 @@ BTS_MAX_POWER_RED=21
BTS_CODEC_SUPPORT=fr amr
BTS_200mW=23
+BTS_TRX_SOCKET=/tmp/osmocom_l2
+BTS_TRX_IP="127.0.0.1"
+BTS_TRX_IP_OML=${TO_RAN_IP}
+BTS_TRX_IPA_UNIT="4321 0"
+
BTS0_DESCRIPTION="my test BTS 0"
BTS0_IPA_UNIT="0 0"
BTS0_ARFCN=123
@@ -53,6 +58,24 @@ BTS1_MAX_POWER_RED=${BTS_MAX_POWER_RED}
BTS1_NOMINAL_POWER=${BTS_200mW}
BTS1_CODEC_SUPPORT=${BTS_CODEC_SUPPORT}
+BTS2_DESCRIPTION="osmo-bts-trx"
+BTS2_IPA_UNIT="${BTS_TRX_IPA_UNIT}"
+BTS2_ARFCN=876
+BTS2_CI=${BTSn}
+BTS2_BSIC=${BTSn}
+BTS2_GPRS_MODE=gprs
+BTS2_GB_REMOTE_IP=${SGSN_IP}
+BTS2_GB_REMOTE_PORT=${SGSN_GB_PORT}
+BTS2_NSVCI=${BTSn}
+BTS2_NSEI="${BTSn_NSVCI}"
+# according to osmo-bsc vty, BVCI must be >= 2
+BTS2_BVCI="100${BTSn}"
+BTS2_BAND=${BTS_BAND}
+BTS2_LAC=${BTS_LAC}
+BTS2_MAX_POWER_RED=${BTS_MAX_POWER_RED}
+BTS2_NOMINAL_POWER=${BTS_200mW}
+BTS2_CODEC_SUPPORT=${BTS_CODEC_SUPPORT}
+
HLR_IP=127.0.0.1
MSC_PC="0.23.1"
diff --git a/net/templates/mobile.cfg b/net/templates/mobile.cfg
new file mode 100644
index 0000000..52980c3
--- /dev/null
+++ b/net/templates/mobile.cfg
@@ -0,0 +1,66 @@
+!
+! OsmocomBB example configuration for mobile application
+!!
+!
+line vty
+ no login
+!
+gps device /dev/ttyACM0
+gps baudrate default
+no gps enable
+!
+no hide-default
+!
+ms 1
+ layer2-socket ${BTS_TRX_SOCKET}
+ sap-socket /tmp/osmocom_sap
+ sim test
+ network-selection-mode manual
+ imei 000000000000000 0
+ imei-fixed
+ no emergency-imsi
+ no sms-service-center
+ no call-waiting
+ no auto-answer
+ no force-rekey
+ no clip
+ no clir
+ tx-power auto
+ no simulated-delay
+ no stick
+ location-updating
+ neighbour-measurement
+ codec full-speed prefer
+ codec half-speed
+ no abbrev
+ support
+ sms
+ a5/1
+ a5/2
+ p-gsm
+ e-gsm
+ r-gsm
+ gsm-450
+ gsm-480
+ gsm-850
+ dcs
+ pcs
+ class-900 4
+ class-850 4
+ class-dcs 1
+ class-pcs 1
+ channel-capability sdcch+tchf+tchh
+ full-speech-v1
+ full-speech-v2
+ full-speech-v3
+ half-speech-v1
+ half-speech-v3
+ min-rxlev -106
+ dsc-max 90
+ no skip-max-per-band
+ test-sim
+ imsi 001010000000000
+ ki comp128 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ no barred-access
+ rplmn ${MCC} ${MNC}
+ no shutdown
diff --git a/net/templates/osmo-bts.cfg b/net/templates/osmo-bts.cfg
new file mode 100644
index 0000000..3d9bf0e
--- /dev/null
+++ b/net/templates/osmo-bts.cfg
@@ -0,0 +1,34 @@
+!
+! OsmoBTS () configuration saved from vty
+!!
+!
+log stderr
+ logging color 1
+ logging timestamp 0
+ logging level rsl notice
+ logging level oml notice
+ logging level rll notice
+ logging level rr notice
+ logging level meas error
+ logging level pag error
+ logging level l1c error
+ logging level l1p error
+ logging level dsp error
+ logging level abis error
+!
+line vty
+ no login
+!
+phy 0
+ instance 0
+ osmotrx rx-gain 1
+ osmotrx ip local ${BTS_TRX_IP}
+ osmotrx ip remote ${BTS_TRX_IP}
+bts 0
+ band 1800
+ ipa unit-id ${BTS_TRX_IPA_UNIT}
+ oml remote-ip ${BTS_TRX_IP_OML}
+ gsmtap-sapi ccch
+ gsmtap-sapi pdtch
+ trx 0
+ phy 0 instance 0
diff --git a/net/templates/run.sh b/net/templates/run.sh
index a01a902..3bbb65e 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -59,7 +59,11 @@ term() {
if [ -z "$title" ]; then
title="$(basename $@)"
fi
- exec $terminal -title "CN:$title" -e sh -c "export LD_LIBRARY_PATH='/usr/local/lib'; $1; echo; while true; do echo 'q Enter to close'; read q_to_close; if [ \"x\$q_to_close\" = xq ]; then break; fi; done"
+ prefix="$3"
+ if [ -z "$prefix" ]; then
+ prefix="CN"
+ fi
+ exec $terminal -title "$prefix:$title" -e sh -c "export LD_LIBRARY_PATH='/usr/local/lib'; $1; echo; while true; do echo 'q Enter to close'; read q_to_close; if [ \"x\$q_to_close\" = xq ]; then break; fi; done"
}
find_term
@@ -82,6 +86,10 @@ mgw4bsc="osmo-mgw -c osmo-mgw-for-bsc.cfg"
hlr="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-hlr --db-upgrade"
stp="osmo-stp"
bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc -c osmo-bsc.cfg"
+btstrx="osmo-bts-trx"
+faketrx="../../src/osmocom-bb/src/target/trx_toolkit/fake_trx.py"
+trxcon="trxcon -s ${BTS_TRX_SOCKET}"
+mobile="mobile -c mobile.cfg"
if [ "x${MSC_MNCC}" != "xinternal" ]; then
sipcon="osmo-sip-connector -c osmo-sip-connector.cfg"
@@ -135,6 +143,15 @@ term "$hnbgw" HNBGW &
sleep .2
term "$bsc" BSC &
+sleep 2
+term "$btstrx" BTS-TRX "AN" &
+sleep .2
+term "$faketrx" FAKETRX "MS" &
+sleep .2
+term "$trxcon" TRXCON "MS" &
+sleep .2
+term "$mobile" MOBILE "MS" &
+
if [ "x${MSC_MNCC}" != "xinternal" ]; then
sleep .2
term "$sipcon" SIPCON &
@@ -154,7 +171,7 @@ echo Closing...
#ssh bts neels/stop_remote.sh
-kill %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14
+kill %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17
killall osmo-msc
killall osmo-bsc
killall osmo-gbproxy
@@ -165,6 +182,10 @@ killall osmo-hlr
killall -9 osmo-stp
sudo killall tcpdump
killall osmo-ggsn
+killall osmo-bts-trx
+killall fake_trx.py
+killall trxcon
+killall -9 mobile
if [ "x${MSC_MNCC}" != "xinternal" ]; then
killall osmo-sip-connector