diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 5ac65a44e9..ddff50563a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -249,12 +249,12 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl NR_BWP_DownlinkDedicated_t *bwpd = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Dedicated : mac->cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; NR_BWP_DownlinkCommon_t *bwp_Common = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Common : &mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP; - LOG_I(MAC, "[DCI_CONFIG] ra_rnti %p (%x) crnti %p (%x) t_crnti %p (%x)\n", &ra->ra_rnti, ra->ra_rnti, &mac->crnti, mac->crnti, &ra->t_crnti, ra->t_crnti); + LOG_D(NR_MAC, "[DCI_CONFIG] ra_rnti %p (%x) crnti %p (%x) t_crnti %p (%x)\n", &ra->ra_rnti, ra->ra_rnti, &mac->crnti, mac->crnti, &ra->t_crnti, ra->t_crnti); // loop over all available SS for CORESET ID 1 if (bwpd) { for (ss_id = 0; ss_id < FAPI_NR_MAX_SS_PER_CORESET && mac->SSpace[bwp_id][coreset_id - 1][ss_id] != NULL; ss_id++){ - LOG_I(MAC, "[DCI_CONFIG] ss_id %d\n",ss_id); + LOG_D(NR_MAC, "[DCI_CONFIG] ss_id %d\n",ss_id); NR_SearchSpace_t *ss = mac->SSpace[bwp_id][coreset_id - 1][ss_id]; fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15; NR_SetupRelease_PDCCH_ConfigCommon_t *pdcch_ConfigCommon = bwp_Common->pdcch_ConfigCommon; @@ -270,7 +270,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl pdcch_ConfigCommon->choice.setup->searchSpaceSIB1=calloc(1,sizeof(*pdcch_ConfigCommon->choice.setup->searchSpaceSIB1)); } *pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = 0; - LOG_I(MAC, "[DCI_CONFIG] Configure SearchSpace#0 of the initial BWP\n"); + LOG_D(NR_MAC, "[DCI_CONFIG] Configure SearchSpace#0 of the initial BWP\n"); } if (ss->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0){ // check available SS IDs @@ -360,7 +360,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl (ra->ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test) && mac->crnti > 0) { // Monitors DCI 01 and 11 scrambled with C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI - LOG_I(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n"); + LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n"); rel15->num_dci_options = 2; rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_1; rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_1; @@ -368,7 +368,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl fill_dci_search_candidates(ss, rel15); //#ifdef DEBUG_DCI - LOG_I(MAC, "[DCI_CONFIG] ss %d ue_Specific %p searchSpaceType->present %d dci_Formats %d\n", + LOG_D(NR_MAC, "[DCI_CONFIG] ss %d ue_Specific %p searchSpaceType->present %d dci_Formats %d\n", ss_id, ss->searchSpaceType->choice.ue_Specific, (int)ss->searchSpaceType->present, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 7d04c5d25c..e24333b09f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1219,7 +1219,7 @@ int nr_acknack_scheduling(int mod_id, } } - LOG_D(NR_MAC,"1. DL slot %d, UL_ACK %d, DAI_C %d\n",slot,pucch->ul_slot,pucch->dai_c); + LOG_D(NR_MAC,"1. DL %d.%d, UL_ACK %d.%d, DAI_C %d\n",frame,slot,pucch->frame,pucch->ul_slot,pucch->dai_c); /* if the UE's next PUCCH occasion is after the possible UL slots (within the * same frame) or wrapped around to the next frame, then we assume there is * no possible PUCCH allocation anymore */ @@ -1247,7 +1247,7 @@ int nr_acknack_scheduling(int mod_id, get_pdsch_to_harq_feedback(mod_id, UE_id, bwp_Id, ss_type, pdsch_to_harq_feedback); - LOG_D(NR_MAC,"1b. DL slot %d, UL_ACK %d, DAI_C %d\n",slot,pucch->ul_slot,pucch->dai_c); + LOG_D(NR_MAC,"1b. DL %d.%d, UL_ACK %d.%d, DAI_C %d\n",frame,slot,pucch->frame,pucch->ul_slot,pucch->dai_c); /* there is a HARQ. Check whether we can use it for this ACKNACK */ if (pucch->dai_c > 0) { /* this UE already has a PUCCH occasion */ @@ -1296,27 +1296,18 @@ int nr_acknack_scheduling(int mod_id, } // advance ul_slot if it is not reachable by UE - pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); - - // Find the right timing_indicator value. - int i = 0; - while (i < 8) { - LOG_D(NR_MAC,"pdsch_to_harq_feedback[%d] = %d (pucch->ul_slot %d - slot %d)\n", - i,pdsch_to_harq_feedback[i],pucch->ul_slot,slot); - if (pdsch_to_harq_feedback[i] == pucch->ul_slot - slot) - break; - ++i; - } - if (i >= 8) { - LOG_W(NR_MAC, - "%4d.%2d could not find pdsch_to_harq_feedback for UE %d: earliest " - "ack slot %d\n", - frame, - slot, - UE_id, - pucch->ul_slot); - return -1; + int pucch_slot,ind_found=-1; + for (int i=0;i<8;i++) { + pucch_slot = slot + pdsch_to_harq_feedback[i]; + if ((pucch_slot%nr_slots_period) >= tdd->nrofDownlinkSlots) { + pucch->ul_slot = max(pucch->ul_slot, pucch_slot); + ind_found=i; + break; + } } + if (pucch->ul_slot >= n_slots_frame) pucch->frame++; + pucch->ul_slot = pucch->ul_slot % n_slots_frame; + AssertFatal(ind_found!=-1,"couldn't find a valid UL_ACK slot for PUCCH, shouldn't happen\n"); // is there already CSI in this slot? csi_pucch = &sched_ctrl->sched_pucch[1]; @@ -1342,15 +1333,15 @@ int nr_acknack_scheduling(int mod_id, } // multiplexing harq and csi in a pucch else { - csi_pucch->timing_indicator = i; + csi_pucch->timing_indicator = ind_found; csi_pucch->dai_c++; return 1; } } - pucch->timing_indicator = i; // index in the list of timing indicators + pucch->timing_indicator = ind_found; // index in the list of timing indicators - LOG_D(NR_MAC,"2. DL slot %d, UL_ACK %d (index %d)\n",slot,pucch->ul_slot,i); + LOG_D(NR_MAC,"2. DL %d.%d, UL_ACK %d.%d (index %d)\n",frame,slot,pucch->frame,pucch->ul_slot,ind_found); pucch->dai_c++; pucch->resource_indicator = 0; // each UE has dedicated PUCCH resources diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 15bf33f716..dc550a1570 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1188,7 +1188,7 @@ void fill_initial_SpCellConfig(rnti_t rnti, long *delay[8]; for (int i=0;i<8;i++) { delay[i] = calloc(1,sizeof(*delay[i])); - *delay[i] = (i+2); + *delay[i] = (i+2+4); ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]); } diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index c6992642e9..77931cbb19 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -840,6 +840,9 @@ void *nas_nrue_task(void *args_p) else if((pdu_buffer + 16) != NULL){ msg_type = *(pdu_buffer + 16); if(msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC){ + if(baseNetAddress==NULL) { + baseNetAddress = calloc(1,8); + } sprintf(baseNetAddress, "%d.%d", *(pdu_buffer + 39),*(pdu_buffer + 40)); int third_octet = *(pdu_buffer + 41); int fourth_octet = *(pdu_buffer + 42);