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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/19839 )
Change subject: fake_trx: Implement RFMUTE TRXC cmd
......................................................................
fake_trx: Implement RFMUTE TRXC cmd
Change-Id: I67d16858cd70cb0527c1da77bd3787d5e53100b4
---
M src/target/trx_toolkit/burst_fwd.py
M src/target/trx_toolkit/ctrl_if_trx.py
M src/target/trx_toolkit/data_msg.py
M src/target/trx_toolkit/fake_trx.py
4 files changed, 20 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py
index dbaded6..0b69fe2 100644
--- a/src/target/trx_toolkit/burst_fwd.py
+++ b/src/target/trx_toolkit/burst_fwd.py
@@ -50,6 +50,10 @@
# so let's precalculate its Tx frequency in advance
tx_freq = src_trx.get_tx_freq(rx_msg.fn)
+ if src_trx.rf_muted:
+ del rx_msg.burst # burst bits are omited
+ rx_msg.burst = None
+
# Iterate over all known transceivers
for trx in self.trx_list:
if trx == src_trx:
diff --git a/src/target/trx_toolkit/ctrl_if_trx.py b/src/target/trx_toolkit/ctrl_if_trx.py
index 0e5106a..ea08e7e 100644
--- a/src/target/trx_toolkit/ctrl_if_trx.py
+++ b/src/target/trx_toolkit/ctrl_if_trx.py
@@ -251,6 +251,13 @@
log.debug("(%s) Recv NOMTXPOWER cmd" % self.trx)
return (0, [str(self.trx.tx_power_base)])
+ # Lock/Unlock RF emission+reception
+ if self.verify_cmd(request, "RFMUTE", 1):
+ log.debug("(%s) Recv RFMUTE cmd" % self.trx)
+ # Parse the requested RFMUTE state (1=locked, 0=unlocked)
+ self.trx.rf_muted = int(request[1]) > 0
+ return 0
+
# Wrong / unknown command
else:
# We don't care about other commands,
diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py
index 88376ed..86670fc 100644
--- a/src/target/trx_toolkit/data_msg.py
+++ b/src/target/trx_toolkit/data_msg.py
@@ -413,6 +413,8 @@
# Convert burst bits
if self.burst is not None:
msg.burst = self.ubit2sbit(self.burst)
+ else:
+ msg.nope_ind = True
return msg
diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py
index ded8dc4..6f46473 100755
--- a/src/target/trx_toolkit/fake_trx.py
+++ b/src/target/trx_toolkit/fake_trx.py
@@ -125,6 +125,8 @@
# When disabled, RSSI is calculated based on Tx power and Rx path loss
self.fake_rssi_enabled = False
+ self.rf_muted = False
+
# Actual ToA, RSSI, C/I, TA values
self.tx_power_base = self.NOMINAL_TX_POWER_DEFAULT
self.tx_att_base = self.TX_ATT_DEFAULT
@@ -215,8 +217,11 @@
# 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 self.rf_muted:
+ msg.nope_ind = True
+ elif not msg.nope_ind:
+ # 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:
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/19839
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I67d16858cd70cb0527c1da77bd3787d5e53100b4
Gerrit-Change-Number: 19839
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20200901/12d0b21c/attachment.htm>