Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Nov 17 15:37:51 UTC 2019


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


Change subject: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation
......................................................................

trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation

Since TRXD header version 1, we should send NOPE indications to the
L1 side in absence of TRX2L1 bursts, and IDLE indications during
IDLE TDMA frames (basically noise measurements).

This change is the first step towards the goal: if a given burst
is to be dropped due to the path loss simulation (see FAKE_DROP),
mark the carrier TRX2L1 message as NOPE.ind and send anyway.

Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c
Related: OS#3428, OS#2975
---
M src/target/trx_toolkit/fake_trx.py
1 file changed, 27 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/92/16092/1

diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py
index 5153722..50111bf 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -4,7 +4,7 @@
 # TRX Toolkit
 # Virtual Um-interface (fake transceiver)
 #
-# (C) 2017-2018 by Vadim Yanitskiy <axilirator at gmail.com>
+# (C) 2017-2019 by Vadim Yanitskiy <axilirator at gmail.com>
 #
 # All Rights Reserved
 #
@@ -22,7 +22,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy <axilirator at gmail.com>")]
+APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy <axilirator at gmail.com>")]
 
 import logging as log
 import signal
@@ -110,6 +110,11 @@
 	RSSI_BASE_DEFAULT = -60
 	CI_BASE_DEFAULT = 90
 
+	# Default values for NOPE / IDLE indications
+	TOA256_NOISE_DEFAULT = 0
+	RSSI_NOISE_DEFAULT = -110
+	CI_NOISE_DEFAULT = -30
+
 	def __init__(self, *trx_args, **trx_kwargs):
 		Transceiver.__init__(self, *trx_args, **trx_kwargs)
 
@@ -177,9 +182,6 @@
 		return False
 
 	def _handle_data_msg_v1(self, src_msg, msg):
-		# TODO: NOPE indications are not (yet) supported
-		msg.nope_ind = False
-
 		# C/I (Carrier-to-Interference ratio)
 		msg.ci = self.ci
 
@@ -200,6 +202,26 @@
 	# simulates RF path parameters (such as RSSI),
 	# and sends towards the L1
 	def handle_data_msg(self, src_trx, src_msg, msg):
+		# Path loss simulation
+		msg.nope_ind = self.sim_burst_drop(msg)
+		if msg.nope_ind:
+			# Before TRXDv1, we simply drop the message
+			if msg.ver < 0x01:
+				del msg
+				return
+
+			# Since TRXDv1, we should send a NOPE.ind
+			del msg.burst # burst bits are omited
+			msg.burst = None
+
+			# TODO: shoud we make these values configurable?
+			msg.toa256 = self.TOA256_NOISE_DEFAULT
+			msg.rssi = self.RSSI_NOISE_DEFAULT
+			msg.ci = self.CI_NOISE_DEFAULT
+
+			self.data_if.send_msg(msg)
+			return
+
 		# Complete message header
 		msg.toa256 = self.toa256
 		msg.rssi = self.rssi
@@ -212,10 +234,6 @@
 		if src_trx.ta is not 0:
 			msg.toa256 -= src_trx.ta * 256
 
-		# Path loss simulation
-		if self.sim_burst_drop(msg):
-			return
-
 		# TODO: make legacy mode configurable (via argv?)
 		self.data_if.send_msg(msg, legacy = True)
 

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c
Gerrit-Change-Number: 16092
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/20191117/7ddccf5b/attachment.htm>


More information about the gerrit-log mailing list