Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 20:06:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..

Add VTY option to avoid sending empty Full BCCH Info for disabled SI

According to 3GPP TS 08.58 §8.5.1 BCCH INFORMATION:
"If the Full BCCH information element is not included this indicates that
transmission of the indicated SYSTEM INFORMATION message shall be stopped."

However, some ipaccess nanoBTS firmware versions are known to not support
some SI elements and also to dislike receiving BCCH Information for those SI,
even if received with empty BCCH Information meaning they should not be used.

Upon receival of this kind of message, nanoBTS sends a Failure Report
with following text:
Type=processing failure, Severity=critical failure, Probable cause=Manufacturer 
specific values: Fatal software error, Additional Text=l2_bch.c:1149

** l2_bch.c#1149:BCHbcchSItypeValid( prim_p->infoType )
** IPA_SW_FATAL_ERROR
** In task "TRX Proc:L2_BCH" @ (325).


This kind of issue only appears with some fw versions, since it's known
to work fine in other ones, so let's not disable this kind of mesage by
default on all BTs of type "nanobts".

Instead, add a VTY command that allows disabling this kind of message in
order to be able to operate those nanoBTS units.

Fixes: OS#3707
Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
4 files changed, 50 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Stefan Sperling: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index e57da55..738bad3 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -981,6 +981,9 @@
/* offsets used while generating SI2quater */
size_t e_offset;
size_t u_offset;
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. Some nanoBTS fail upon
+* receival of empty SI disabling unsupported SI. see OS#3707. */
+   bool si_unused_send_empty;

/* ip.accesss Unit ID's have Site/BTS/TRX layout */
union {
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 2f44b20..7d29d4f 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -173,12 +173,16 @@

for (n = 0; n < n_si; n++) {
i = gen_si[n];
-   /* if we don't currently have this SI, we send a zero-length
-* RSL BCCH FILLING / SACCH FILLING * in order to deactivate
-* the SI, in case it might have previously been active */
-   if (!GSM_BTS_HAS_SI(bts, i))
-   rc = rsl_si(trx, i, 0);
-   else
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. If we don't currently
+* have this SI, we send a zero-length RSL BCCH FILLING /
+* SACCH FILLING in order to deactivate the SI, in case it
+* might have previously been active */
+   if (!GSM_BTS_HAS_SI(bts, i)) {
+   if (bts->si_unused_send_empty)
+   rc = rsl_si(trx, i, 0);
+   else
+   rc = 0; /* some nanoBTS fw don't like receiving 
empty unsupported SI */
+   } else
rc = rsl_si(trx, i, si_len[i]);
if (rc < 0)
return rc;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 8c7d8e1..032305e 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -874,6 +874,8 @@
}
vty_out(vty, "  access-control-class-ramping-step-size %u%s", 
acc_ramp_get_step_size(>acc_ramp),
VTY_NEWLINE);
+   if (!bts->si_unused_send_empty)
+   vty_out(vty, "  no system-information unused-send-empty%s", 
VTY_NEWLINE);
for (i = SYSINFO_TYPE_1; i < _MAX_SYSINFO_TYPE; i++) {
if (bts->si_mode_static & (1 << i)) {
vty_out(vty, "  system-information %s mode static%s",
@@ -3087,6 +3089,38 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_bts_si_unused_send_empty, cfg_bts_si_unused_send_empty_cmd,
+   "system-information unused-send-empty",
+   SI_TEXT
+   "Send BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
+   "Some nanoBTS fw versions are known to fail upon receival of these 
messages.\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   bts->si_unused_send_empty = true;
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_si_unused_send_empty, cfg_bts_no_si_unused_send_empty_cmd,
+   "no system-information unused-send-empty",
+   NO_STR SI_TEXT
+   "Avoid sending BCCH Info 

Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-14 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 3:

ping for +2


--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 14 Dec 2018 16:38:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-11 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Tue, 11 Dec 2018 09:56:52 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-10 Thread Pau Espin Pedrol
Hello Stefan Sperling, Vadim Yanitskiy, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/12133

to look at the new patch set (#3).

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..

Add VTY option to avoid sending empty Full BCCH Info for disabled SI

According to 3GPP TS 08.58 §8.5.1 BCCH INFORMATION:
"If the Full BCCH information element is not included this indicates that
transmission of the indicated SYSTEM INFORMATION message shall be stopped."

However, some ipaccess nanoBTS firmware versions are known to not support
some SI elements and also to dislike receiving BCCH Information for those SI,
even if received with empty BCCH Information meaning they should not be used.

Upon receival of this kind of message, nanoBTS sends a Failure Report
with following text:
Type=processing failure, Severity=critical failure, Probable cause=Manufacturer 
specific values: Fatal software error, Additional Text=l2_bch.c:1149

** l2_bch.c#1149:BCHbcchSItypeValid( prim_p->infoType )
** IPA_SW_FATAL_ERROR
** In task "TRX Proc:L2_BCH" @ (325).


This kind of issue only appears with some fw versions, since it's known
to work fine in other ones, so let's not disable this kind of mesage by
default on all BTs of type "nanobts".

Instead, add a VTY command that allows disabling this kind of message in
order to be able to operate those nanoBTS units.

Fixes: OS#3707
Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
4 files changed, 50 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/12133/3
--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-10 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 2: Code-Review+1

(4 comments)

https://gerrit.osmocom.org/#/c/12133/2/src/osmo-bsc/bsc_init.c
File src/osmo-bsc/bsc_init.c:

https://gerrit.osmocom.org/#/c/12133/2/src/osmo-bsc/bsc_init.c@184
PS2, Line 184:  rc = 0; /* some nanoBTs fw don't like 
receiving empty unsupported SI */
BTs -> BTS ?


https://gerrit.osmocom.org/#/c/12133/2/src/osmo-bsc/bsc_vty.c
File src/osmo-bsc/bsc_vty.c:

https://gerrit.osmocom.org/#/c/12133/2/src/osmo-bsc/bsc_vty.c@3096
PS2, Line 3096: "Some nanoBTS fw versions are known to fail upron 
receival of these messages.\n")
typo: upron -> upon


https://gerrit.osmocom.org/#/c/12133/2/src/osmo-bsc/bsc_vty.c@3109
PS2, Line 3109: "Some nanoBTS fw versions are known to fail upron 
receival of these messages.\n")
Same typo


https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c
File src/osmo-bsc/gsm_data.c:

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c@858
PS1, Line 858: bts->si_unused_send_empty = true;
> Hm perhaps si_unused_send_empty?
Yeah, si_unused_send_empy seems fine.



--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 10 Dec 2018 18:53:41 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-10 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 2: Verified+1

(1 comment)

Tested by the user who initially had the issue and says nanoBTS works fine 
using "no system-information unused-send-empty".

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c
File src/osmo-bsc/gsm_data.c:

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c@858
PS1, Line 858: bts->si_unused_send_empty = true;
> Sorry, I was confused by the name... So, we send empty SI […]
Hm perhaps si_unused_send_empty?



--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 10 Dec 2018 14:43:22 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-05 Thread Pau Espin Pedrol
Hello Vadim Yanitskiy, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/12133

to look at the new patch set (#2).

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..

Add VTY option to avoid sending empty Full BCCH Info for disabled SI

According to 3GPP TS 08.58 §8.5.1 BCCH INFORMATION:
"If the Full BCCH information element is not included this indicates that
transmission of the indicated SYSTEM INFORMATION message shall be stopped."

However, some ipaccess nanoBTS firmware versions are known to not support
some SI elements and also to dislike receiving BCCH Information for those SI,
even if received with empty BCCH Information meaning they should not be used.

Upon receival of this kind of message, nanoBTS sends a Failure Report
with following text:
Type=processing failure, Severity=critical failure, Probable cause=Manufacturer 
specific values: Fatal software error, Additional Text=l2_bch.c:1149

** l2_bch.c#1149:BCHbcchSItypeValid( prim_p->infoType )
** IPA_SW_FATAL_ERROR
** In task "TRX Proc:L2_BCH" @ (325).


This kind of issue only appears with some fw versions, since it's known
to work fine in other ones, so let's not disable this kind of mesage by
default on all BTs of type "nanobts".

Instead, add a VTY command that allows disabling this kind of message in
order to be able to operate those nanoBTS units.

Fixes: OS#3707
Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
4 files changed, 50 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/12133/2
--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-05 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c
File src/osmo-bsc/gsm_data.c:

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c@858
PS1, Line 858: bts->si_disabled_send_empty = true;
> So this option is enabled by default now, right?
Sorry, I was confused by the name... So, we send empty SI
by default. Maybe we could just name it 'send_empty_si'?



--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 05 Dec 2018 14:15:26 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-05 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 1: Verified+1

Also, one person just confirmed that this patch makes nanoBTS work,
but 'no system-information disabled-si-send-empty-bcch-info' looks
confusing... Maybe we can use some better name?


--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 05 Dec 2018 14:12:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-05 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12133 )

Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..


Patch Set 1: Code-Review-1

(2 comments)

Please see my comments. In addition to them, are you sure that
this option is being printed by 'show running-config' and 'write'?

https://gerrit.osmocom.org/#/c/12133/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12133/1//COMMIT_MSG@27
PS1, Line 27: let's not disable this kind of mesage by
: default
Here you notice that it isn't enabled by default.


https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c
File src/osmo-bsc/gsm_data.c:

https://gerrit.osmocom.org/#/c/12133/1/src/osmo-bsc/gsm_data.c@858
PS1, Line 858: bts->si_disabled_send_empty = true;
So this option is enabled by default now, right?



--
To view, visit https://gerrit.osmocom.org/12133
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
Gerrit-Change-Number: 12133
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 05 Dec 2018 14:09:20 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: Add VTY option to avoid sending empty Full BCCH Info for disabled SI

2018-12-05 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12133


Change subject: Add VTY option to avoid sending empty Full BCCH Info for 
disabled SI
..

Add VTY option to avoid sending empty Full BCCH Info for disabled SI

According to 3GPP TS 08.58 §8.5.1 BCCH INFORMATION:
"If the Full BCCH information element is not included this indicates that
transmission of the indicated SYSTEM INFORMATION message shall be stopped."

However, some ipaccess nanoBTS firmware versions are known to not support
some SI elements and also to dislike receiving BCCH Information for those SI,
even if received with empty BCCH Information meaning they should not be used.

Upon receival of this kind of message, nanoBTS sends a Failure Report
with following text:
Type=processing failure, Severity=critical failure, Probable cause=Manufacturer 
specific values: Fatal software error, Additional Text=l2_bch.c:1149

** l2_bch.c#1149:BCHbcchSItypeValid( prim_p->infoType )
** IPA_SW_FATAL_ERROR
** In task "TRX Proc:L2_BCH" @ (325).


This kind of issue only appears with some fw versions, since it's known
to work fine in other ones, so let's not disable this kind of mesage by
default on all BTs of type "nanobts".

Instead, add a VTY command that allows disabling this kind of message in
order to be able to operate those nanoBTS units.

Fixes: OS#3707
Change-Id: Idec1daabc21de4eea5c55edd1dbb0e0775720fc7
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/gsm_data.c
4 files changed, 48 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/12133/1

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 2f60e4d..23c7b4f 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -968,6 +968,9 @@
/* offsets used while generating SI2quater */
size_t e_offset;
size_t u_offset;
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. Some nanoBTS fail upon
+* receival of empty SI disabling unsupported SI. see OS#3707. */
+   bool si_disabled_send_empty;

/* ip.accesss Unit ID's have Site/BTS/TRX layout */
union {
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 2f44b20..4827529 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -173,12 +173,16 @@

for (n = 0; n < n_si; n++) {
i = gen_si[n];
-   /* if we don't currently have this SI, we send a zero-length
-* RSL BCCH FILLING / SACCH FILLING * in order to deactivate
-* the SI, in case it might have previously been active */
-   if (!GSM_BTS_HAS_SI(bts, i))
-   rc = rsl_si(trx, i, 0);
-   else
+   /* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. If we don't currently
+* have this SI, we send a zero-length RSL BCCH FILLING /
+* SACCH FILLING in order to deactivate the SI, in case it
+* might have previously been active */
+   if (!GSM_BTS_HAS_SI(bts, i)) {
+   if (bts->si_disabled_send_empty)
+   rc = rsl_si(trx, i, 0);
+   else
+   rc = 0; /* some nanoBTs fw don't like receiving 
empty unsupported SI */
+   } else
rc = rsl_si(trx, i, si_len[i]);
if (rc < 0)
return rc;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 983dcb9..5524612 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -3087,6 +3087,38 @@
return CMD_SUCCESS;
 }

+DEFUN(cfg_bts_si_disabled_send_empty, cfg_bts_si_disabled_send_empty_cmd,
+   "system-information disabled-si-send-empty-bcch-info",
+   SI_TEXT
+   "Send BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
+   "Some nanoBTS fw versions are known to fail upron receival of these 
messages.\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   bts->si_disabled_send_empty = true;
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_no_si_disabled_send_empty, cfg_bts_no_si_disabled_send_empty_cmd,
+   "no system-information disabled-si-send-empty-bcch-info",
+   NO_STR SI_TEXT
+   "Avoid sending BCCH Info with empty 'Full BCCH Info' TLV to notify 
disabled SI. "
+   "Some nanoBTS fw versions are known to fail upron receival of these 
messages.\n")
+{
+   struct gsm_bts *bts = vty->index;
+
+   if (!is_ipaccess_bts(bts) || is_sysmobts_v2(bts)) {
+   vty_out(vty, "This command is only intended for ipaccess 
nanoBTS. See OS#3707.%s",
+   VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   bts->si_disabled_send_empty = false;
+
+   return CMD_SUCCESS;
+}
+