aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-03 22:27:51 +0200
committerlaforge <laforge@osmocom.org>2021-06-04 19:42:43 +0000
commitcdaf3ec006d5cf580da758370350f97f3505c5b6 (patch)
treeb8745887dd6024371f6e145e9481a684d0997cca
parent20e335886752295842dba125b9145b164fc3aae1 (diff)
Make interference measurement parameters configurable
According to 3GPP TS 45.008, the BSS shall monitor the levels of interference on its IDLE traffic channels. The actual measurements are performed in the BTS and then reported to the BSC over the A-bis/RSL link(s) in RF RESource INDication messages. 3GPP TS 45.008 defines the following measurement parameters: * Intave: Interference Averaging period (see table A.1), * Interference level Boundaries (see table A.1). Both parameters are sent to the BTS over the A-bis/OML, and can now be configured via the VTY interface. Only those BTS models which 'speak' the OML protocol defined in 3GPP TS 52.021 will actually get the configured parameters, others will keep using the hard-coded parameters. Change-Id: I99ebf57aac1f3ca7e0497c3b4f6b0738c6ed7e47 Related: SYS#5313, OS#1866
-rw-r--r--include/osmocom/bsc/bts.h3
-rw-r--r--include/osmocom/bsc/gsm_data.h10
-rw-r--r--src/osmo-bsc/bsc_vty.c61
-rw-r--r--src/osmo-bsc/bts.c3
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c11
-rw-r--r--src/osmo-bsc/gsm_data.c13
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/interf_meas.vty42
8 files changed, 139 insertions, 5 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 7a491d9b3..72f83ebef 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -534,6 +534,9 @@ struct gsm_bts {
struct gsm_power_ctrl_params ms_power_ctrl;
struct gsm_power_ctrl_params bs_power_ctrl;
+ /* Interference Measurement Parameters */
+ struct gsm_interf_meas_params interf_meas_params;
+
/* We will ignore CHAN RQD with access delay greater than rach_max_delay */
uint8_t rach_max_delay;
};
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3f1446bfd..154086449 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1414,6 +1414,16 @@ struct gsm_power_ctrl_params {
extern const struct gsm_power_ctrl_params power_ctrl_params_def;
+/* Interference Measurement Parameters */
+struct gsm_interf_meas_params {
+ /* Intave: Interference Averaging period (see 3GPP TS 45.008, table A.1) */
+ uint8_t avg_period; /* number of SACCH multiframes, 1 .. 31 */
+ /* Interference level Boundaries (see 3GPP TS 52.021, section 9.4.25) */
+ uint8_t bounds_dbm[6]; /* -x dBm values for boundaries 0 .. X5 */
+};
+
+extern const struct gsm_interf_meas_params interf_meas_params_def;
+
enum rsl_cmod_spd chan_mode_to_rsl_cmod_spd(enum gsm48_chan_mode chan_mode);
#endif /* _GSM_DATA_H */
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 5bd27fc12..1db284aea 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1236,6 +1236,25 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
|| bts->repeated_acch_policy.dl_facch_cmd)
vty_out(vty, " repeat rxqual %u%s", bts->repeated_acch_policy.rxqual, VTY_NEWLINE);
+ if (bts->interf_meas_params.avg_period != interf_meas_params_def.avg_period) {
+ vty_out(vty, " interference-meas avg-period %u%s",
+ bts->interf_meas_params.avg_period,
+ VTY_NEWLINE);
+ }
+ if (memcmp(bts->interf_meas_params.bounds_dbm,
+ interf_meas_params_def.bounds_dbm,
+ sizeof(interf_meas_params_def.bounds_dbm))) {
+ vty_out(vty, " interference-meas level-bounds "
+ "%d %d %d %d %d %d%s",
+ -1 * bts->interf_meas_params.bounds_dbm[0],
+ -1 * bts->interf_meas_params.bounds_dbm[1],
+ -1 * bts->interf_meas_params.bounds_dbm[2],
+ -1 * bts->interf_meas_params.bounds_dbm[3],
+ -1 * bts->interf_meas_params.bounds_dbm[4],
+ -1 * bts->interf_meas_params.bounds_dbm[5],
+ VTY_NEWLINE);
+ }
+
/* BS/MS Power Control parameters */
config_write_power_ctrl(vty, 2, &bts->bs_power_ctrl);
config_write_power_ctrl(vty, 2, &bts->ms_power_ctrl);
@@ -4890,6 +4909,46 @@ DEFUN_ATTR(cfg_bts_no_t3113_dynamic, cfg_bts_no_t3113_dynamic_cmd,
return CMD_SUCCESS;
}
+DEFUN_USRATTR(cfg_bts_interf_meas_avg_period,
+ cfg_bts_interf_meas_avg_period_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
+ "interference-meas avg-period <1-31>",
+ "Interference measurement parameters\n"
+ "Averaging period (Intave)\n"
+ "Number of SACCH multiframes\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->interf_meas_params.avg_period = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN_USRATTR(cfg_bts_interf_meas_level_bounds,
+ cfg_bts_interf_meas_level_bounds_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
+ "interference-meas level-bounds "
+ "<-120-0> <-120-0> <-120-0> <-120-0> <-120-0> <-120-0>",
+ "Interference measurement parameters\n"
+ "Interference level Boundaries\n"
+ "Interference boundary 0 (dBm)\n"
+ "Interference boundary X1 (dBm)\n"
+ "Interference boundary X2 (dBm)\n"
+ "Interference boundary X3 (dBm)\n"
+ "Interference boundary X4 (dBm)\n"
+ "Interference boundary X5 (dBm)\n")
+{
+ struct gsm_bts *bts = vty->index;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(bts->interf_meas_params.bounds_dbm); i++) {
+ bts->interf_meas_params.bounds_dbm[i] = abs(atoi(argv[i]));
+ /* TODO: ensure ascending (or descending?) order */
+ }
+
+ return CMD_SUCCESS;
+}
+
#define BS_POWER_CONTROL_CMD \
"bs-power-control"
#define MS_POWER_CONTROL_CMD \
@@ -7868,6 +7927,8 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_rep_ul_dl_sacch_cmd);
install_element(BTS_NODE, &cfg_bts_rep_no_ul_dl_sacch_cmd);
install_element(BTS_NODE, &cfg_bts_rep_rxqual_cmd);
+ install_element(BTS_NODE, &cfg_bts_interf_meas_avg_period_cmd);
+ install_element(BTS_NODE, &cfg_bts_interf_meas_level_bounds_cmd);
neighbor_ident_vty_init();
/* See also handover commands added on bts level from handover_vty.c */
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 652d1261e..4b0204226 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -357,6 +357,9 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
bts->bs_power_ctrl = power_ctrl_params_def;
bts->bs_power_ctrl.dir = GSM_PWR_CTRL_DIR_DL;
+ /* Interference Measurement Parameters (defaults) */
+ bts->interf_meas_params = interf_meas_params_def;
+
bts->rach_max_delay = 63;
return bts;
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 885f4cc21..ed3a80212 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -35,11 +35,12 @@ struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts)
if (!msgb)
return NULL;
- memcpy(buf, "\x55\x5b\x61\x67\x6d\x73", 6);
- msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND, 6, buf);
-
- /* interference avg. period in numbers of SACCH multifr */
- msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, 0x06);
+ /* Interference level Boundaries: 0 .. X5 (3GPP TS 52.021, section 9.4.25) */
+ msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND,
+ sizeof(bts->interf_meas_params.bounds_dbm),
+ &bts->interf_meas_params.bounds_dbm[0]);
+ /* Intave: Interference Averaging period (3GPP TS 52.021, section 9.4.24) */
+ msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, bts->interf_meas_params.avg_period);
rlt = gsm_bts_get_radio_link_timeout(bts);
if (rlt == -1) {
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index ea6c685b1..b33b1c39d 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -1002,6 +1002,19 @@ enum gsm48_rr_cause bsc_gsm48_rr_cause_from_rsl_cause(uint8_t c)
}
}
+/* Default Interference Measurement Parameters */
+const struct gsm_interf_meas_params interf_meas_params_def = {
+ .avg_period = 6, /* 6 SACCH periods */
+ .bounds_dbm = {
+ 85, /* 0: -85 dBm */
+ 91, /* X1: -91 dBm */
+ 97, /* X2: -97 dBm */
+ 103, /* X3: -103 dBm */
+ 109, /* X4: -109 dBm */
+ 115, /* X5: -115 dBm */
+ },
+};
+
/* Default MS/BS Power Control parameters (see 3GPP TS 45.008, table A.1) */
const struct gsm_power_ctrl_params power_ctrl_params_def = {
/* Static Power Control is the safe default */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5e23be0a4..0831dee5d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,6 +41,7 @@ EXTRA_DIST = \
osmo-bsc.vty \
timer.vty \
power_ctrl.vty \
+ interf_meas.vty \
ctrl/osmo-bsc-neigh-test.cfg \
ctrl/osmo-bsc-apply-config-file.cfg \
ctrl/osmo-bsc-apply-config-file-invalid.cfg \
diff --git a/tests/interf_meas.vty b/tests/interf_meas.vty
new file mode 100644
index 000000000..76b33e56d
--- /dev/null
+++ b/tests/interf_meas.vty
@@ -0,0 +1,42 @@
+OsmoBSC> enable
+
+OsmoBSC# ### Default configuration
+OsmoBSC# show running-config
+... !interference-meas
+
+OsmoBSC# configure terminal
+OsmoBSC(config)# network
+OsmoBSC(config-net)# bts 0
+
+OsmoBSC(config-net-bts)# interference-meas?
+ interference-meas Interference measurement parameters
+OsmoBSC(config-net-bts)# interference-meas ?
+ avg-period Averaging period (Intave)
+ level-bounds Interference level Boundaries
+
+OsmoBSC(config-net-bts)# ### Averaging period
+OsmoBSC(config-net-bts)# interference-meas avg-period ?
+ <1-31> Number of SACCH multiframes
+OsmoBSC(config-net-bts)# interference-meas avg-period 0
+% Unknown command.
+OsmoBSC(config-net-bts)# interference-meas avg-period 30
+OsmoBSC(config-net-bts)# show running-config
+... !interference-meas
+ bts 0
+... !interference-meas
+ interference-meas avg-period 30
+... !interference-meas
+
+OsmoBSC(config-net-bts)# ### Interference level Boundaries
+OsmoBSC(config-net-bts)# interference-meas level-bounds ?
+ <-120-0> Interference boundary 0 (dBm)
+OsmoBSC(config-net-bts)# interference-meas level-bounds -85 -90 -95 -100 -105 ?
+ <-120-0> Interference boundary X5 (dBm)
+OsmoBSC(config-net-bts)# interference-meas level-bounds -85 -90 -95 -100 -105 -110
+OsmoBSC(config-net-bts)# show running-config
+... !interference-meas
+ bts 0
+... !interference-meas
+ interference-meas avg-period 30
+ interference-meas level-bounds -85 -90 -95 -100 -105 -110
+... !interference-meas