Commit d670138b authored by Raymond Knopp's avatar Raymond Knopp

fixes for SIB2/3 handling in DU

parent b683395d
...@@ -2923,8 +2923,10 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont ...@@ -2923,8 +2923,10 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
case BCCH_DL_SCH_MessageType__c1_PR_systemInformation: case BCCH_DL_SCH_MessageType__c1_PR_systemInformation:
{ {
SystemInformation_t *si = &bcch_message->message.choice.c1.choice.systemInformation; SystemInformation_t *si = &bcch_message->message.choice.c1.choice.systemInformation;
for (int i=0; i<si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) { for (int i=0; i<si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) {
LOG_I(ENB_APP,"Extracting SI %d/%d\n",i,si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count);
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo; struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo;
typeandinfo = si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i]; typeandinfo = si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
...@@ -3019,6 +3021,8 @@ void configure_du_mac(int inst) { ...@@ -3019,6 +3021,8 @@ void configure_du_mac(int inst) {
eNB_RRC_INST *rrc = RC.rrc[inst]; eNB_RRC_INST *rrc = RC.rrc[inst];
rrc_eNB_carrier_data_t *carrier = &rrc->carrier[0]; rrc_eNB_carrier_data_t *carrier = &rrc->carrier[0];
LOG_I(ENB_APP,"Configuring MAC/L1 %d, carrier->sib2 %p\n",inst,&carrier->sib2->radioResourceConfigCommon);
rrc_mac_config_req_eNB(inst, 0, rrc_mac_config_req_eNB(inst, 0,
carrier->physCellId, carrier->physCellId,
carrier->p_eNB, carrier->p_eNB,
...@@ -3030,9 +3034,8 @@ void configure_du_mac(int inst) { ...@@ -3030,9 +3034,8 @@ void configure_du_mac(int inst) {
#endif #endif
0, // rnti 0, // rnti
(BCCH_BCH_Message_t *) (BCCH_BCH_Message_t *)
NULL, &carrier->mib,
(RadioResourceConfigCommonSIB_t *) & (RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
carrier->sib2->radioResourceConfigCommon,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
(RadioResourceConfigCommonSIB_t *) (RadioResourceConfigCommonSIB_t *)
NULL, NULL,
...@@ -3079,10 +3082,15 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { ...@@ -3079,10 +3082,15 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
if (check_plmn_identity(carrier, resp->mcc[j], resp->mnc[j], resp->mnc_digit_length[j])>0 && if (check_plmn_identity(carrier, resp->mcc[j], resp->mnc[j], resp->mnc_digit_length[j])>0 &&
resp->nrpci[j] == carrier->physCellId) { resp->nrpci[j] == carrier->physCellId) {
// copy system information and decode it // copy system information and decode it
for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) extract_and_decode_SI(i, for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) {
si_ind, printf("SI %d: ",si_ind);
resp->SI_container[j][si_ind], for (int n=0;n<resp->SI_container_length[j][si_ind];n++) printf("%2x ",resp->SI_container[j][si_ind][n]);
resp->SI_container_length[j][si_ind]); printf("\n");
extract_and_decode_SI(i,
si_ind,
resp->SI_container[j][si_ind],
resp->SI_container_length[j][si_ind]);
}
// perform MAC/L1 common configuration // perform MAC/L1 common configuration
configure_du_mac(i); configure_du_mac(i);
} }
......
...@@ -328,6 +328,9 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -328,6 +328,9 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
printf("SI %d: ");
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) printf("%2x ",f1ap_setup_resp->SI_container[i][0][n]);
printf("\n");
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage, OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]); f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]);
......
...@@ -486,7 +486,11 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, ...@@ -486,7 +486,11 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size; size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size;
F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size; F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size;
printf("F1AP: F1Setup-Resp SI_container_length[%d][%d] %d bytes\n",i,si,size); printf("F1AP: F1Setup-Resp SI_container_length[%d][%d] %d bytes\n",i,si,size);
F1AP_SETUP_RESP (msg_p).SI_container[i][si] = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.buf; F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]);
memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][si],
(void*)ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.buf,
F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]);
} }
} }
break; break;
......
...@@ -780,68 +780,66 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -780,68 +780,66 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext; RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
} }
#endif #endif
if (radioResourceConfigCommon != NULL) { AssertFatal(radioResourceConfigCommon != NULL, "radioResourceConfigCommon is null\n");
LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n"); LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n", LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.n_SB); pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
LOG_I(MAC, "[CONFIG]pusch_config_common.hoppingMode = %ld\n", LOG_I(MAC, "[CONFIG]pusch_config_common.hoppingMode = %ld\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode); pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
LOG_I(MAC, LOG_I(MAC,
"[CONFIG]pusch_config_common.pusch_HoppingOffset = %ld\n", "[CONFIG]pusch_config_common.pusch_HoppingOffset = %ld\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset); pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
LOG_I(MAC, "[CONFIG]pusch_config_common.enable64QAM = %d\n", LOG_I(MAC, "[CONFIG]pusch_config_common.enable64QAM = %d\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM); pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
LOG_I(MAC, LOG_I(MAC,
"[CONFIG]pusch_config_common.groupHoppingEnabled = %d\n", "[CONFIG]pusch_config_common.groupHoppingEnabled = %d\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH. pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupHoppingEnabled); groupHoppingEnabled);
LOG_I(MAC, LOG_I(MAC,
"[CONFIG]pusch_config_common.groupAssignmentPUSCH = %ld\n", "[CONFIG]pusch_config_common.groupAssignmentPUSCH = %ld\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH. pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupAssignmentPUSCH); groupAssignmentPUSCH);
LOG_I(MAC, LOG_I(MAC,
"[CONFIG]pusch_config_common.sequenceHoppingEnabled = %d\n", "[CONFIG]pusch_config_common.sequenceHoppingEnabled = %d\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH. pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
sequenceHoppingEnabled); sequenceHoppingEnabled);
LOG_I(MAC, "[CONFIG]pusch_config_common.cyclicShift = %ld\n", LOG_I(MAC, "[CONFIG]pusch_config_common.cyclicShift = %ld\n",
radioResourceConfigCommon-> radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift); pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
AssertFatal(radioResourceConfigCommon-> AssertFatal(radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx > 0, rach_ConfigCommon.maxHARQ_Msg3Tx > 0,
"radioResourceconfigCommon %d == 0\n", "radioResourceconfigCommon %d == 0\n",
(int) radioResourceConfigCommon-> (int) radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx); rach_ConfigCommon.maxHARQ_Msg3Tx);
RC.mac[Mod_idP]->common_channels[CC_idP]. RC.mac[Mod_idP]->common_channels[CC_idP].
radioResourceConfigCommon = radioResourceConfigCommon; radioResourceConfigCommon = radioResourceConfigCommon;
if (ul_CarrierFreq > 0) if (ul_CarrierFreq > 0)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_CarrierFreq = RC.mac[Mod_idP]->common_channels[CC_idP].ul_CarrierFreq =
ul_CarrierFreq; ul_CarrierFreq;
if (ul_Bandwidth) if (ul_Bandwidth)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth = RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
*ul_Bandwidth; *ul_Bandwidth;
else else
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth = RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
RC.mac[Mod_idP]->common_channels[CC_idP].mib->message. RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.
dl_Bandwidth; dl_Bandwidth;
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon, config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
radioResourceConfigCommon_BR, radioResourceConfigCommon_BR,
#endif #endif
NULL, ul_Bandwidth, additionalSpectrumEmission, NULL, ul_Bandwidth, additionalSpectrumEmission,
mbsfn_SubframeConfigList); mbsfn_SubframeConfigList);
}
} // mib != NULL } // mib != NULL
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup // SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
......
...@@ -390,6 +390,7 @@ init_SI( ...@@ -390,6 +390,7 @@ init_SI(
#endif #endif
} }
/*
if (rrc->node_type == ngran_eNB_DU) { if (rrc->node_type == ngran_eNB_DU) {
LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB_DU\n"); LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB_DU\n");
...@@ -437,7 +438,9 @@ init_SI( ...@@ -437,7 +438,9 @@ init_SI(
#endif #endif
); );
} }
else if (rrc->node_type == ngran_eNB) { else
*/
if (rrc->node_type == ngran_eNB) {
LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB\n"); LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB\n");
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id, rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
...@@ -7357,6 +7360,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -7357,6 +7360,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
if (rrc->carrier[0].SIB23) { if (rrc->carrier[0].SIB23) {
F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI] = rrc->carrier[0].SIB23; F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI] = rrc->carrier[0].SIB23;
F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI] = rrc->carrier[0].sizeof_SIB23; F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI] = rrc->carrier[0].sizeof_SIB23;
printf("SI %d: ",0);
for (int n=0;n<F1AP_SETUP_RESP (msg_p).SI_container_length[j][num_SI];n++) printf("%2x ",F1AP_SETUP_RESP (msg_p).SI_container[0][num_SI][n]);
printf("\n");
num_SI++; num_SI++;
} }
F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = num_SI; F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = num_SI;
......
...@@ -77,9 +77,9 @@ L1s = ( ...@@ -77,9 +77,9 @@ L1s = (
RUs = ( RUs = (
{ {
local_if_name = "eth1"; local_if_name = "lo";
remote_address = "10.10.10.19"; remote_address = "127.0.0.2";
local_address = "10.10.10.18"; local_address = "127.0.0.1";
local_portc = 50000; local_portc = 50000;
remote_portc = 50000; remote_portc = 50000;
local_portd = 50001; local_portd = 50001;
......
...@@ -22,9 +22,9 @@ log_config = { ...@@ -22,9 +22,9 @@ log_config = {
global_log_verbosity ="medium"; global_log_verbosity ="medium";
hw_log_level ="info"; hw_log_level ="info";
hw_log_verbosity ="medium"; hw_log_verbosity ="medium";
phy_log_level ="debug"; phy_log_level ="info`";
phy_log_verbosity ="medium"; phy_log_verbosity ="medium";
mac_log_level ="debug"; mac_log_level ="info";
mac_log_verbosity ="high"; mac_log_verbosity ="high";
rlc_log_level ="info"; rlc_log_level ="info";
rlc_log_verbosity ="medium"; rlc_log_verbosity ="medium";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment