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

laforge gerrit-no-reply at lists.osmocom.org
Wed Nov 20 15:05:58 UTC 2019


laforge has submitted this change. ( 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, 25 insertions(+), 7 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py
index f0dc5a5..f14d143 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -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 != 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: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191120/d937b581/attachment.htm>


More information about the gerrit-log mailing list