From 176b71ae7054bd4316072bb0290fc3cf892082d1 Mon Sep 17 00:00:00 2001 From: Rakesh BB Date: Wed, 19 Nov 2025 17:30:22 +0000 Subject: [PATCH] Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR - The DU was using encode_MIB_NR() while constructing the GNB-DU System Information for the F1SetupRequest. - encode_MIB_NR() encodes a full NR_BCCH_BCH_Message_t, causing the MIB to be wrapped in a BCH container. - This results in incorrect MIB values in the F1SetupRequest PCAP (e.g., wrong systemFrameNumber, SCS, DMRS position, cellBarred). - According to 3GPP TS 38.473, the MIB carried in F1AP must be encoded as a raw NR_MIB_t. - The correct function encode_MIB_NR_setup() encodes MIB in the required format but was not used. - This patch replaces encode_MIB_NR() with encode_MIB_NR_setup() to ensure correct and standards-compliant MIB encoding in the F1SetupRequest. Closes issue #1034. --- openair2/GNB_APP/gnb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 5238df77fa..518361baf7 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1127,7 +1127,7 @@ f1ap_gnb_du_system_info_t *get_sys_info(NR_BCCH_BCH_Message_t *mib, const NR_BCC sys_info->mib = calloc_or_fail(buf_len, sizeof(*sys_info->mib)); DevAssert(mib != NULL); - sys_info->mib_length = encode_MIB_NR(mib, 0, sys_info->mib, buf_len); + sys_info->mib_length = encode_MIB_NR_setup(mib->message.choice.mib, 0, sys_info->mib, buf_len); DevAssert(sys_info->mib_length == buf_len); DevAssert(sib1 != NULL);