Add support to enable EGPRS
Change-Id: I682f0c1b4cb97b704d646f18f54e748baaefd677
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py
index 86afeec..0c941e0 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -77,6 +77,7 @@
'osmo_trx': {
'bts_ip': self.remote_addr(),
'trx_ip': self.trx_remote_ip(),
+ 'egprs': 'enable' if self.conf_for_bsc()['gprs_mode'] == 'egprs' else 'disable',
'channels': [{} for trx_i in range(self.num_trx())]
}
}
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 3f2ddc7..6898926 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -57,6 +57,7 @@
'bts[].direct_pcu': schema.BOOL_STR,
'bts[].ciphers[]': schema.CIPHER,
'bts[].channel_allocator': schema.CHAN_ALLOCATOR,
+ 'bts[].gprs_mode': schema.GPRS_MODE,
'bts[].num_trx': schema.UINT,
'bts[].max_trx': schema.UINT,
'bts[].trx_list[].addr': schema.IPV4,
diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py
index 12cfd7a..14fe640 100644
--- a/src/osmo_gsm_tester/schema.py
+++ b/src/osmo_gsm_tester/schema.py
@@ -110,6 +110,11 @@
return
raise ValueError('Unknown Channel Allocator Policy %r' % val)
+def gprs_mode(val):
+ if val in ('none', 'gprs', 'egprs'):
+ return
+ raise ValueError('Unknown GPRS mode %r' % val)
+
def codec(val):
if val in ('hr1', 'hr2', 'hr3', 'fr1', 'fr2', 'fr3'):
return
@@ -136,6 +141,7 @@
MODEM_FEATURE = 'modem_feature'
PHY_CHAN = 'chan'
CHAN_ALLOCATOR = 'chan_allocator'
+GPRS_MODE = 'gprs_mode'
CODEC = 'codec'
OSMO_TRX_CLOCK_REF = 'osmo_trx_clock_ref'
@@ -156,6 +162,7 @@
MODEM_FEATURE: modem_feature,
PHY_CHAN: phy_channel_config,
CHAN_ALLOCATOR: channel_allocator,
+ GPRS_MODE: gprs_mode,
CODEC: codec,
OSMO_TRX_CLOCK_REF: osmo_trx_clock_ref,
}
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 0d53ccb..4f39f79 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -57,8 +57,8 @@
% endif
ip.access unit_id ${bts.ipa_unit_id} 0
oml ip.access stream_id ${bts.stream_id} line 0
-% if bts.get('sgsn', False):
- gprs mode gprs
+% if bts.get('sgsn', False) and bts['gprs_mode'] != 'none':
+ gprs mode ${bts.gprs_mode}
gprs routing area ${bts.routing_area_code}
gprs network-control-order nc1
gprs cell bvci ${bts.bvci}
diff --git a/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
index e7f2fb8..ede1902 100644
--- a/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
@@ -18,7 +18,7 @@
bind-ip ${osmo_trx.trx_ip}
remote-ip ${osmo_trx.bts_ip}
base-port 5700
- egprs disable
+ egprs ${osmo_trx.egprs}
%if osmo_trx.get('multi_arfcn', False):
multi-arfcn enable
%else: