aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-18 11:12:13 +0300
committerHarald Welte <laforge@gnumonks.org>2017-06-18 12:56:00 +0300
commit2f8b9d25f8428980e35ed8f8b2dc44324bc4566a (patch)
tree3c817ad2ce141ca6fa8437d34dfa1f4d5c3e3418 /openbsc/src/libbsc
parent8b1a2f8cd7a81c6b8c7cdb0963dcf89de7c46100 (diff)
Add vty command "radio-link-timeout infinite" for uplink rx testing
When we are performing Rx sensitivity testing on a BTS, we want to deactivate the connection failure criterion / radio link timeout, i.e. no matter how many SACCH frames in uplink are failed to decode, the BTS should never close the channel. OsmoBTS Change-Id I736f21f6528db5c16fa80cdb905af20673797be5 covers a way how this behavior can be requested from the BTS via an OML attribute. This patch adds support to the BSC to actually set that attribute. Do not use this in production networks, as the BTS will keep open radio channels indefinitely even if the phone is gone and no longer transmitting anything. This is a pure testing feature. Change-Id: I6cb94e0f024934f7baeeb728ca9ed3042fbf16d2
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/bsc_vty.c29
-rw-r--r--openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c14
2 files changed, 36 insertions, 7 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 2fc39ab4c..9fc289503 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -604,9 +604,11 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " periodic location update %u%s",
bts->si_common.chan_desc.t3212 * 6, VTY_NEWLINE);
- vty_out(vty, " radio-link-timeout %d%s",
- get_radio_link_timeout(&bts->si_common.cell_options),
- VTY_NEWLINE);
+ if (gsm_bts_get_radio_link_timeout(bts) < 0)
+ vty_out(vty, " radio-link-timeout infinite%s", VTY_NEWLINE);
+ else
+ vty_out(vty, " radio-link-timeout %d%s",
+ gsm_bts_get_radio_link_timeout(bts), VTY_NEWLINE);
vty_out(vty, " channel allocator %s%s",
bts->chan_alloc_reverse ? "descending" : "ascending",
VTY_NEWLINE);
@@ -2299,7 +2301,25 @@ DEFUN(cfg_bts_radio_link_timeout, cfg_bts_radio_link_timeout_cmd,
{
struct gsm_bts *bts = vty->index;
- set_radio_link_timeout(&bts->si_common.cell_options, atoi(argv[0]));
+ gsm_bts_set_radio_link_timeout(bts, atoi(argv[0]));
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_radio_link_timeout_inf, cfg_bts_radio_link_timeout_inf_cmd,
+ "radio-link-timeout infinite",
+ "Radio link timeout criterion (BTS side)\n"
+ "Infinite Radio link timeout value (use only for BTS RF testing)\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (bts->type != GSM_BTS_TYPE_OSMOBTS) {
+ vty_out(vty, "%% infinite radio link timeout not supported by this BTS%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ vty_out(vty, "%% INFINITE RADIO LINK TIMEOUT, USE ONLY FOR BTS RF TESTING%s", VTY_NEWLINE);
+ gsm_bts_set_radio_link_timeout(bts, -1);
return CMD_SUCCESS;
}
@@ -4180,6 +4200,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_penalty_time_cmd);
install_element(BTS_NODE, &cfg_bts_penalty_time_rsvd_cmd);
install_element(BTS_NODE, &cfg_bts_radio_link_timeout_cmd);
+ install_element(BTS_NODE, &cfg_bts_radio_link_timeout_inf_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_mode_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_11bit_rach_support_for_egprs_cmd);
install_element(BTS_NODE, &cfg_bts_gprs_ns_timer_cmd);
diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c
index 0291129d0..473e1caea 100644
--- a/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c
+++ b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c
@@ -38,6 +38,7 @@ struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts)
{
struct msgb *msgb;
uint8_t buf[256];
+ int rlt;
msgb = msgb_alloc(1024, "nanobts_attr_bts");
memcpy(buf, "\x55\x5b\x61\x67\x6d\x73", 6);
@@ -46,9 +47,16 @@ struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts)
/* interference avg. period in numbers of SACCH multifr */
msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, 0x06);
- /* conn fail based on SACCH error rate */
- buf[0] = 0x01;
- buf[1] = get_radio_link_timeout(&bts->si_common.cell_options);
+ rlt = gsm_bts_get_radio_link_timeout(bts);
+ if (rlt == -1) {
+ /* Osmocom extension: Use infinite radio link timeout */
+ buf[0] = 0xFF;
+ buf[1] = 0x00;
+ } else {
+ /* conn fail based on SACCH error rate */
+ buf[0] = 0x01;
+ buf[1] = rlt;
+ }
msgb_tl16v_put(msgb, NM_ATT_CONN_FAIL_CRIT, 2, buf);
memcpy(buf, "\x1e\x24\x24\xa8\x34\x21\xa8", 7);