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/.
Alexander Chemeris gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/1246
to look at the new patch set (#2).
trx: Add "maxdlynb" VTY command to control max TA for Normal Bursts.
Originally `maxdly` command in osmo-trx was contrlling max TA for Normal Bursts.
This was not a proper behaviour, because it was used to "control maximum
distance a handset can attach from" which is controlled by Access Bursts max TA.
Osmo-trx was corrected to apply `maxdly` to Access Bursts and a new command was
introduced to contrl max TA for Normal Bursts - `maxdlynb`. This patch adds
support for this configuration command into osmo-bts-trx.
If you wonder why would you need that - some test equipment (namely R&S CMD57)
has really bad timing sync and can generate signal a few symbols off. That
prevents osmo-trx from properly receiving otherwise perfectly good bursts
generated by CMD57. This configuration is a solution for this.
Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
---
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/l1_if.h
M src/osmo-bts-trx/trx_if.c
M src/osmo-bts-trx/trx_if.h
M src/osmo-bts-trx/trx_vty.c
5 files changed, 68 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1246/2
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index ea2088b..202a05e 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -197,6 +197,10 @@
trx_if_cmd_setmaxdly(l1h, l1h->config.maxdly);
l1h->config.maxdly_sent = 1;
}
+ if (l1h->config.maxdlynb_valid && !l1h->config.maxdlynb_sent) {
+ trx_if_cmd_setmaxdlynb(l1h, l1h->config.maxdlynb);
+ l1h->config.maxdlynb_sent = 1;
+ }
for (tn = 0; tn < TRX_NR_TS; tn++) {
if (l1h->config.slottype_valid[tn]
@@ -217,6 +221,7 @@
plink->u.osmotrx.power_sent = 0;
}
l1h->config.maxdly_sent = 0;
+ l1h->config.maxdlynb_sent = 0;
for (tn = 0; tn < TRX_NR_TS; tn++)
l1h->config.slottype_sent[tn] = 0;
}
diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h
index 187303c..f0b2e67 100644
--- a/src/osmo-bts-trx/l1_if.h
+++ b/src/osmo-bts-trx/l1_if.h
@@ -24,6 +24,10 @@
int maxdly;
int maxdly_sent;
+ int maxdlynb_valid;
+ int maxdlynb;
+ int maxdlynb_sent;
+
uint8_t slotmask;
int slottype_valid[TRX_NR_TS];
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 42d383c..989e77a 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -281,6 +281,11 @@
return trx_ctrl_cmd(l1h, 0, "SETMAXDLY", "%d", dly);
}
+int trx_if_cmd_setmaxdlynb(struct trx_l1h *l1h, int dly)
+{
+ return trx_ctrl_cmd(l1h, 0, "SETMAXDLYNB", "%d", dly);
+}
+
int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type)
{
return trx_ctrl_cmd(l1h, 1, "SETSLOT", "%d %d", tn, type);
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h
index 8659c4a..fdc8a8d 100644
--- a/src/osmo-bts-trx/trx_if.h
+++ b/src/osmo-bts-trx/trx_if.h
@@ -22,6 +22,7 @@
int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db);
int trx_if_cmd_setpower(struct trx_l1h *l1h, int db);
int trx_if_cmd_setmaxdly(struct trx_l1h *l1h, int dly);
+int trx_if_cmd_setmaxdlynb(struct trx_l1h *l1h, int dly);
int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type);
int trx_if_cmd_rxtune(struct trx_l1h *l1h, uint16_t arfcn);
int trx_if_cmd_txtune(struct trx_l1h *l1h, uint16_t arfcn);
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 3aec8ba..ca347e8 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -105,6 +105,11 @@
VTY_NEWLINE);
else
vty_out(vty, " maxdly : undefined%s", VTY_NEWLINE);
+ if (l1h->config.maxdlynb_valid)
+ vty_out(vty, " maxdlynb : %d%s", l1h->config.maxdlynb,
+ VTY_NEWLINE);
+ else
+ vty_out(vty, " maxdlynb : undefined%s", VTY_NEWLINE);
for (tn = 0; tn < TRX_NR_TS; tn++) {
if (!((1 << tn) & l1h->config.slotmask))
vty_out(vty, " slot #%d: unsupported%s", tn,
@@ -239,7 +244,13 @@
DEFUN(cfg_phyinst_maxdly, cfg_phyinst_maxdly_cmd,
"osmotrx maxdly <0-31>",
- "Set the maximum delay of GSM symbols\n"
+ "Set the maximum acceptable delay of an Access Burst (in GSM symbols)."
+ " Access Burst is the first burst a mobile transmits in order to establish"
+ " a connection and it is used to estimate Timing Advance (TA) which is"
+ " then applied to Normal Bursts to compensate for signal delay due to"
+ " distance. So changing this setting effectively changes maximum range of"
+ " the cell, because if we receive an Access Burst with a delay higher than"
+ " this value, it will be ignored and connection is dropped.\n"
"GSM symbols (approx. 1.1km per symbol)\n")
{
struct phy_instance *pinst = vty->index;
@@ -248,6 +259,31 @@
l1h->config.maxdly = atoi(argv[0]);
l1h->config.maxdly_valid = 1;
l1h->config.maxdly_sent = 0;
+ l1if_provision_transceiver_trx(l1h);
+
+ return CMD_SUCCESS;
+}
+
+
+DEFUN(cfg_phyinst_maxdlynb, cfg_phyinst_maxdlynb_cmd,
+ "osmotrx maxdlynb <0-31>",
+ "Set the maximum acceptable delay of a Normal Burst (in GSM symbols)."
+ " USE FOR TESTING ONLY, DON'T CHANGE IN PRODUCTION USE!"
+ " During normal operation, Normal Bursts delay are controled by a Timing"
+ " Advance control loop and thus Normal Bursts arrive to a BTS with no more"
+ " than a couple GSM symbols, which is already taken into account in osmo-trx."
+ " So changing this setting will have no effect in production installations"
+ " except increasing osmo-trx CPU load. This setting is only useful when"
+ " testing with a transmitter which can't precisely synchronize to the BTS"
+ " downlink signal, like e.g. R&S CMD57.\n"
+ "GSM symbols (approx. 1.1km per symbol)\n")
+{
+ struct phy_instance *pinst = vty->index;
+ struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
+
+ l1h->config.maxdlynb = atoi(argv[0]);
+ l1h->config.maxdlynb_valid = 1;
+ l1h->config.maxdlynb_sent = 0;
l1if_provision_transceiver_trx(l1h);
return CMD_SUCCESS;
@@ -400,6 +436,18 @@
return CMD_SUCCESS;
}
+DEFUN(cfg_phyinst_no_maxdlynb, cfg_phyinst_no_maxdlynb_cmd,
+ "no osmotrx maxdlynb",
+ NO_STR "Unset the maximum delay of GSM symbols\n")
+{
+ struct phy_instance *pinst = vty->index;
+ struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
+
+ l1h->config.maxdlynb_valid = 0;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_phy_transc_ip, cfg_phy_transc_ip_cmd,
"osmotrx ip HOST",
OSMOTRX_STR
@@ -458,6 +506,8 @@
if (l1h->config.maxdly_valid)
vty_out(vty, " maxdly %d%s", l1h->config.maxdly, VTY_NEWLINE);
+ if (l1h->config.maxdlynb_valid)
+ vty_out(vty, " maxdlynb %d%s", l1h->config.maxdlynb, VTY_NEWLINE);
if (l1h->config.slotmask != 0xff)
vty_out(vty, " slotmask %d %d %d %d %d %d %d %d%s",
l1h->config.slotmask & 1,
@@ -520,6 +570,8 @@
install_element(PHY_INST_NODE, &cfg_phy_power_on_cmd);
install_element(PHY_INST_NODE, &cfg_phyinst_maxdly_cmd);
install_element(PHY_INST_NODE, &cfg_phyinst_no_maxdly_cmd);
+ install_element(PHY_INST_NODE, &cfg_phyinst_maxdlynb_cmd);
+ install_element(PHY_INST_NODE, &cfg_phyinst_no_maxdlynb_cmd);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/1246
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>