Change in gr-gsm[master]: trx/radio_if.py: do not init both rx_freq and tx_freq

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

Piotr Krysik gerrit-no-reply at lists.osmocom.org
Tue Feb 5 12:10:34 UTC 2019


Piotr Krysik has submitted this change and it was merged. ( https://gerrit.osmocom.org/12632 )

Change subject: trx/radio_if.py: do not init both rx_freq and tx_freq
......................................................................

trx/radio_if.py: do not init both rx_freq and tx_freq

Change-Id: I9f251958ec90141d144fdb027aff20182131a1d1
---
M python/trx/radio_if.py
1 file changed, 11 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, but someone else must approve
  Piotr Krysik: Looks good to me, approved; Verified



diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py
index 32b767a..93080c4 100644
--- a/python/trx/radio_if.py
+++ b/python/trx/radio_if.py
@@ -4,7 +4,7 @@
 # GR-GSM based transceiver
 # Follow graph implementation
 #
-# (C) 2016-2018 by Vadim Yanitskiy <axilirator at gmail.com>
+# (C) 2016-2019 by Vadim Yanitskiy <axilirator at gmail.com>
 # (C) 2017      by Piotr Krysik <ptrkrysik at gmail.com>
 #
 # All Rights Reserved
@@ -43,8 +43,8 @@
 
 class RadioInterface(gr.top_block):
 	# PHY specific variables
-	rx_freq = 935e6
-	tx_freq = 890e6
+	rx_freq = None
+	tx_freq = None
 	osr = 4
 
 	# Application state flags
@@ -65,6 +65,10 @@
 	# The current value is measured for USRP B2X0 at 26e6.
 	delay_correction = (285.616 + 2 * GSM_SYM_PERIOD_uS) * 1e-6
 
+	# Dummy freq. value that is used during initialization
+	# basically, the DL freq. of ARFCN 0
+	DUMMY_FREQ = 935e6
+
 	def __init__(self, phy_args, phy_sample_rate,
 			phy_rx_gain, phy_tx_gain, phy_ppm,
 			phy_rx_antenna, phy_tx_antenna,
@@ -95,7 +99,6 @@
 				channels=range(1)))
 
 		self.phy_src.set_clock_rate(26e6, uhd.ALL_MBOARDS)
-		self.phy_src.set_center_freq(self.rx_freq, 0)
 		self.phy_src.set_antenna(phy_rx_antenna, 0)
 		self.phy_src.set_samp_rate(phy_sample_rate)
 		self.phy_src.set_bandwidth(650e3, 0)
@@ -103,8 +106,7 @@
 
 		self.msg_to_tag_src = grgsm.msg_to_tag()
 
-		self.rotator_src = grgsm.controlled_rotator_cc(
-			self.calc_phase_inc(self.rx_freq))
+		self.rotator_src = grgsm.controlled_rotator_cc(0.0)
 
 		self.lpf = filter.fir_filter_ccf(1, firdes.low_pass(
 			1, phy_sample_rate, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))
@@ -148,7 +150,6 @@
 		self.phy_sink.set_clock_rate(26e6, uhd.ALL_MBOARDS)
 		self.phy_sink.set_antenna(phy_tx_antenna, 0)
 		self.phy_sink.set_samp_rate(phy_sample_rate)
-		self.phy_sink.set_center_freq(self.tx_freq, 0)
 		self.phy_sink.set_gain(self.tx_gain)
 
 		self.tx_time_setter = grgsm.txtime_setter(
@@ -169,8 +170,7 @@
 
 		self.msg_to_tag_sink = grgsm.msg_to_tag()
 
-		self.rotator_sink = grgsm.controlled_rotator_cc(
-			-self.calc_phase_inc(self.tx_freq))
+		self.rotator_sink = grgsm.controlled_rotator_cc(0.0)
 
 		# Connections
 		self.msg_connect(
@@ -225,8 +225,9 @@
 
 
 		# AFC (Automatic Frequency Correction)
+		# NOTE: dummy frequency is used during init
 		self.gsm_clck_ctrl = grgsm.clock_offset_control(
-			self.rx_freq, phy_sample_rate, osr = self.osr)
+			self.DUMMY_FREQ, phy_sample_rate, osr = self.osr)
 
 		self.dict_toggle_sign = dict_toggle_sign()
 

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

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9f251958ec90141d144fdb027aff20182131a1d1
Gerrit-Change-Number: 12632
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Piotr Krysik <ptrkrysik at gmail.com>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190205/0da58354/attachment.htm>


More information about the gerrit-log mailing list