aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-10 20:25:10 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 03:52:45 +0200
commit8e2e22ffb3695fec473bb4fb28d958870a143d54 (patch)
treea873b5b2be1f399a0c9574001dff0453da1b07b5
parent2f97f42d5b271424895324f20c7f08443ee02949 (diff)
libbsc: Add VTY command to re-send the SYSTEM INFORMATION to BTS
This is useful if you are updating some configuration parameters which affect the content of the SYSTEM INFORMATION messages. Currently, we only send them at the time the RSL connection is established (i.e. when the BTS is initialized), so if you change something, you need to bring down and re-start the BTS. Using the newly-introduced "bts <0-255> resend-system-information" command, you can re-generate + re-send SYSTEM INFORMATION without bringing the BTS down, i.e. without any radio carrier downtime. Change-Id: I326df47de98f6d36c9a4d2d5475225d1e62bafb5
-rw-r--r--src/libbsc/bsc_vty.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 722753ac1..09c443c1f 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -3801,6 +3801,38 @@ DEFUN(restart_bts, restart_bts_cmd,
return CMD_SUCCESS;
}
+DEFUN(bts_resend, bts_resend_cmd,
+ "bts <0-255> resend-system-information",
+ "BTS Specific Commands\n" "BTS Number\n"
+ "Re-generate + re-send BCCH SYSTEM INFORMATION\n")
+{
+ struct gsm_network *gsmnet;
+ struct gsm_bts_trx *trx;
+ struct gsm_bts *bts;
+ unsigned int bts_nr;
+
+ gsmnet = gsmnet_from_vty(vty);
+
+ bts_nr = atoi(argv[0]);
+ if (bts_nr >= gsmnet->num_bts) {
+ vty_out(vty, "BTS number must be between 0 and %d. It was %d.%s",
+ gsmnet->num_bts, bts_nr, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts = gsm_bts_num(gsmnet, bts_nr);
+ if (!bts) {
+ vty_out(vty, "BTS Nr. %d could not be found.%s", bts_nr, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ llist_for_each_entry_reverse(trx, &bts->trx_list, list)
+ gsm_bts_trx_set_system_infos(trx);
+
+ return CMD_SUCCESS;
+}
+
+
DEFUN(smscb_cmd, smscb_cmd_cmd,
"bts <0-255> smscb-command <1-4> HEXSTRING",
"BTS related commands\n" "BTS Number\n"
@@ -4256,6 +4288,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(ENABLE_NODE, &drop_bts_cmd);
install_element(ENABLE_NODE, &restart_bts_cmd);
+ install_element(ENABLE_NODE, &bts_resend_cmd);
install_element(ENABLE_NODE, &pdch_act_cmd);
install_element(ENABLE_NODE, &lchan_act_cmd);
install_element(ENABLE_NODE, &lchan_mdcx_cmd);