aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/sysmobts_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-19 20:19:21 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-19 20:19:21 +0200
commitbcd08888f9efbfa7c3e401ac0fbbb339059ff4b1 (patch)
tree5f85882705982324b3e796d1abb365a3e5ca023b /src/osmo-bts-sysmo/sysmobts_vty.c
parent9aa6d9496b4e0791c104ae711f0ccb7af7776e85 (diff)
add VTY command to manually alter transmit power
this allows for quick manual tx power changes from the VTY, particularly useful in type approval or other measurements.
Diffstat (limited to 'src/osmo-bts-sysmo/sysmobts_vty.c')
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 927d2c92..c1bcfa71 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -328,6 +328,22 @@ DEFUN(activate_lchan, activate_lchan_cmd,
return CMD_SUCCESS;
}
+DEFUN(set_tx_power, set_tx_power_cmd,
+ "trx <0-0> tx-power <-110-23>",
+ TRX_STR
+ "Set transmit power (override BSC)\n"
+ "Transmit power in dBm\n")
+{
+ int trx_nr = atoi(argv[0]);
+ int power = atoi(argv[1]);
+ struct gsm_bts_trx *trx = gsm_bts_trx_num(vty_bts, trx_nr);
+ struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
+
+ l1if_set_txpower(fl1h, (float) power);
+
+ return CMD_SUCCESS;
+}
+
void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
{
}
@@ -363,6 +379,7 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element_ve(&no_dsp_trace_f_cmd);
install_element(ENABLE_NODE, &activate_lchan_cmd);
+ install_element(ENABLE_NODE, &set_tx_power_cmd);
install_element(TRX_NODE, &cfg_trx_clkcal_cmd);
install_element(TRX_NODE, &cfg_trx_clkcal_def_cmd);