Change in osmo-bsc[master]: Make interference measurement parameters configurable

laforge gerrit-no-reply at lists.osmocom.org
Fri Jun 4 19:42:43 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24548 )

Change subject: Make interference measurement parameters configurable
......................................................................

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
---
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
M src/osmo-bsc/gsm_data.c
M tests/Makefile.am
A tests/interf_meas.vty
8 files changed, 139 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 7a491d9..72f83eb 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -534,6 +534,9 @@
 	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 3f1446b..1540864 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1414,6 +1414,16 @@
 
 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 5bd27fc..1db284a 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1236,6 +1236,25 @@
 	    || 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 @@
 	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 @@
 	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 652d126..4b02042 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -357,6 +357,9 @@
 	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 885f4cc..ed3a802 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -35,11 +35,12 @@
 	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 ea6c685..b33b1c3 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -1002,6 +1002,19 @@
 	}
 }
 
+/* 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 5e23be0..0831dee 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,6 +41,7 @@
 	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 0000000..76b33e5
--- /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

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24548
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I99ebf57aac1f3ca7e0497c3b4f6b0738c6ed7e47
Gerrit-Change-Number: 24548
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/04500ca7/attachment.htm>


More information about the gerrit-log mailing list