Change in osmocom-bb[master]: trx_toolkit/trx_sniff.py: add options to filter bursts by RSSI

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
Mon Mar 30 18:23:05 UTC 2020


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17675 )

Change subject: trx_toolkit/trx_sniff.py: add options to filter bursts by RSSI
......................................................................

trx_toolkit/trx_sniff.py: add options to filter bursts by RSSI

Change-Id: I16dd29d2f1e14e634029195599fa49a9be9219ab
---
M src/target/trx_toolkit/trx_sniff.py
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/src/target/trx_toolkit/trx_sniff.py b/src/target/trx_toolkit/trx_sniff.py
index 1417664..0cb62d3 100755
--- a/src/target/trx_toolkit/trx_sniff.py
+++ b/src/target/trx_toolkit/trx_sniff.py
@@ -164,6 +164,14 @@
 			if not self.argv.pf_nope_ind and msg.nope_ind:
 				return False
 
+			# RSSI filter
+			if self.argv.pf_rssi_min is not None:
+				if msg.rssi < self.argv.pf_rssi_min:
+					return False
+			if self.argv.pf_rssi_max is not None:
+				if msg.rssi > self.argv.pf_rssi_max:
+					return False
+
 		# Burst passed ;)
 		return True
 
@@ -267,6 +275,12 @@
 		pf_group.add_argument("--no-nope-ind",
 			dest = "pf_nope_ind", action = "store_false",
 			help = "Ignore NOPE.ind (NOPE / IDLE indications)")
+		pf_group.add_argument("--rssi-min", metavar = "RSSI",
+			dest = "pf_rssi_min", type = int,
+			help = "Minimum RSSI value (e.g. -75)")
+		pf_group.add_argument("--rssi-max", metavar = "RSSI",
+			dest = "pf_rssi_max", type = int,
+			help = "Maximum RSSI value (e.g. -50)")
 
 		return parser.parse_args()
 

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I16dd29d2f1e14e634029195599fa49a9be9219ab
Gerrit-Change-Number: 17675
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
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/20200330/4e04336d/attachment.htm>


More information about the gerrit-log mailing list