dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-pcu/+/38092?usp=email )
Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
......................................................................
pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
The PCU sends a TXT_IND with the PCU_VERSION as first message after
the socket connection is established. The BTS/BSC uses those messages
to trigger some initialization (allocate BTS object inside the
PCU, send SI to the PCU).
Unfortunately the PCU will send the TXT_IND with the PCU_VERSION
always with to BTS 0. The 0 in this case is a hardcoded fake BTS
number (There is no BTS object allocated under this number in the
PCU at this point). However, the BTS/BSC will then do the
initialization process for BTS 0, which works by chance for the
BTS where the BTS number is always 0, in the case of the BSC there
may be multiple BTS configured, so there may be arbitrary BTS
numbers.
Let's fix this design error by introducing a broadcast BTS number,
we then send the TXT_IND with the PCU_VERSION to that broadcast
BTS number. The BTS/BSC will then do the initialization for all BTSs
with the correct BTS numbers it is aware of.
Related: OS#6507
Change-Id: Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81
Depends: osmo-bsc.git Ie92f5833a80b06e78c6cec8f03f054e2e2625fad
Depends: osmo-bts.git I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6
Depends: osmo-ttcn3-hacks.git Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9
Depends: docker-playground.git I15f7150b51047379a557a1f8df6330eca597f2e3
---
M include/osmocom/pcu/pcuif_proto.h
M src/pcu_l1_if.cpp
2 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/92/38092/1
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index 33036c3..f2e7073 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -8,7 +8,7 @@
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
-#define PCU_IF_VERSION 0x0c
+#define PCU_IF_VERSION 0x0d
#define TXT_MAX_LEN 128
/* msg_type */
@@ -298,6 +298,10 @@
bool confirm;
} __attribute__((packed));
+/* reserved BTS number to indicate that the PCUIF INDICATION is not targeted to a
+ * specific BTS. (commonly used with TXT indications to transfer the PCU version number)
*/
+#define PCU_IF_BTS_NR_BCAST 0xff
+
struct gsm_pcu_if {
/* context based information */
uint8_t msg_type; /* message type */
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index fb44bd8..411b85b 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -124,7 +124,7 @@
struct gsm_pcu_if_txt_ind *txt;
va_list ap;
char *rep;
- struct msgb *msg = pcu_msgb_alloc(PCU_IF_MSG_TXT_IND, 0);
+ struct msgb *msg = pcu_msgb_alloc(PCU_IF_MSG_TXT_IND, PCU_IF_BTS_NR_BCAST);
if (!msg)
return -ENOMEM;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/38092?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81
Gerrit-Change-Number: 38092
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>