srs_andre has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24042 )


Change subject: ms_amarisoft: extend AmariUE to support custom frequency bands
......................................................................

ms_amarisoft: extend AmariUE to support custom frequency bands

this patch adds generic support for custom frequency bands to the ms class.
it then extends the config template for AmariUE to use them.
we set the default values for EARFCNs for DL/UL to the old values.

Change-Id: I7b2250e13fc1161be1a1d73a4348f07b31c0f724
---
M src/osmo_gsm_tester/obj/ms.py
M src/osmo_gsm_tester/obj/ms_amarisoft.py
M src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl
M sysmocom/defaults.conf
4 files changed, 35 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/42/24042/1

diff --git a/src/osmo_gsm_tester/obj/ms.py b/src/osmo_gsm_tester/obj/ms.py
index cd4a8a1..93226a8 100644
--- a/src/osmo_gsm_tester/obj/ms.py
+++ b/src/osmo_gsm_tester/obj/ms.py
@@ -32,7 +32,16 @@
         'auth_algo': schema.AUTH_ALGO,
         'apn_ipaddr': schema.IPV4,
         'ciphers[]': schema.CIPHER_2G,
-        'features[]': schema.MODEM_FEATURE
+        'features[]': schema.MODEM_FEATURE,
+        'dl_earfcn': schema.UINT,
+        'ul_earfcn': schema.UINT,
+        'custom_band_list[].number': schema.UINT,
+        'custom_band_list[].dl_earfcn_min': schema.UINT,
+        'custom_band_list[].dl_earfcn_max': schema.UINT,
+        'custom_band_list[].dl_freq_min': schema.UINT,
+        'custom_band_list[].ul_freq_min': schema.UINT,
+        'custom_band_list[].ul_earfcn_min': schema.UINT,
+        'custom_band_list[].ul_earfcn_max': schema.UINT,
         }
     schema.register_resource_schema('modem', resource_schema)

diff --git a/src/osmo_gsm_tester/obj/ms_amarisoft.py 
b/src/osmo_gsm_tester/obj/ms_amarisoft.py
index 9b6d64a..601d539 100644
--- a/src/osmo_gsm_tester/obj/ms_amarisoft.py
+++ b/src/osmo_gsm_tester/obj/ms_amarisoft.py
@@ -27,7 +27,9 @@
 from .ms import MS

 def on_register_schemas():
-    resource_schema = {}
+    resource_schema = {
+        'use_custom_band255': schema.BOOL_STR
+        }
     for key, val in RunNode.schema().items():
         resource_schema['run_node.%s' % key] = val
     schema.register_resource_schema('modem', resource_schema)
@@ -245,6 +247,9 @@
         config.overlay(values, dict(ue=dict(log_filename=logfile,
                                             ifup_filename=ifupfile)))

+        # Convert to Python bool and overlay config
+        config.overlay(values, dict(ue={'use_custom_band255': 
util.str2bool(values['ue'].get('use_custom_band255', 'false'))}))
+
         # We need to set some specific variables programatically here to match 
IP addresses:
         if self._conf.get('rf_dev_type') == 'zmq':
             base_srate = num_prb2base_srate(self.enb.num_prb())
diff --git a/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl 
b/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl
index 6f38491..f9b2933 100644
--- a/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl
@@ -30,9 +30,24 @@
      allow dynamic UE creation from remote API */
   multi_ue: true,

+  custom_freq_band: [
+%for band in ue.custom_band_list:
+    {
+      band: ${band.number},
+      dl_earfcn_min: ${band.dl_earfcn_min},
+      dl_earfcn_max: ${band.dl_earfcn_max},
+      dl_freq_min: ${band.dl_freq_min},
+      ul_freq_min: ${band.ul_freq_min},
+      ul_earfcn_min: ${band.ul_earfcn_min},
+      ul_earfcn_max: ${band.ul_earfcn_max},
+    },
+%endfor
+  ],
+
   cells: [
     {
-      dl_earfcn: 2850,
+      dl_earfcn: ${ue.dl_earfcn},
+      ul_earfcn: ${ue.ul_earfcn},
       n_antenna_dl: 1,
       n_antenna_ul: 1,

diff --git a/sysmocom/defaults.conf b/sysmocom/defaults.conf
index 39b81a8..8bbae42 100644
--- a/sysmocom/defaults.conf
+++ b/sysmocom/defaults.conf
@@ -192,6 +192,9 @@
   tx_gain: 89
   rx_gain: 60
   rf_dev_sync: none
+  custom_band_list: []
+  dl_earfcn: 2850
+  ul_earfcn: 20850

 iperf3cli:
   time: 60

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24042
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I7b2250e13fc1161be1a1d73a4348f07b31c0f724
Gerrit-Change-Number: 24042
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <an...@softwareradiosystems.com>
Gerrit-MessageType: newchange

Reply via email to