From 167cb828665b91ed7d28007abd4a1862ebbb78c9 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 19 Nov 2018 17:48:17 +0100 Subject: bsc: Enable force-combined-si on nanoBTS by default Some nanoBTS firmwares (if not all) are known to not work properly with SI2ter. If BSC enables SI2ter through RSL, SI3 bit announcing SI2ter available will be forwarded by nanoBTS to MS, but will still only send SI2 message instead of expected SI2ter during TC=5 (see GSM 05.02 sec 6.3.4 "Mapping of BCCH data"). As a result, some MS won't allow registering to the network. To avoid this kind of scenario, enable force-combined-si by default on nanoBTS while still allowing to overwrite the feature through VTY. Other BTS models are kept with force-combined-si disabled by default as usually, since they seems to be working fine when SI2ter is enabled. Related: OS#3063 Change-Id: Ide6e8967de0eedc9e2bcaf4414aaa537b009d72d --- doc/examples/osmo-bsc/osmo-bsc.cfg | 1 - doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg | 1 - include/osmocom/bsc/gsm_data.h | 4 ++++ src/osmo-bsc/bsc_vty.c | 7 +++++-- src/osmo-bsc/bts_ipaccess_nanobts.c | 7 ++++++- src/osmo-bsc/bts_sysmobts.c | 3 +++ src/osmo-bsc/system_information.c | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 750b08907..eec154db7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -40,7 +40,6 @@ network oml ip.access stream_id 255 line 0 codec-support fr gprs mode none - no force-combined-si trx 0 rf_locked 0 arfcn 871 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index d1b36783d..fd3a34950 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -39,7 +39,6 @@ network oml ip.access stream_id 255 line 0 codec-support fr gprs mode none - no force-combined-si trx 0 rf_locked 0 arfcn 871 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 4d8a4d090..ba52c99b5 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -756,6 +756,9 @@ struct gsm_bts_model { void (*config_write_trx)(struct vty *vty, struct gsm_bts_trx *trx); void (*config_write_ts)(struct vty *vty, struct gsm_bts_trx_ts *ts); + /* Should SI2bis and SI2ter be disabled by default on this BTS model? */ + bool force_combined_si; + struct tlv_definition nm_att_tlvdef; /* features of a given BTS model set via gsm_bts_model_register() locally */ @@ -1046,6 +1049,7 @@ struct gsm_bts { /* SI related items */ int force_combined_si; + bool force_combined_si_set; int bcch_change_mark; /* Abis NM queue */ diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 3ac592c66..931db5b34 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -985,8 +985,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); + if (bts->force_combined_si_set) + vty_out(vty, " %sforce-combined-si%s", + bts->force_combined_si ? "" : "no ", VTY_NEWLINE); for (i = 0; i < ARRAY_SIZE(bts->depends_on); ++i) { int j; @@ -3411,6 +3412,7 @@ DEFUN(cfg_bts_force_comb_si, { struct gsm_bts *bts = vty->index; bts->force_combined_si = 1; + bts->force_combined_si_set = true; return CMD_SUCCESS; } @@ -3421,6 +3423,7 @@ DEFUN(cfg_bts_no_force_comb_si, { struct gsm_bts *bts = vty->index; bts->force_combined_si = 0; + bts->force_combined_si_set = true; return CMD_SUCCESS; } diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 1fffd89c4..cf81a22c6 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -63,7 +63,12 @@ struct gsm_bts_model bts_model_nanobts = { .start = bts_model_nanobts_start, .oml_rcvmsg = &abis_nm_rcvmsg, .oml_status = &get_oml_status, - .e1line_bind_ops = bts_model_nanobts_e1line_bind_ops, + .e1line_bind_ops = bts_model_nanobts_e1line_bind_ops, + /* Some nanoBTS firmwares (if not all) don't support SI2ter and cause + * problems on some MS if it is enabled, see OS#3063. Disable it by + * default, can still be enabled through VTY cmd with same name. + */ + .force_combined_si = true, .nm_att_tlvdef = { .def = { /* ip.access specifics */ diff --git a/src/osmo-bsc/bts_sysmobts.c b/src/osmo-bsc/bts_sysmobts.c index 91d1118c5..253786428 100644 --- a/src/osmo-bsc/bts_sysmobts.c +++ b/src/osmo-bsc/bts_sysmobts.c @@ -48,6 +48,9 @@ int bts_model_sysmobts_init(void) model_sysmobts.name = "sysmobts"; model_sysmobts.type = GSM_BTS_TYPE_OSMOBTS; + /* Unlike nanoBTS, sysmoBTS supports SI2bis and SI2ter fine */ + model_sysmobts.force_combined_si = false; + model_sysmobts.features.data = &model_sysmobts._features_data[0]; model_sysmobts.features.data_len = sizeof(model_sysmobts._features_data); diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 0148ac389..0a441dc46 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -327,7 +327,7 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool static inline int use_arfcn(const struct gsm_bts *bts, const bool bis, const bool ter, const bool pgsm, const int arfcn) { - if (bts->force_combined_si) + if (bts->force_combined_si_set ? bts->force_combined_si : bts->model->force_combined_si) return !bis && !ter; if (!bis && !ter && band_compatible(bts, arfcn)) return 1; -- cgit v1.2.3