aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/sysmobts_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-08-22 02:46:15 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-24 10:46:21 +0200
commite43feaf231e08f108aafa26a7829820fad3447cb (patch)
tree06b0fe4d89e8c2c4194dcb7e1ae0378b48dae1fc /src/osmo-bts-sysmo/sysmobts_vty.c
parentfcca2e82184f8ece6a31db48abd77d560065b31f (diff)
New generic transmit power handling
In order to support transmit power reduction by thermal management as well as the variety of new internal / external PA configurations of BTSs, we need a slightly more complex system. Also, as at high power a single dB can be quite a big difference, we are now doing all computations in milli-dB(m), i.e. 1/10000 bel. Ramping is now used both for up and down ramping, as that is useful in cases where you want to gracefully shut down a cell by shrinking its radius, gradually handing over subscribers to neighboring cells. Furthermore, this code is becoming part of the 'common' codebase, as it is not really specific to how sysmobts is working. The user can specify a single aggregate value for external system gain/attenuation. Let's say you have 1dB loss of antenna cable, so you can put that as 'user-gain -1' into the config, which means that a 'transmit power of 20dBm' will be compensatet for that and the TRX is instructed to output 21dBm to compensate the cable loss. Similarly, external PAs can be described by a positive user-gain. One of the next steps will be to communicate those values and the nominal power capability of the specific BTS to the BSC, so the BSC will automatically show correct signal levels in the VTY and log files. The code includes provisions for future extensions regarding * an external and an internal PA with calibration tables * a thermal attenuation setting to be controlled by the site manager
Diffstat (limited to 'src/osmo-bts-sysmo/sysmobts_vty.c')
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index ed90a234..8b617d78 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -254,40 +254,6 @@ DEFUN(cfg_trx_nominal_power, cfg_trx_nominal_power_cmd,
return CMD_SUCCESS;
}
-#define PA_STR "Power-Amplifier settings"
-DEFUN(cfg_trx_pa_max_initial, cfg_trx_pa_max_initial_cmd,
- "power-amplifier max-initial <0-100>",
- PA_STR "Maximum initial power\n"
- "Value in dBm\n")
-{
- struct gsm_bts_trx *trx = vty->index;
-
- trx->pa.max_initial_power = atoi(argv[0]);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_trx_pa_step_size, cfg_trx_pa_step_size_cmd,
- "power-amplifier step-size <1-100>",
- PA_STR "Power increase by step\n"
- "Step size in dB\n")
-{
- struct gsm_bts_trx *trx = vty->index;
-
- trx->pa.step_size = atoi(argv[0]);
- return CMD_SUCCESS;
-}
-
-DEFUN(cfg_trx_pa_step_interval, cfg_trx_pa_step_interval_cmd,
- "power-amplifier step-interval <1-100>",
- PA_STR "Power increase by step\n"
- "Step time in seconds\n")
-{
- struct gsm_bts_trx *trx = vty->index;
-
- trx->pa.step_interval = atoi(argv[0]);
- return CMD_SUCCESS;
-}
-
/* runtime */
DEFUN(show_trx_clksrc, show_trx_clksrc_cmd,
@@ -452,11 +418,8 @@ DEFUN(set_tx_power, set_tx_power_cmd,
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);
- trx->pa.current_power = power;
- osmo_timer_del(&trx->pa.step_timer);
- l1if_set_txpower(fl1h, (float) trx->pa.current_power);
+ power_ramp_start(trx, to_mdB(power), 1);
return CMD_SUCCESS;
}
@@ -586,12 +549,6 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
if (trx->nominal_power != sysmobts_get_nominal_power(trx))
vty_out(vty, " nominal-tx-power %d%s", trx->nominal_power,
VTY_NEWLINE);
- vty_out(vty, " power-amplifier max-initial %d%s",
- trx->pa.max_initial_power, VTY_NEWLINE);
- vty_out(vty, " power-amplifier step-size %d%s",
- trx->pa.step_size, VTY_NEWLINE);
- vty_out(vty, " power-amplifier step-interval %d%s",
- trx->pa.step_interval, VTY_NEWLINE);
for (i = 0; i < 32; i++) {
if (fl1h->gsmtap_sapi_mask & (1 << i)) {
@@ -663,9 +620,6 @@ int bts_model_vty_init(struct gsm_bts *bts)
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);
- install_element(TRX_NODE, &cfg_trx_pa_max_initial_cmd);
- install_element(TRX_NODE, &cfg_trx_pa_step_size_cmd);
- install_element(TRX_NODE, &cfg_trx_pa_step_interval_cmd);
return 0;
}