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
case BCCH_DL_SCH_MessageType__c1_PR_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++) {
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;
typeandinfo = si->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
......@@ -3019,6 +3021,8 @@ void configure_du_mac(int inst) {
eNB_RRC_INST *rrc = RC.rrc[inst];
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,
carrier->physCellId,
carrier->p_eNB,
......@@ -3030,9 +3034,8 @@ void configure_du_mac(int inst) {
#endif
0, // rnti
(BCCH_BCH_Message_t *)
NULL,
(RadioResourceConfigCommonSIB_t *) &
carrier->sib2->radioResourceConfigCommon,
&carrier->mib,
(RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
(RadioResourceConfigCommonSIB_t *)
NULL,
......@@ -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 &&
resp->nrpci[j] == carrier->physCellId) {
// copy system information and decode it
for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) extract_and_decode_SI(i,
si_ind,
resp->SI_container[j][si_ind],
resp->SI_container_length[j][si_ind]);
for (si_ind=0;si_ind<resp->num_SI[j];si_ind++) {
printf("SI %d: ",si_ind);
for (int n=0;n<resp->SI_container_length[j][si_ind];n++) printf("%2x ",resp->SI_container[j][si_ind][n]);
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
configure_du_mac(i);
}
......
......@@ -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));
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,
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,
size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.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);
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;
......
......@@ -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;
}
#endif
if (radioResourceConfigCommon != NULL) {
LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
LOG_I(MAC, "[CONFIG]pusch_config_common.hoppingMode = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
LOG_I(MAC,
"[CONFIG]pusch_config_common.pusch_HoppingOffset = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
LOG_I(MAC, "[CONFIG]pusch_config_common.enable64QAM = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
LOG_I(MAC,
"[CONFIG]pusch_config_common.groupHoppingEnabled = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupHoppingEnabled);
LOG_I(MAC,
"[CONFIG]pusch_config_common.groupAssignmentPUSCH = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupAssignmentPUSCH);
LOG_I(MAC,
"[CONFIG]pusch_config_common.sequenceHoppingEnabled = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
sequenceHoppingEnabled);
LOG_I(MAC, "[CONFIG]pusch_config_common.cyclicShift = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
AssertFatal(radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx > 0,
"radioResourceconfigCommon %d == 0\n",
(int) radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx);
RC.mac[Mod_idP]->common_channels[CC_idP].
radioResourceConfigCommon = radioResourceConfigCommon;
if (ul_CarrierFreq > 0)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_CarrierFreq =
ul_CarrierFreq;
if (ul_Bandwidth)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
*ul_Bandwidth;
else
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.
dl_Bandwidth;
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
AssertFatal(radioResourceConfigCommon != NULL, "radioResourceConfigCommon is null\n");
LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
LOG_I(MAC, "[CONFIG]pusch_config_common.hoppingMode = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
LOG_I(MAC,
"[CONFIG]pusch_config_common.pusch_HoppingOffset = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
LOG_I(MAC, "[CONFIG]pusch_config_common.enable64QAM = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
LOG_I(MAC,
"[CONFIG]pusch_config_common.groupHoppingEnabled = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupHoppingEnabled);
LOG_I(MAC,
"[CONFIG]pusch_config_common.groupAssignmentPUSCH = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
groupAssignmentPUSCH);
LOG_I(MAC,
"[CONFIG]pusch_config_common.sequenceHoppingEnabled = %d\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.
sequenceHoppingEnabled);
LOG_I(MAC, "[CONFIG]pusch_config_common.cyclicShift = %ld\n",
radioResourceConfigCommon->
pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
AssertFatal(radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx > 0,
"radioResourceconfigCommon %d == 0\n",
(int) radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx);
RC.mac[Mod_idP]->common_channels[CC_idP].
radioResourceConfigCommon = radioResourceConfigCommon;
if (ul_CarrierFreq > 0)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_CarrierFreq =
ul_CarrierFreq;
if (ul_Bandwidth)
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
*ul_Bandwidth;
else
RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth =
RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.
dl_Bandwidth;
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
radioResourceConfigCommon_BR,
radioResourceConfigCommon_BR,
#endif
NULL, ul_Bandwidth, additionalSpectrumEmission,
mbsfn_SubframeConfigList);
}
NULL, ul_Bandwidth, additionalSpectrumEmission,
mbsfn_SubframeConfigList);
} // mib != NULL
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
......
......@@ -390,6 +390,7 @@ init_SI(
#endif
}
/*
if (rrc->node_type == ngran_eNB_DU) {
LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB_DU\n");
......@@ -437,7 +438,9 @@ init_SI(
#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");
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) {
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_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++;
}
F1AP_SETUP_RESP (msg_p).num_SI[cu_cell_ind] = num_SI;
......
......@@ -77,9 +77,9 @@ L1s = (
RUs = (
{
local_if_name = "eth1";
remote_address = "10.10.10.19";
local_address = "10.10.10.18";
local_if_name = "lo";
remote_address = "127.0.0.2";
local_address = "127.0.0.1";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
......
......@@ -22,9 +22,9 @@ log_config = {
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="debug";
phy_log_level ="info`";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
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