diff --git a/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf b/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf index 51fd653458..d4c72d6c14 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf @@ -191,10 +191,10 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "ctrl0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.3"; - ENB_INTERFACE_NAME_FOR_S1U = "ctrl0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.61.5"; + ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.1"; + ENB_INTERFACE_NAME_FOR_S1U = "lo"; + ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1"; ENB_PORT_FOR_X2C = 36422; # Spec 36422 diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 0e2c6e72f3..65734a130c 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -395,7 +395,7 @@ set (FIRMWARE_VERSION "No svn information") add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"") add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"") add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"") -add_definitions("-DASN_EMIT_DEBUG=1") +#add_definitions("-DASN_EMIT_DEBUG=1") # Debug related options diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c index 11e7f186b1..7fd9a288c0 100755 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c @@ -6433,7 +6433,7 @@ static uint8_t unpack_nr_crc_indication_body(void* tlv, uint8_t **ppReadPackedMs static uint8_t unpack_nr_crc_indication(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t* config) { - uint8_t *ptr = *ppReadPackedMsg; + //uint8_t *ptr = *ppReadPackedMsg; // printf("\n Read P7 message indication unpack: "); // while(ptr < end){ // printf(" %d ", *ptr); diff --git a/nfapi/open-nFAPI/pnf/inc/pnf_p7.h b/nfapi/open-nFAPI/pnf/inc/pnf_p7.h index 1e2e2fa21d..fb069590c8 100644 --- a/nfapi/open-nFAPI/pnf/inc/pnf_p7.h +++ b/nfapi/open-nFAPI/pnf/inc/pnf_p7.h @@ -148,6 +148,7 @@ typedef struct { int pnf_p7_message_pump(pnf_p7_t* pnf_p7); int pnf_nr_p7_message_pump(pnf_p7_t* pnf_p7); int pnf_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* msg, uint32_t msg_len); +int pnf_nr_p7_pack_and_send_p7_message(pnf_p7_t* pnf_p7, nfapi_p7_message_header_t* header, uint32_t msg_len); int pnf_p7_send_message(pnf_p7_t* pnf_p7, uint8_t* msg, uint32_t msg_len); diff --git a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h index fc9cd66077..ca8bc8d9a4 100644 --- a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h +++ b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h @@ -800,6 +800,7 @@ int nfapi_pnf_p7_harq_ind(nfapi_pnf_p7_config_t* config, nfapi_harq_indication_t * \return 0 means success, -1 means failure */ int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t* ind); +int nfapi_pnf_p7_nr_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_crc_indication_t* ind); /*! Send the RX.indication * \param config A pointer to a PNF P7 config @@ -807,6 +808,7 @@ int nfapi_pnf_p7_crc_ind(nfapi_pnf_p7_config_t* config, nfapi_crc_indication_t* * \return 0 means success, -1 means failure */ int nfapi_pnf_p7_rx_ind(nfapi_pnf_p7_config_t* config, nfapi_rx_indication_t* ind); +int nfapi_pnf_p7_nr_rx_data_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rx_data_indication_t* ind); /*! Send the RACH.indication * \param config A pointer to a PNF P7 config @@ -821,6 +823,7 @@ int nfapi_pnf_p7_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_rach_indication_t * \return 0 means success, -1 means failure */ int nfapi_pnf_p7_srs_ind(nfapi_pnf_p7_config_t* config, nfapi_srs_indication_t* ind); +int nfapi_pnf_p7_nr_srs_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_srs_indication_t* ind); /*! Send the SR.indication * \param config A pointer to a PNF P7 config @@ -842,6 +845,7 @@ int nfapi_pnf_p7_cqi_ind(nfapi_pnf_p7_config_t* config, nfapi_cqi_indication_t* * \return 0 means success, -1 means failure */ int nfapi_pnf_p7_lbt_dl_ind(nfapi_pnf_p7_config_t* config, nfapi_lbt_dl_indication_t* ind); +int nfapi_pnf_p7_nr_uci_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_uci_indication_t* ind); /*! Send the NB_HARQ.indication * \param config A pointer to a PNF P7 config @@ -856,6 +860,7 @@ int nfapi_pnf_p7_nb_harq_ind(nfapi_pnf_p7_config_t* config, nfapi_nb_harq_indica * \return 0 means success, -1 means failure */ int nfapi_pnf_p7_nrach_ind(nfapi_pnf_p7_config_t* config, nfapi_nrach_indication_t* ind); +int nfapi_pnf_p7_nr_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rach_indication_t* ind); /*! Send a vendor exntesion message diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 7c4ab69305..fc1fa04948 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -288,6 +288,7 @@ void nr_csi_meas_reporting(int Mod_idP, } } +__attribute__((unused)) static void handle_dl_harq(module_id_t mod_id, int UE_id, int8_t harq_pid, @@ -392,7 +393,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, // NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; // const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; - const int num_slots = 20; + //const int num_slots = 20; // if ((uci_234->pduBitmap >> 1) & 0x01) { // // iterate over received harq bits // for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) { diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index f056e2b0ce..973036e7a0 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -176,7 +176,7 @@ static uint8_t check_trigger_meas_event( uint8_t ue_cnx_index, uint8_t meas_index, LTE_Q_OffsetRange_t ofn, LTE_Q_OffsetRange_t ocn, LTE_Hysteresis_t hys, - LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, LTE_TimeToTrigger_t ttt); + LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt); static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area); static void decode_MBMSCountingRequest(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area); @@ -825,6 +825,7 @@ rrc_ue_process_measConfig( measObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1, measObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf[0]); } else if (measObj->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectNR_r15) { + ue->subframeCount = 0; LOG_I(RRC, "NR_r15 Measurement: carrierFreq: %ld\n", measObj->measObject.choice.measObjectNR_r15.carrierFreq_r15); if (!get_softmodem_params()->nsa) { @@ -4436,10 +4437,6 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint LTE_MeasObjectId_t measObjId; LTE_ReportConfigId_t reportConfigId; UE_RRC_INST *ue = &UE_rrc_inst[ctxt_pP->module_id]; - bool is_in_period = false; - bool is_state_connected = false; - bool is_t304_inactive = false; - bool have_meas_flag = false; for(i=0 ; iMeasId[i][j] != NULL) { @@ -4485,7 +4482,7 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint ctxt_pP->module_id, ctxt_pP->frame, eNB_index, - i,j,ofn,ocn,hys,ofs,ocs,ttt_ms)) && + i,j,ofn,ocn,hys,ofs,ocs,a3_offset,ttt_ms)) && (ue->Info[0].State >= RRC_CONNECTED) && (ue->Info[0].T304_active == 0 ) && (ue->HandoverInfoUe.measFlag == 1)) { @@ -4530,25 +4527,19 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint if (ue->MeasObj[i][measObjId-1]->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectNR_r15) { if (!does_rrcConnReconfig_have_nr(ue)) break; - LTE_TimeToTrigger_t trig_per = ue->ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger; + LTE_ReportConfigInterRAT_t *rc = &ue->ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT; + LTE_TimeToTrigger_t trig_per = rc->triggerType.choice.event.timeToTrigger; ttt_ms = timeToTrigger_ms[trig_per]; - LOG_I(RRC, "[UE %d] Frame %d: B1_NR_r15 event. nr_meas %d, period %d, state %d, t304 %d, measfalg %d count %ld, ttt %ld\n", - ctxt_pP->module_id, ctxt_pP->frame, - does_rrcConnReconfig_have_nr(ue), - is_in_period, - is_state_connected, - is_t304_inactive, - have_meas_flag, - ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount, - ttt_ms); - if (ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount < ttt_ms) { - ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount = ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount + 1; + LOG_I(RRC, "[UE %d] Frame %d: B1_NR_r15 event. count %d, ttt %ld\n", + ctxt_pP->module_id, ctxt_pP->frame, ue->subframeCount, ttt_ms); + if (ue->subframeCount < ttt_ms) { + ++ue->subframeCount; break; } - else { - ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount = 0; - is_in_period = true; - } + ue->subframeCount = 0; + bool is_state_connected = false; + bool is_t304_inactive = false; + bool have_meas_flag = false; if (ue->Info[0].State >= RRC_CONNECTED) is_state_connected = true; if (ue->Info[0].T304_active == 0) @@ -4556,9 +4547,9 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint if (ue->HandoverInfoUe.measFlag == 1); have_meas_flag = true; - if (does_rrcConnReconfig_have_nr(ue) && is_in_period && is_state_connected && is_t304_inactive && have_meas_flag) { - LOG_I(RRC,"[UE %d] MELISSA ELAKDI! Frame %d: Triggering generation of Meas Report for NR_r15. count = %d\n", - ctxt_pP->module_id, ctxt_pP->frame, ue->ReportConfig[eNB_index][reportConfigId-1]->reportConfig.choice.reportConfigInterRAT.subframeCount); + if (is_state_connected && is_t304_inactive && have_meas_flag) { + LOG_I(RRC,"[UE %d] Frame %d: Triggering generation of Meas Report for NR_r15. count = %d\n", + ctxt_pP->module_id, ctxt_pP->frame, ue->subframeCount); if (ue->measReportList[i][j] == NULL) { ue->measReportList[i][j] = malloc(sizeof(MEAS_REPORT_LIST)); @@ -4596,6 +4587,7 @@ uint8_t check_trigger_meas_event( LTE_Hysteresis_t hys, LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, + long a3_offset, LTE_TimeToTrigger_t ttt ) { uint8_t eNB_offset; // uint8_t currentCellIndex = frame_parms->Nid_cell; diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h index 4f42a61610..ea7b3ad75d 100644 --- a/openair2/RRC/LTE/rrc_defs.h +++ b/openair2/RRC/LTE/rrc_defs.h @@ -937,6 +937,7 @@ typedef struct UE_RRC_INST_s { float rsrq_db[7]; float rsrp_db_filtered[7]; float rsrq_db_filtered[7]; + int subframeCount; /* KeNB as computed from parameters within USIM card */ uint8_t kenb[32]; uint8_t nh[32]; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index d2e5fce254..ff6a2c7afd 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -3451,7 +3451,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms80; ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.maxReportCells = 4; ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportInterval = LTE_ReportInterval_ms120; - ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.subframeCount = 0; ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.reportAmount = LTE_ReportConfigInterRAT__reportAmount_infinity; ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7 = calloc(1, sizeof(struct LTE_ReportConfigInterRAT__ext7)); diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c index 4b80644fa0..72bffa8e97 100644 --- a/openair3/S1AP/s1ap_eNB_handlers.c +++ b/openair3/S1AP/s1ap_eNB_handlers.c @@ -112,10 +112,6 @@ int s1ap_eNB_handle_s1_ENDC_e_rab_modification_confirm(uint32_t as uint32_t stream, S1AP_S1AP_PDU_t *pdu); -static int s1ap_eNB_snd_s1_setup_request( - s1ap_eNB_instance_t *instance_p, - s1ap_eNB_mme_data_t *s1ap_mme_data_p); - int s1ap_timer_setup( uint32_t interval_sec, uint32_t interval_us,