aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-06-27 18:56:01 +0200
committerHarald Welte <laforge@gnumonks.org>2018-02-27 17:27:46 +0100
commitb3a2a3e24f44adcc6660d33cc9684a8f24271e2e (patch)
treecd0993648158ad2c050553a6e99dc72d21e4a95a /src/common/vty.c
parentc2b4c668f3510b7b0baace749c5a310959010e90 (diff)
RACH decoding: Use BER threshold for RACH ghost detection
When decoding RACH bursts, we should use a BER threshold in order to help distinguish 'ghost' RACH bursts from real RACH bursts. The theoretical ideal threshold according to some papers is 7 out of 41 bits qhich aquals to Eb/N0 of 0 dB = 0.1707 (17.07%) We add a new 'ber10k' parameter to the RACH indication l1sap primitive (needs separate change for libosmocore), and then fill this value from osmo-bts-{sysmo,lc15,trx,octphy}. The common part above L1SAP then applies the threshold, which can be changed from vty using the "max-ber10k-rach <0-10000>" command available at the BTS node. The unit is BER in 1/10000, i.e. a value of 100 equals 1% bit error rate. Change-Id: Ic41c11f6312a36baa2738547e8dcec80829457f8
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index a1cb2fec..3938de5b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -291,6 +291,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
VTY_NEWLINE);
vty_out(vty, " min-qual-norm %.0f%s", btsb->min_qual_norm * 10.0f,
VTY_NEWLINE);
+ vty_out(vty, " max-ber10k-rach %u%s", btsb->max_ber10k_rach,
+ VTY_NEWLINE);
if (strcmp(btsb->pcu.sock_path, PCU_SOCK_DEFAULT))
vty_out(vty, " pcu-socket %s%s", btsb->pcu.sock_path, VTY_NEWLINE);
@@ -592,6 +594,19 @@ DEFUN(cfg_bts_min_qual_norm, cfg_bts_min_qual_norm_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_bts_max_ber_rach, cfg_bts_max_ber_rach_cmd,
+ "max-ber10k-rach <0-10000>",
+ "Set the maximum BER for valid RACH requests\n"
+ "BER in 1/10000 units (0=no BER; 100=1% BER)\n")
+{
+ struct gsm_bts *bts = vty->index;
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+
+ btsb->max_ber10k_rach = strtoul(argv[0], NULL, 10);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_bts_pcu_sock, cfg_bts_pcu_sock_cmd,
"pcu-socket PATH",
"Configure the PCU socket file/path name\n")
@@ -1542,6 +1557,7 @@ int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_ul_power_target_cmd);
install_element(BTS_NODE, &cfg_bts_min_qual_rach_cmd);
install_element(BTS_NODE, &cfg_bts_min_qual_norm_cmd);
+ install_element(BTS_NODE, &cfg_bts_max_ber_rach_cmd);
install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd);
install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_cmd);