Additions to get UE connected to EPC
This commit is contained in:
+12
-14
@@ -612,8 +612,8 @@ static void wait_nfapi_init(char *thread_name) {
|
||||
}
|
||||
|
||||
void init_pdcp(void) {
|
||||
if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
// pdcp_layer_init();
|
||||
//if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
@@ -622,20 +622,18 @@ void init_pdcp(void) {
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
|
||||
}
|
||||
|
||||
nr_pdcp_module_init(pdcp_initmask, 0);
|
||||
nr_pdcp_module_init(pdcp_initmask, 0);
|
||||
|
||||
if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {
|
||||
LOG_I(PDCP, "node is gNB \n");
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
}
|
||||
} else {
|
||||
LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
|
||||
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {*/
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
//}
|
||||
/*} else {
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
else if (nr_prach == 2)
|
||||
{
|
||||
LOG_I(NR_PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id);
|
||||
//nr_DRB_preconfiguration(mac->crnti);
|
||||
nr_DRB_preconfiguration(mac->crnti);
|
||||
}
|
||||
else if(nr_prach == 3)
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ void *gNB_app_task(void *args_p)
|
||||
}
|
||||
|
||||
if (RC.nb_nr_inst > 0) {
|
||||
init_pdcp();
|
||||
//init_pdcp();
|
||||
}
|
||||
|
||||
if (is_x2ap_enabled() ) { //&& !NODE_IS_DU(RC.rrc[0]->node_type)
|
||||
|
||||
@@ -3256,58 +3256,56 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0;
|
||||
ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
|
||||
&rat);
|
||||
|
||||
/* request NR configuration */
|
||||
LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8;
|
||||
LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0;
|
||||
LTE_UECapabilityEnquiry_v1180_IEs_t r11_80;
|
||||
LTE_UECapabilityEnquiry_v1310_IEs_t r13_10;
|
||||
LTE_UECapabilityEnquiry_v1430_IEs_t r14_30;
|
||||
LTE_UECapabilityEnquiry_v1510_IEs_t r15_10;
|
||||
OCTET_STRING_t req_freq;
|
||||
|
||||
if (nr_band>0) {
|
||||
memset(&r8_a0, 0, sizeof(r8_a0));
|
||||
memset(&r11_80, 0, sizeof(r11_80));
|
||||
memset(&r13_10, 0, sizeof(r13_10));
|
||||
memset(&r14_30, 0, sizeof(r14_30));
|
||||
memset(&r15_10, 0, sizeof(r15_10));
|
||||
|
||||
/* request NR configuration */
|
||||
r8->nonCriticalExtension = &r8_a0;
|
||||
r8_a0.nonCriticalExtension = &r11_80;
|
||||
r11_80.nonCriticalExtension = &r13_10;
|
||||
r13_10.nonCriticalExtension = &r14_30;
|
||||
r14_30.nonCriticalExtension = &r15_10;
|
||||
|
||||
memset(&r8_a0, 0, sizeof(r8_a0));
|
||||
memset(&r11_80, 0, sizeof(r11_80));
|
||||
memset(&r13_10, 0, sizeof(r13_10));
|
||||
memset(&r14_30, 0, sizeof(r14_30));
|
||||
memset(&r15_10, 0, sizeof(r15_10));
|
||||
/* TODO: no hardcoded values here */
|
||||
|
||||
r8->nonCriticalExtension = &r8_a0;
|
||||
r8_a0.nonCriticalExtension = &r11_80;
|
||||
r11_80.nonCriticalExtension = &r13_10;
|
||||
r13_10.nonCriticalExtension = &r14_30;
|
||||
r14_30.nonCriticalExtension = &r15_10;
|
||||
nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t));
|
||||
|
||||
/* TODO: no hardcoded values here */
|
||||
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
|
||||
nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA;
|
||||
nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t));
|
||||
nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band;
|
||||
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
|
||||
|
||||
nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t));
|
||||
|
||||
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
|
||||
nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA;
|
||||
nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t));
|
||||
nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band;
|
||||
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
|
||||
|
||||
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
|
||||
nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR;
|
||||
nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t));
|
||||
//if(nr_band > 0)
|
||||
nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t));
|
||||
nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR;
|
||||
nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t));
|
||||
if(nr_band > 0)
|
||||
nsa_band->choice.bandInformationNR->bandNR = nr_band;
|
||||
//else
|
||||
// nsa_band->choice.bandInformationNR->bandNR = 78;
|
||||
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
|
||||
else
|
||||
nsa_band->choice.bandInformationNR->bandNR = 78;
|
||||
ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band);
|
||||
|
||||
OCTET_STRING_t req_freq;
|
||||
//unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78
|
||||
unsigned char req_freq_buf[1024];
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList,
|
||||
NULL,
|
||||
(void *)nsa_band_list,
|
||||
req_freq_buf,
|
||||
1024);
|
||||
unsigned char req_freq_buf[1024];
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList,
|
||||
NULL,
|
||||
(void *)nsa_band_list,
|
||||
req_freq_buf,
|
||||
1024);
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list);
|
||||
xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list);
|
||||
|
||||
|
||||
|
||||
@@ -3318,16 +3316,14 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
||||
//0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a
|
||||
// };
|
||||
|
||||
req_freq.buf = req_freq_buf;
|
||||
req_freq.size = (enc_rval.encoded+7)/8;
|
||||
req_freq.buf = req_freq_buf;
|
||||
req_freq.size = (enc_rval.encoded+7)/8;
|
||||
// req_freq.size = 21;
|
||||
|
||||
r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq;
|
||||
// Add request for eutra-nr
|
||||
}
|
||||
// if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq;
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg);
|
||||
// }
|
||||
}
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message,
|
||||
NULL,
|
||||
|
||||
@@ -147,7 +147,8 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
|
||||
|
||||
//Measurement Report not supported in NB-IoT
|
||||
|
||||
#define RRC_BUF_SIZE 8192
|
||||
#define PAYLOAD_SIZE_MAX 1024
|
||||
#define RRC_BUF_SIZE 512
|
||||
#define UNDEF_SECURITY_MODE 0xff
|
||||
#define NO_SECURITY_MODE 0x20
|
||||
|
||||
|
||||
@@ -4627,7 +4627,7 @@ void ue_measurement_report_triggering(protocol_ctxt_t *const ctxt_pP, const uint
|
||||
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);
|
||||
//usleep(200000); Melissa Elkadi come back for EPC
|
||||
usleep(200000); //Melissa Elkadi come back for EPC
|
||||
if (ue->measReportList[i][j] == NULL) {
|
||||
ue->measReportList[i][j] = malloc(sizeof(MEAS_REPORT_LIST));
|
||||
}
|
||||
|
||||
@@ -328,7 +328,8 @@ typedef enum SL_TRIGGER_e {
|
||||
#define MAX_MEAS_CONFIG 7
|
||||
#define MAX_MEAS_ID 7
|
||||
|
||||
#define RRC_BUF_SIZE 8192
|
||||
#define PAYLOAD_SIZE_MAX 1024
|
||||
#define RRC_BUF_SIZE 512
|
||||
#define UNDEF_SECURITY_MODE 0xff
|
||||
#define NO_SECURITY_MODE 0x20
|
||||
|
||||
|
||||
@@ -127,7 +127,8 @@ typedef enum UE_STATE_NR_e {
|
||||
#define MAX_MEAS_CONFIG 7
|
||||
#define MAX_MEAS_ID 7
|
||||
|
||||
#define RRC_BUF_SIZE 8192
|
||||
#define PAYLOAD_SIZE_MAX 1024
|
||||
#define RRC_BUF_SIZE 512
|
||||
#define UNDEF_SECURITY_MODE 0xff
|
||||
#define NO_SECURITY_MODE 0x20
|
||||
|
||||
|
||||
Reference in New Issue
Block a user