Change in ...osmocom-bb[master]: trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 24 14:16:18 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14586


Change subject: trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation
......................................................................

trx_toolkit/fake_trx.py: introduce a TRXC command for C/I simulation

Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff
---
M src/target/trx_toolkit/fake_trx.py
1 file changed, 28 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/14586/1

diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py
index 12bcb80..641dd07 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -63,8 +63,15 @@
 	      from (rssi_base - rssi_rand_threshold)
 	        to (rssi_base + rssi_rand_threshold).
 
-	Please note that randomization of both RSSI and ToA is optional,
-	and can be enabled from the control interface.
+	  - C/I (Carrier-to-Interference ratio) - value in dB, computed from
+	    the training sequence of each received burst, by comparing the
+	    "ideal" training sequence with the actual one. A pair of both
+	    base and threshold values defines a range of C/I randomization:
+
+	      from (ci_base - ci_rand_threshold)
+	        to (ci_base + ci_rand_threshold).
+
+	Please note that the randomization is optional and disabled by default.
 
 	== Timing Advance handling
 
@@ -250,6 +257,25 @@
 			self.rssi_base += int(request[1])
 			return 0
 
+		# C/I simulation
+		# Absolute form: CMD FAKE_CI <BASE> <THRESH>
+		elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 2):
+			log.debug("(%s) Recv FAKE_CI cmd" % self)
+
+			# Parse and apply both base and threshold
+			self.ci_base = int(request[1])
+			self.ci_rand_threshold = int(request[2])
+			return 0
+
+		# C/I simulation
+		# Relative form: CMD FAKE_CI <+-BASE_DELTA>
+		elif self.ctrl_if.verify_cmd(request, "FAKE_CI", 1):
+			log.debug("(%s) Recv FAKE_CI cmd" % self)
+
+			# Parse and apply delta
+			self.ci_base += int(request[1])
+			return 0
+
 		# Path loss simulation: burst dropping
 		# Syntax: CMD FAKE_DROP <AMOUNT>
 		# Dropping pattern: fn % 1 == 0

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7080effbbc1022d1884c6d6f0cb580eba8e514ff
Gerrit-Change-Number: 14586
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190624/540ce9ab/attachment.html>


More information about the gerrit-log mailing list