fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/23773 )

Change subject: osmo-bts-trx: refactor 'maxdly' / 'maxdlynb' commands
......................................................................

osmo-bts-trx: refactor 'maxdly' / 'maxdlynb' commands

* Move way too verbose command description to the manuals.
* None of these commands apply immediately, correct the attributes.
** Remove meaningless call to l1if_provision_transceiver_trx().
* Make 'maxdlynb' hidden, so it only appears in the expert mode.
* One GMSK symbol actually corresponds to 550m.

Change-Id: I46839cf56bba2dcdc70303cd393e86d35aa2f3f5
---
M doc/manuals/vty/bts_vty_additions.xml
M src/osmo-bts-trx/trx_vty.c
2 files changed, 39 insertions(+), 29 deletions(-)

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



diff --git a/doc/manuals/vty/bts_vty_additions.xml 
b/doc/manuals/vty/bts_vty_additions.xml
index 519c4b4..2d22b41 100644
--- a/doc/manuals/vty/bts_vty_additions.xml
+++ b/doc/manuals/vty/bts_vty_additions.xml
@@ -1 +1,26 @@
-<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'/>
+<!-- ex:ts=2:sw=2:et -->
+<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'>
+  <node id='phy-inst'>
+    <!-- FIXME: This command appears twice for some reason. -->
+    <command id='osmotrx maxdly &lt;0-63&gt;'>
+      <description>
+        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 Access Bursts with a delay higher than this value 
will be ignored.
+      </description>
+    </command>
+    <!-- FIXME: This command appears unconditionally, despite being hidden. -->
+    <command id='osmotrx maxdlynb &lt;0-63&gt;'>
+      <description>
+        USE FOR TESTING ONLY, DO NOT CHANGE IN PRODUCTION USE!
+        During the normal operation, delay of Normal Bursts is controlled by 
the Timing Advance 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. 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 cannot precisely synchronize to 
the BTS downlink
+        signal, like R&amp;S CMD57.
+      </description>
+    </command>
+  </node>
+</vtydoc>
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index a24adf7..2b8bc24 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -265,18 +265,12 @@
        return CMD_SUCCESS;
 }

-DEFUN_ATTR(cfg_phyinst_maxdly, cfg_phyinst_maxdly_cmd,
-          "osmotrx maxdly <0-63>",
-          OSMOTRX_STR
-          "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 (550m distance between UE and BTS per symbol)\n",
-          CMD_ATTR_IMMEDIATE)
+DEFUN_USRATTR(cfg_phyinst_maxdly, cfg_phyinst_maxdly_cmd,
+             X(BTS_VTY_TRX_POWERCYCLE),
+             "osmotrx maxdly <0-63>",
+             OSMOTRX_STR
+             "Set the maximum acceptable delay of an Access Burst\n"
+             "Delay in GSMK symbol periods (approx. 550m per symbol)\n")
 {
        struct phy_instance *pinst = vty->index;
        struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
@@ -284,25 +278,17 @@
        l1h->config.maxdly = atoi(argv[0]);
        l1h->config.maxdly_valid = 1;
        l1h->config.maxdly_sent = false;
-       l1if_provision_transceiver_trx(l1h);

        return CMD_SUCCESS;
 }

-DEFUN_ATTR(cfg_phyinst_maxdlynb, cfg_phyinst_maxdlynb_cmd,
-          "osmotrx maxdlynb <0-31>",
-          OSMOTRX_STR
-          "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 controlled 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",
-          CMD_ATTR_IMMEDIATE)
+DEFUN_ATTR_USRATTR(cfg_phyinst_maxdlynb, cfg_phyinst_maxdlynb_cmd,
+                  CMD_ATTR_HIDDEN, /* expert mode command */
+                  X(BTS_VTY_TRX_POWERCYCLE),
+                  "osmotrx maxdlynb <0-63>",
+                  OSMOTRX_STR
+                  "Set the maximum acceptable delay of a Normal Burst\n"
+                  "Delay in GMSK symbol periods (approx. 550m per symbol)\n")
 {
        struct phy_instance *pinst = vty->index;
        struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
@@ -310,7 +296,6 @@
        l1h->config.maxdlynb = atoi(argv[0]);
        l1h->config.maxdlynb_valid = 1;
        l1h->config.maxdlynb_sent = false;
-       l1if_provision_transceiver_trx(l1h);

        return CMD_SUCCESS;
 }

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I46839cf56bba2dcdc70303cd393e86d35aa2f3f5
Gerrit-Change-Number: 23773
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to