aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-10-09 21:02:40 +0200
committerHarald Welte <laforge@gnumonks.org>2013-10-09 22:35:27 +0200
commite843f808328c51c32983c4f7a0a6b4d4b2a5525a (patch)
treeb8287b4f8524a8b2b98602ca0b826c648efa48ae
parentcfa54328e21a52813d0dc71c9d793704aa232f37 (diff)
sysmobts: make L1 power configurable
The TRX nominal output power (as seen by OML) is the aggregate power of any gain internal to the sysmoBTS (and managed by L1) and any external PA. This is what is used in trx->nominal_power; fl1h->l1_power is the transmit power to which we configure the sysmoBTS L1. This is 23 dBm (200mW) by default in the sysmoBTS 1002, and 40 dBm (5W) in the sysmoBTS 2050. However, if sysmoBTS 2050 is used in single-TRX configuration, it may be used with higher power, which we can now configure in the config file / vty. TODO: A separate, additional field that keeps track of any gain added by an external PA, e.g. if the sysmoBTS 1002 is used with a sysmoAMP.
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 21b7f89..e509124 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -45,6 +45,7 @@
#include "femtobts.h"
#include "l1_if.h"
+#include "utils.h"
extern int lchan_activate(struct gsm_lchan *lchan, enum gsm_lchan_state lchan_state);
@@ -241,6 +242,19 @@ DEFUN(cfg_trx_min_qual_norm, cfg_trx_min_qual_norm_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_trx_nominal_power, cfg_trx_nominal_power_cmd,
+ "nominal-tx-power <0-100>",
+ "Set the nominal transmit output power in dBm\n"
+ "Nominal transmit output power level in dBm\n")
+{
+ struct gsm_bts_trx *trx = vty->index;
+
+ trx->nominal_power = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
+
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@@ -508,6 +522,9 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
VTY_NEWLINE);
vty_out(vty, " min-qual-norm %.0f%s", fl1h->min_qual_norm * 10.0f,
VTY_NEWLINE);
+ if (trx->nominal_power != sysmobts_get_nominal_power(trx))
+ vty_out(vty, " nominal-tx-power %d%s", trx->nominal_power,
+ VTY_NEWLINE);
for (i = 0; i < 32; i++) {
if (fl1h->gsmtap_sapi_mask & (1 << i)) {
@@ -576,6 +593,7 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_ul_power_target_cmd);
install_element(TRX_NODE, &cfg_trx_min_qual_rach_cmd);
install_element(TRX_NODE, &cfg_trx_min_qual_norm_cmd);
+ install_element(TRX_NODE, &cfg_trx_nominal_power_cmd);
return 0;
}