diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 5b214cf95a..67b0b610cc 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -167,7 +167,7 @@ typedef struct RadioResourceConfig_s { long ue_TransmissionMode; long ue_multiple_max; //SIB2 BR Options - long *preambleTransMax_CE_r13; + long preambleTransMax_CE_r13; BOOLEAN_t prach_ConfigCommon_v1310; BOOLEAN_t *mpdcch_startSF_CSS_RA_r13; long mpdcch_startSF_CSS_RA_r13_val; diff --git a/openair2/ENB_APP/enb_config_eMTC.c b/openair2/ENB_APP/enb_config_eMTC.c index cfd057bad8..2e71f17e9d 100644 --- a/openair2/ENB_APP/enb_config_eMTC.c +++ b/openair2/ENB_APP/enb_config_eMTC.c @@ -681,6 +681,58 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n", config_fname, cell_idx,eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx); + switch (eMTCconfig->preambleTransMax_CE_r13) { + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n4; + break; + + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n5; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n6; + break; + + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n7; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n10; + break; + + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n20; + break; + + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n50; + break; + + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].preambleTransMax_CE_r13= LTE_PreambleTransMax_n200; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax_CE_r13 choice: 3,4,5,6,7,8,10,20,50,100,200!\n", + config_fname, cell_idx,eMTCconfig->preambleTransMax_CE_r13); + break; + } + switch (eMTCconfig->ccparams.pcch_defaultPagingCycle) { case 32: RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pcch_defaultPagingCycle= LTE_PCCH_Config__defaultPagingCycle_rf32; diff --git a/openair2/ENB_APP/enb_paramdef_emtc.h b/openair2/ENB_APP/enb_paramdef_emtc.h index de774c4ea6..928c9d22e3 100644 --- a/openair2/ENB_APP/enb_paramdef_emtc.h +++ b/openair2/ENB_APP/enb_paramdef_emtc.h @@ -147,7 +147,7 @@ typedef struct ccparams_eMTC_s { int interval_DLHoppingConfigCommonModeA_r13_val; int interval_DLHoppingConfigCommonModeB_r13_val; int mpdcch_pdsch_HoppingOffset_r13; - char *preambleTransMax_CE_r13; + int preambleTransMax_CE_r13; int prach_HoppingOffset_r13; int schedulingInfoSIB1_BR_r13; int64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13; @@ -253,7 +253,7 @@ typedef struct ccparams_eMTC_s { {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13, NULL, 0, strptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, defstrval:"interval-FDD-r13", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13_VAL, NULL, 0, iptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val, defintval:0, TYPE_UINT, 0}, \ {ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_OFFSET_R13, NULL, 0, iptr:&eMTCconfig->mpdcch_pdsch_HoppingOffset_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, strptr:&eMTCconfig->preambleTransMax_CE_r13, defstrval:"n10", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, iptr:&eMTCconfig->preambleTransMax_CE_r13, defintval:10, TYPE_UINT, 0}, \ {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, defstrval:"n1", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL1, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level1_r13, defstrval:"", TYPE_STRING, 0}, \ {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL2, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level2_r13, defstrval:"", TYPE_STRING, 0}, \ diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index bd09540627..c34c65b195 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -1331,10 +1331,8 @@ uint8_t do_SIB23(uint8_t Mod_id, (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct LTE_RACH_ConfigCommon__ext1)); memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct LTE_RACH_ConfigCommon__ext1)); - if (rrconfig->preambleTransMax_CE_r13) { - (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t)); - *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = *rrconfig->preambleTransMax_CE_r13; // to be re-initialized when we find the enum - } else (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(LTE_PreambleTransMax_t)); + *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = rrconfig->preambleTransMax_CE_r13; // to be re-initialized when we find the enum (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(LTE_RACH_CE_LevelInfoList_r13_t)); memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(LTE_RACH_CE_LevelInfoList_r13_t));