summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-01-16 11:02:14 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-01-16 12:04:22 +0100
commit65d114fe434ec4fff9b9abfedade05ce21da994e (patch)
tree60272674e026fd538ab652a0607ad77689bc3d69
parenta83d511b618c1e18b324e04db433a2fd111b2d6f (diff)
si: Add a config option to disable SI2ter/SI2bis/SI5ter/SI5bis messages
The iPhone5 (US) appears to have some issues with the SIs generated, or the nanoBTS is not sending them correctly. Add a configurable hack to put all bands into the SI2/SI5 message. It is enabled by the bts VTY command 'force-combined-si'. This is a quick change without much reflection and watching for side effects. I have verfied that a network with ARFCN 134 and neighbors ARFCN 130 and 512 do not get generate the SI2ter and announce everything inside the SI2. This patch is conceptually based on 'si: Add a hack to disable SI2ter/SI2bis/SI5ter/SI5bis messages' (692daaf2d2). Ticket: OW#1062 Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h3
-rw-r--r--openbsc/src/libbsc/bsc_vty.c27
-rw-r--r--openbsc/src/libbsc/system_information.c3
-rw-r--r--openbsc/tests/vty_test_runner.py18
4 files changed, 51 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 3bf05e4b3..ae9e7d867 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -676,6 +676,9 @@ struct gsm_bts {
int num_trx;
struct llist_head trx_list;
+ /* SI compatibility hacks */
+ int force_combined_si;
+
#ifdef ROLE_BSC
/* Abis NM queue */
struct llist_head abis_queue;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b27184be3..3b85892e0 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -645,6 +645,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
if (bts->excl_from_rf_lock)
vty_out(vty, " rf-lock-exclude%s", VTY_NEWLINE);
+ vty_out(vty, " %sforce-combined-si%s",
+ bts->force_combined_si ? "" : "no ", VTY_NEWLINE);
+
config_write_bts_model(vty, bts);
}
@@ -2667,6 +2670,28 @@ DEFUN(cfg_bts_no_excl_rf_lock,
return CMD_SUCCESS;
}
+#define FORCE_COMB_SI_STR "Force the generation of a single SI (no ter/bis)\n"
+
+DEFUN(cfg_bts_force_comb_si,
+ cfg_bts_force_comb_si_cmd,
+ "force-combined-si",
+ FORCE_COMB_SI_STR)
+{
+ struct gsm_bts *bts = vty->index;
+ bts->force_combined_si = 1;
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_force_comb_si,
+ cfg_bts_no_force_comb_si_cmd,
+ "no force-combined-si",
+ NO_STR FORCE_COMB_SI_STR)
+{
+ struct gsm_bts *bts = vty->index;
+ bts->force_combined_si = 0;
+ return CMD_SUCCESS;
+}
+
static void _get_codec_from_arg(struct vty *vty, int argc, const char *argv[])
{
struct gsm_bts *bts = vty->index;
@@ -3331,6 +3356,8 @@ int bsc_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_si5_neigh_cmd);
install_element(BTS_NODE, &cfg_bts_excl_rf_lock_cmd);
install_element(BTS_NODE, &cfg_bts_no_excl_rf_lock_cmd);
+ install_element(BTS_NODE, &cfg_bts_force_comb_si_cmd);
+ install_element(BTS_NODE, &cfg_bts_no_force_comb_si_cmd);
install_element(BTS_NODE, &cfg_bts_codec0_cmd);
install_element(BTS_NODE, &cfg_bts_codec1_cmd);
install_element(BTS_NODE, &cfg_bts_codec2_cmd);
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index c901a4ae6..aa1cb8d1b 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -70,8 +70,11 @@ static int is_dcs_net(const struct gsm_bts *bts)
static int use_arfcn(const struct gsm_bts *bts, const int bis, const int ter,
const int pgsm, const int arfcn)
{
+ if (bts->force_combined_si)
+ return !bis && !ter;
if (!bis && !ter && band_compatible(bts, arfcn))
return 1;
+ /* Correct but somehow broken with either the nanoBTS or the iPhone5 */
if (bis && pgsm && band_compatible(bts, arfcn) && (arfcn < 1 || arfcn > 124))
return 1;
if (ter && !band_compatible(bts, arfcn))
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 08c94b1b5..74f0fd21a 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -173,6 +173,24 @@ class TestVTYNITB(TestVTYGenericBSC):
self.assertEquals(res.find('periodic location update 60'), -1)
self.assert_(res.find('no periodic location update') > 0)
+ def testEnableDisableSiHacks(self):
+ self.vty.enable()
+ self.vty.command("configure terminal")
+ self.vty.command("network")
+ self.vty.command("bts 0")
+
+ # Enable periodic lu..
+ self.vty.verify("force-combined-si", [''])
+ res = self.vty.command("write terminal")
+ self.assert_(res.find(' force-combined-si') > 0)
+ self.assertEquals(res.find('no force-combined-si'), -1)
+
+ # Now disable it..
+ self.vty.verify("no force-combined-si", [''])
+ res = self.vty.command("write terminal")
+ self.assertEquals(res.find(' force-combined-si'), -1)
+ self.assert_(res.find('no force-combined-si') > 0)
+
def testRachAccessControlClass(self):
self.vty.enable()
self.vty.command("configure terminal")