diff --git a/cmake_targets/no_epc.sh b/cmake_targets/no_epc.sh index 582c0c4f6a..668268b153 100755 --- a/cmake_targets/no_epc.sh +++ b/cmake_targets/no_epc.sh @@ -1,3 +1,3 @@ #!/bin/bash -sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --nos1 +sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --noS1 diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index 868392566c..6777f39696 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -243,7 +243,7 @@ void fill_rach_indication_UE_MAC(int Mod_id, // Andrew - send proxy specific socket instead of oai_nfapi_rach_ind Send the whole UL_INFO struct // as soon as numberof preambles if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { - send_standalone_rach(&UL_INFO->rach_ind); // dont + send_standalone_msg(&UL_INFO, UL_INFO->rach_ind.header.message_id); } else { oai_nfapi_rach_ind(&UL_INFO->rach_ind); } @@ -1187,10 +1187,31 @@ void *ue_standalone_pnf_task(void *context) } } -void send_standalone_rach(nfapi_rach_indication_t *ind) +void send_standalone_msg(UL_IND_t *UL, nfapi_message_id_e msg_type) { + int encoded_size = -1; char buffer[1024]; - int encoded_size = nfapi_p7_message_pack(ind, buffer, sizeof(buffer), NULL); + switch (msg_type) + { + case NFAPI_RACH_INDICATION: + encoded_size = nfapi_p7_message_pack(&UL->rach_ind, buffer, sizeof(buffer), NULL); + break; + case NFAPI_CRC_INDICATION: + encoded_size = nfapi_p7_message_pack(&UL->crc_ind, buffer, sizeof(buffer), NULL); + break; + case NFAPI_RX_ULSCH_INDICATION: // is this the right nfapi message_id? Ask Raymond + encoded_size = nfapi_p7_message_pack(&UL->rx_ind, buffer, sizeof(buffer), NULL); + break; + case NFAPI_RX_CQI_INDICATION: // is this the right nfapi message_id? Ask Raymond + encoded_size = nfapi_p7_message_pack(&UL->cqi_ind, buffer, sizeof(buffer), NULL); + break; + case NFAPI_HARQ_INDICATION: + encoded_size = nfapi_p7_message_pack(&UL->harq_ind, buffer, sizeof(buffer), NULL); + break; + case NFAPI_RX_SR_INDICATION: // is this the right nfapi message_id? Ask Raymond + encoded_size = nfapi_p7_message_pack(&UL->sr_ind, buffer, sizeof(buffer), NULL); + break; + } if (encoded_size < 0) { LOG_E(MAC, "standalone rach pack failed\n"); diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index b1e840deab..ed5741e111 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -1234,8 +1234,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { if (UL_INFO->crc_ind.crc_indication_body.number_of_crcs > 0) { //LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf)); //LOG_I(MAC, "ul_config_req_UE_MAC 2.2, SFN/SF of PNF counter:%d.%d, number_of_crcs: %d \n", timer_frame, timer_subframe, UL_INFO->crc_ind.crc_indication_body.number_of_crcs); - oai_nfapi_crc_indication(&UL_INFO->crc_ind); - sent_any = true; + if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { + send_standalone_msg(&UL_INFO, UL_INFO->crc_ind.header.message_id); + sent_any = true; + } else { + oai_nfapi_crc_indication(&UL_INFO->crc_ind); + } //LOG_I(MAC, "ul_config_req_UE_MAC 2.21 \n"); UL_INFO->crc_ind.crc_indication_body.number_of_crcs = 0; } @@ -1243,8 +1247,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { if (UL_INFO->rx_ind.rx_indication_body.number_of_pdus > 0) { //LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf)); //LOG_I(MAC, "ul_config_req_UE_MAC 2.3, SFN/SF of PNF counter:%d.%d, number_of_pdus: %d \n", timer_frame, timer_subframe, UL_INFO->rx_ind.rx_indication_body.number_of_pdus); - oai_nfapi_rx_ind(&UL_INFO->rx_ind); - sent_any = true; + if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { + send_standalone_msg(&UL_INFO, UL_INFO->rx_ind.header.message_id); + sent_any = true; + } else { + oai_nfapi_rx_ind(&UL_INFO->rx_ind); + } for (uint8_t num_pdu = 0; num_pdu < UL_INFO->rx_ind.rx_indication_body.number_of_pdus; num_pdu++) { free(UL_INFO->rx_ind.rx_indication_body.rx_pdu_list[num_pdu].data); @@ -1255,23 +1263,35 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) { } if (UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis > 0) { - oai_nfapi_cqi_indication(&UL_INFO->cqi_ind); - sent_any = true; + if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { + send_standalone_msg(&UL_INFO, UL_INFO->cqi_ind.header.message_id); + sent_any = true; + } else { + oai_nfapi_cqi_indication(&UL_INFO->cqi_ind); + } UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis = 0; } if (UL_INFO->harq_ind.harq_indication_body.number_of_harqs > 0) { //LOG_D(MAC, "ul_config_req_UE_MAC 2.4, SFN/SF of PNF counter:%d.%d, number_of_harqs: %d \n", timer_frame, timer_subframe, UL_INFO->harq_ind.harq_indication_body.number_of_harqs); - oai_nfapi_harq_indication(&UL_INFO->harq_ind); - sent_any = true; + if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { + send_standalone_msg(&UL_INFO, UL_INFO->harq_ind.header.message_id); + sent_any = true; + } else { + oai_nfapi_harq_indication(&UL_INFO->harq_ind); + } //LOG_I(MAC, "ul_config_req_UE_MAC 2.41 \n"); UL_INFO->harq_ind.harq_indication_body.number_of_harqs = 0; } if (UL_INFO->sr_ind.sr_indication_body.number_of_srs > 0) { //LOG_I(MAC, "ul_config_req_UE_MAC 2.5, SFN/SF of PNF counter:%d.%d, number_of_srs: %d \n", timer_frame, timer_subframe, UL_INFO->sr_ind.sr_indication_body.number_of_srs); - oai_nfapi_sr_indication(&UL_INFO->sr_ind); - sent_any = true; + if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) { + send_standalone_msg(&UL_INFO, UL_INFO->sr_ind.header.message_id); + sent_any = true; + } else { + oai_nfapi_sr_indication(&UL_INFO->sr_ind); + } //LOG_I(MAC, "ul_config_req_UE_MAC 2.51 \n"); UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0; }