Change in osmo-bsc[master]: Add vty command to manually force MS Uplink Power

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

keith gerrit-no-reply at lists.osmocom.org
Mon Oct 4 19:49:55 UTC 2021


keith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25653 )

Change subject: Add vty command to manually force MS Uplink Power
......................................................................

Add vty command to manually force MS Uplink Power

Change-Id: Ie2642299ea696358db5822571f1f722b5e8f76b9
---
M src/osmo-bsc/bsc_vty.c
M tests/osmo-bsc.vty
2 files changed, 54 insertions(+), 0 deletions(-)

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



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index bd61555..879ae3f 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1892,6 +1892,57 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(lchan_set_mspower, lchan_set_mspower_cmd,
+      "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> ms-power <0-40> [verify]\n",
+      BTS_NR_TRX_TS_SS_STR2
+      "Manually force MS Uplink Power Level in dBm on the lchan (for testing)\n"
+      "Set transmit power of the MS in dBm\n"
+      "Check requested level against BAND and UE Power Class.\n")
+{
+	struct gsm_bts *bts;
+	struct gsm_bts_trx *trx;
+	struct gsm_bts_trx_ts *ts;
+	struct gsm_lchan *lchan;
+	int bts_nr = atoi(argv[0]);
+	int trx_nr = atoi(argv[1]);
+	int ss_nr = atoi(argv[3]);
+	bool verify = (argc > 5);
+
+	bts = gsm_bts_num(gsmnet_from_vty(vty), bts_nr);
+	if (!bts) {
+		vty_out(vty, "%% No such BTS (%d)%s", bts_nr, VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	trx = gsm_bts_trx_num(bts, trx_nr);
+	if (!trx) {
+		vty_out(vty, "%% No such TRX (%d)%s", trx_nr, VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	ts = vty_get_ts(vty, argv[0], argv[1], argv[2]);
+	if (!ts) {
+		vty_out(vty, "%% No such TS (%d)%s", atoi(argv[2]), VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+	if (ss_nr >= ts->max_primary_lchans) {
+		vty_out(vty, "%% Invalid sub-slot number for this timeslot type%s", VTY_NEWLINE);
+		return CMD_WARNING;
+	}
+
+	lchan = &ts->lchan[ss_nr];
+	if (!lchan->fi)
+		return CMD_WARNING;
+
+	if (verify) {
+		lchan_update_ms_power_ctrl_level(lchan, atoi(argv[4]));
+		return CMD_SUCCESS;
+	}
+	lchan->ms_power = ms_pwr_ctl_lvl(ts->trx->bts->band, atoi(argv[4]));
+	rsl_chan_ms_power_ctrl(lchan);
+	return CMD_SUCCESS;
+}
+
 DEFUN(vamos_modify_lchan, vamos_modify_lchan_cmd,
       "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) " TSC_ARGS_OPT,
       BTS_NR_TRX_TS_SS_STR2
@@ -3410,6 +3461,7 @@
 	install_element(ENABLE_NODE, &lchan_mdcx_cmd);
 	install_element(ENABLE_NODE, &lchan_set_borken_cmd);
 	install_element(ENABLE_NODE, &lchan_reassign_cmd);
+	install_element(ENABLE_NODE, &lchan_set_mspower_cmd);
 
 	install_element(ENABLE_NODE, &handover_subscr_conn_cmd);
 	install_element(ENABLE_NODE, &assignment_subscr_conn_cmd);
diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty
index 4027502..ace21df 100644
--- a/tests/osmo-bsc.vty
+++ b/tests/osmo-bsc.vty
@@ -12,6 +12,7 @@
   modify          Manually send Channel Mode Modify (for debugging)
   mdcx            Modify RTP Connection
   reassign-to     Trigger Assignment to an unused lchan on the same cell
+  ms-power        Manually force MS Uplink Power Level in dBm on the lchan (for testing)
   handover        Manually trigger handover (for debugging)
   assignment      Manually trigger assignment (for debugging)
 
@@ -79,6 +80,7 @@
   modify          Manually send Channel Mode Modify (for debugging)
   mdcx            Modify RTP Connection
   reassign-to     Trigger Assignment to an unused lchan on the same cell
+  ms-power        Manually force MS Uplink Power Level in dBm on the lchan (for testing)
   handover        Manually trigger handover (for debugging)
   assignment      Manually trigger assignment (for debugging)
 

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie2642299ea696358db5822571f1f722b5e8f76b9
Gerrit-Change-Number: 25653
Gerrit-PatchSet: 9
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith at rhizomatica.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20211004/c08327e3/attachment.htm>


More information about the gerrit-log mailing list