Change in osmo-gsm-tester[master]: osmo-bts-trx: Add multiTRX support

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Sep 18 11:29:13 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/11000 )

Change subject: osmo-bts-trx: Add multiTRX support
......................................................................

osmo-bts-trx: Add multiTRX support

Support is limited to 1 osmo-trx with 1 phy and multiple instances.

Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
---
M example/defaults.conf
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
3 files changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/example/defaults.conf b/example/defaults.conf
index fc4c324..7ad5e1f 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -76,6 +76,9 @@
     - phys_chan_config: TCH/F # nanobts only supports PDCH in TRX0.
     - phys_chan_config: TCH/F
 
+osmo_bts_trx:
+  max_trx: 2
+
 osmo_trx:
   type: uhd
   launch_trx: true
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py
index 1c7349f..a4bc082 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -77,7 +77,7 @@
                             'osmo_trx': {
                                 'bts_ip': self.remote_addr(),
                                 'trx_ip': self.trx_remote_ip(),
-                                'channels': [{}] # TODO: implement channels for multiTRX
+                                'channels': [{} for trx_i in range(self.num_trx())]
                             }
                         }
         })
@@ -134,7 +134,8 @@
 
         self.proc_bts = self.launch_process(keepalive, OsmoBtsTrx.BIN_BTS_TRX, '-r', '1',
                             '-c', os.path.abspath(self.config_file),
-                            '-i', self.bsc.addr())
+                            '-i', self.bsc.addr(),
+                            '-t', str(self.num_trx()))
         self.suite_run.poll()
 
 class OsmoTrx(log.Origin, metaclass=ABCMeta):
diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
index 5dba323..677b047 100644
--- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
@@ -23,9 +23,11 @@
 phy 0
  osmotrx ip local ${osmo_bts_trx.osmo_trx.bts_ip}
  osmotrx ip remote ${osmo_bts_trx.osmo_trx.trx_ip}
- instance 0
+%for chan in osmo_bts_trx.osmo_trx.channels:
+ instance ${loop.index}
   osmotrx rx-gain 25
   osmotrx tx-attenuation oml
+%endfor
 bts 0
  band ${osmo_bts_trx.band}
  ipa unit-id ${osmo_bts_trx.ipa_unit_id} 0
@@ -44,5 +46,7 @@
  gsmtap-sapi ptcch
  gsmtap-sapi cbch
  gsmtap-sapi sacch
- trx 0
-  phy 0 instance 0
+%for chan in osmo_bts_trx.osmo_trx.channels:
+ trx ${loop.index}
+  phy 0 instance ${loop.index}
+%endfor

-- 
To view, visit https://gerrit.osmocom.org/11000
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
Gerrit-Change-Number: 11000
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180918/3192ef46/attachment.htm>


More information about the gerrit-log mailing list