Change in osmo-trx[master]: add hidden fn adjustment command

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

Hoernchen gerrit-no-reply at lists.osmocom.org
Wed May 5 18:10:03 UTC 2021


Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/24147 )

Change subject: add hidden fn adjustment command
......................................................................

add hidden fn adjustment command

This is only useful if the rf path delays the signal by at least one
frame, and therefore a fairly experimental command that might be removed
or reworked in the future and should not be relied upon.

Change-Id: I29964acffad5bad4f5bcad7f631e435a72979c46
---
M CommonLibs/config_defs.h
M CommonLibs/trx_vty.c
M Transceiver52M/Transceiver.cpp
3 files changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/CommonLibs/config_defs.h b/CommonLibs/config_defs.h
index 17352c3..33be73f 100644
--- a/CommonLibs/config_defs.h
+++ b/CommonLibs/config_defs.h
@@ -48,6 +48,7 @@
 	double offset;
 	double freq_offset_khz;
 	double rssi_offset;
+	int ul_fn_offset;
 	bool force_rssi_offset; /* Force value set in VTY? */
 	bool swap_channels;
 	bool ext_rach;
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index d1da450..30f55c8 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -271,6 +271,20 @@
 	return CMD_SUCCESS;
 }
 
+
+DEFUN_ATTR(cfg_ul_fn_offset, cfg_ul_fn_offset_cmd,
+	"ul-fn-offset <-10-10>",
+	"Adjusts the uplink frame FN by the specified amount\n"
+	"Frame Number offset\n",
+	CMD_ATTR_HIDDEN)
+{
+	struct trx_ctx *trx = trx_from_vty(vty);
+
+	trx->cfg.ul_fn_offset = atoi(argv[0]);
+
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_swap_channels, cfg_swap_channels_cmd,
 	"swap-channels (disable|enable)",
 	"Swap primary and secondary channels of the PHY (if any)\n"
@@ -624,6 +638,8 @@
 		vty_out(vty, " filler access-burst-delay %u%s", trx->cfg.rach_delay, VTY_NEWLINE);
 	if (trx->cfg.stack_size != 0)
 		vty_out(vty, " stack-size %u%s", trx->cfg.stack_size, VTY_NEWLINE);
+	if (trx->cfg.ul_fn_offset != 0)
+		vty_out(vty, " ul-fn-offset %u%s", trx->cfg.ul_fn_offset, VTY_NEWLINE);
 	trx_rate_ctr_threshold_write_config(vty, " ");
 
 	for (i = 0; i < trx->cfg.num_chans; i++) {
@@ -787,6 +803,7 @@
 	install_element(TRX_NODE, &cfg_stack_size_cmd);
 
 	install_element(TRX_NODE, &cfg_chan_cmd);
+	install_element(TRX_NODE, &cfg_ul_fn_offset_cmd);
 	install_node(&chan_node, dummy_config_write);
 	install_element(CHAN_NODE, &cfg_chan_rx_path_cmd);
 	install_element(CHAN_NODE, &cfg_chan_tx_path_cmd);
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 91f06ec..9e7bd5a 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -649,7 +649,7 @@
   }
 
   /* Set time and determine correlation type */
-  burstTime = radio_burst->getTime();
+  burstTime = radio_burst->getTime() + cfg->ul_fn_offset;
   CorrType type = expectedCorrType(burstTime, chan);
 
   /* Initialize struct bi */

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I29964acffad5bad4f5bcad7f631e435a72979c46
Gerrit-Change-Number: 24147
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20210505/8da30280/attachment.htm>


More information about the gerrit-log mailing list