aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-06 20:30:52 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-02-05 22:32:47 +0100
commit579651bf300de002731dfd3bd39985c9fd15616c (patch)
treed18f7557c3ab371bec1b30159bab0ebaf12db1a1 /src/common/vty.c
parent0d6946741c7b5697a58e7650b6e60d495a6cfb32 (diff)
power/sysmobts: Add a manual ms power level control
Currently the DSP is instructed to achieve a given uplink power target but there are circumstances (e.g. EMV testing) where we need more control over it. The "manual/software/osmo" power control can only be implemented per TRX and not per lchan. Add a very very basic control that checks the MS Power used by the phone, the actual receive level and then adjust the power. The code doesn't take the history into account, if the phone can not reach the requested power level the code will be stuck (e.g. no timeout based on multiframes). It has a mode for a fixed power control but no way to set it yet. The change of the mode requires a restart of the software.
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index d81a8980..3354fb98 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -198,6 +198,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
tpp->ramp.step_size_mdB, VTY_NEWLINE);
vty_out(vty, " power-ramp step-interval %d%s",
tpp->ramp.step_interval_sec, VTY_NEWLINE);
+ vty_out(vty, " ms-power-control %s%s",
+ trx->ms_power_control == 0 ? "dsp" : "osmo",
+ VTY_NEWLINE);
bts_model_config_write_trx(vty, trx);
}
@@ -460,6 +463,16 @@ DEFUN(cfg_trx_pr_step_interval, cfg_trx_pr_step_interval_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_trx_ms_power_control, cfg_trx_ms_power_control_cmd,
+ "ms-power-control (dsp|osmo)",
+ "Mobile Station Power Level Control (change requires restart)\n"
+ "Handled by DSP\n" "Handled by OsmoBTS\n")
+{
+ struct gsm_bts_trx *trx = vty->index;
+
+ trx->ms_power_control = argv[0][0] == 'd' ? 0 : 1;
+ return CMD_SUCCESS;
+}
/* ======================================================================
@@ -657,6 +670,7 @@ int bts_vty_init(const struct log_info *cat)
install_element(TRX_NODE, &cfg_trx_pr_max_initial_cmd);
install_element(TRX_NODE, &cfg_trx_pr_step_size_cmd);
install_element(TRX_NODE, &cfg_trx_pr_step_interval_cmd);
+ install_element(TRX_NODE, &cfg_trx_ms_power_control_cmd);
install_element(ENABLE_NODE, &bts_t_t_l_jitter_buf_cmd);