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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24777 ) Change subject: power_control: implement BCCH carrier power reduction operation ...................................................................... power_control: implement BCCH carrier power reduction operation The BCCH carrier (sometimes called C0) of a BTS shall maintain discontinuous Downlink transmission at full power in order to stay 'visible' to the mobile stations. Because of that, early versions of 3GPP TS 45.008 prohibited BS power reduction on C0. However, in the recent 3GPP TS 45.008 there is a feature called 'BCCH carrier power reduction operation'. This is a special mode of operation, where the variation of RF level for some timeslots is relaxed for the purpose of energy saving. In BCCH carrier power reduction operation, for timeslots on the C0 carrier, except timeslots carrying BCCH/CCCH, the output power may be lower than the output power used for timeslots carrying BCCH/CCCH. In this case the maximum allowed difference in output power actually transmitted by the BTS is 6 dB. Introduce a VTY command to turn on and off the BCCH carrier power reduction operation. On the A-bis/RSL, abuse the BS POWER CONTROL message by setting the Channel Number IE to 0x80 (RSL_CHAN_BCCH). A value greater than zero would make osmo-bts reduce the power on *inactive* timeslots of the BCCH carrier. Sending zero would disable the BCCH power reduction mode. Change-Id: I047fce33d4d3e4c569dd006ba17858467a2f4783 Related: SYS#4919 --- M include/osmocom/bsc/bts.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_osmobts.c M tests/osmo-bsc.vty 4 files changed, 77 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/24777/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index b6980d1..6bdf25c 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -236,6 +236,9 @@ int (*power_ctrl_enc_rsl_params)(struct msgb *msg, const struct gsm_power_ctrl_params *cp); /* (Optional) function for sending default MS/BS Power Control paramaters */ int (*power_ctrl_send_def_params)(const struct gsm_bts_trx *trx); + /* (Optional) function for toggling BCCH carrier power reduction operation */ + int (*power_ctrl_toggle_bcch_power_red)(const struct gsm_bts *bts, + const uint8_t red); void (*config_write_bts)(struct vty *vty, struct gsm_bts *bts); void (*config_write_trx)(struct vty *vty, struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 1ec34bc..4d1d9ff 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -6020,6 +6020,46 @@ return CMD_SUCCESS; } +DEFUN(bts_bcch_power_red, + bts_bcch_power_red_cmd, + "bts <0-255> bcch-power-red <0-6>", + "BTS Specific Commands\n" BTS_NR_STR + "BCCH carrier power reduction operation\n" + "Power reduction value (in dB, even numbers only)\n") +{ + int bts_nr = atoi(argv[0]); + int red = atoi(argv[1]); + struct gsm_bts *bts; + + if (red % 2 != 0) { + vty_out(vty, "%% Incorrect BCCH power reduction value, " + "an even number is expected%s", VTY_NEWLINE); + return CMD_WARNING; + } + + 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; + } + + if (bts->model->power_ctrl_toggle_bcch_power_red == NULL || + !osmo_bts_has_feature(&bts->features, BTS_FEAT_BCCH_POWER_RED)) { + vty_out(vty, "%% BCCH carrier power reduction operation " + "for BTS%d is not supported%s", bts_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + if (bts->model->power_ctrl_toggle_bcch_power_red(bts, red) != 0) { + vty_out(vty, "%% Failed to %sable BCCH carrier power reduction " + "operation mode for BTS (%d)%s", red ? "en" : "dis", + bts_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + /* this command is now hidden, as it's a low-level debug hack, and people should * instead use osmo-cbc these days */ DEFUN_HIDDEN(smscb_cmd, smscb_cmd_cmd, @@ -8171,6 +8211,7 @@ install_element(ENABLE_NODE, &restart_bts_cmd); install_element(ENABLE_NODE, &bts_resend_sysinfo_cmd); install_element(ENABLE_NODE, &bts_resend_power_ctrl_params_cmd); + install_element(ENABLE_NODE, &bts_bcch_power_red_cmd); install_element(ENABLE_NODE, &pdch_act_cmd); install_element(ENABLE_NODE, &lchan_act_cmd); install_element(ENABLE_NODE, &lchan_act_all_cmd); diff --git a/src/osmo-bsc/bts_osmobts.c b/src/osmo-bsc/bts_osmobts.c index 1814ada..a61f49b 100644 --- a/src/osmo-bsc/bts_osmobts.c +++ b/src/osmo-bsc/bts_osmobts.c @@ -1,6 +1,7 @@ /* Osmocom OsmoBTS specific code */ /* (C) 2010-2012 by Harald Welte <laforge at gnumonks.org> + * (C) 2021 by sysmocom - s.m.f.c. GmbH <info at sysmocom.de> * * All Rights Reserved * @@ -43,6 +44,33 @@ static struct gsm_bts_model model_osmobts; +static int power_ctrl_toggle_bcch_power_red(const struct gsm_bts *bts, + const uint8_t red) +{ + struct abis_rsl_dchan_hdr *dh; + struct msgb *msg; + + msg = rsl_msgb_alloc(); + if (msg == NULL) + return -ENOMEM; + + LOGP(DRSL, LOGL_NOTICE, "%sabling BCCH carrier power reduction " + "operation mode for BTS%u (maximum %u dB)\n", + red ? "En" : "Dis", red, bts->nr); + + dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); + dh->c.msg_discr = ABIS_RSL_MDISC_COM_CHAN; + dh->c.msg_type = RSL_MT_BS_POWER_CONTROL; + dh->ie_chan = RSL_IE_CHAN_NR; + dh->chan_nr = RSL_CHAN_BCCH; + + msgb_tv_put(msg, RSL_IE_BS_POWER, red / 2); + + msg->dst = bts->c0->rsl_link_primary; + + return abis_rsl_sendmsg(msg); +} + int bts_model_osmobts_init(void) { model_osmobts = bts_model_nanobts; @@ -52,6 +80,10 @@ /* Unlike nanoBTS, osmo-bts does support SI2bis and SI2ter fine */ model_osmobts.force_combined_si = false; + /* Power control API */ + model_osmobts.power_ctrl_toggle_bcch_power_red = \ + &power_ctrl_toggle_bcch_power_red; + model_osmobts.features.data = &model_osmobts._features_data[0]; model_osmobts.features.data_len = sizeof(model_osmobts._features_data); diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty index 48f3f0b..573e949 100644 --- a/tests/osmo-bsc.vty +++ b/tests/osmo-bsc.vty @@ -46,6 +46,7 @@ OsmoBSC# bts 0 ? resend-system-information Re-generate + re-send BCCH SYSTEM INFORMATION resend-power-control-defaults Re-generate + re-send default MS/BS Power control parameters + bcch-power-red BCCH carrier power reduction operation trx TRX for manual command oml Manipulate the OML managed objects om2000 Manipulate the OM2000 managed objects -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24777 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I047fce33d4d3e4c569dd006ba17858467a2f4783 Gerrit-Change-Number: 24777 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210626/61bcc5e1/attachment.htm>