diff --git a/srsenb/hdr/enb.h b/srsenb/hdr/enb.h index 08f75bc1e..fe99f16de 100644 --- a/srsenb/hdr/enb.h +++ b/srsenb/hdr/enb.h @@ -213,7 +213,7 @@ private: bool check_srslte_version(); int parse_sib1(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUCT *data); - int parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data); + int parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data, bool *mbsfn_section_present); int parse_sib3(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT *data); int parse_sib4(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_4_STRUCT *data); int parse_sib9(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_9_STRUCT *data); diff --git a/srsenb/sib.conf.example b/srsenb/sib.conf.example index dded32c7c..80b2894f6 100644 --- a/srsenb/sib.conf.example +++ b/srsenb/sib.conf.example @@ -111,17 +111,6 @@ sib2 = additional_spectrum_emission = 1; }; - mbsfnSubframeConfigList = - { - radioframeAllocationPeriod = "1"; - subframeAllocationNumFrames = "1"; - radioframeAllocationOffset = 0; - subframeAllocation = 63; - - }; - - mbsfnSubframeConfigListLength = 0; - time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. }; diff --git a/srsenb/sib.conf.mbsfn.example b/srsenb/sib.conf.mbsfn.example index 3fe2ddc11..f5ffcdd8c 100644 --- a/srsenb/sib.conf.mbsfn.example +++ b/srsenb/sib.conf.mbsfn.example @@ -46,8 +46,8 @@ sib2 = { high_speed_flag = false; prach_config_index = 3; - prach_freq_offset = 0; - zero_correlation_zone_config = 11; + prach_freq_offset = 2; + zero_correlation_zone_config = 5; }; }; pdsch_cnfg = @@ -122,8 +122,6 @@ sib2 = }; - mbsfnSubframeConfigListLength = 1; - time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. }; diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 0e4771e9f..d928cb482 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -201,7 +201,7 @@ int enb::parse_sib1(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_1_STRUC return parser::parse_section(filename, &sib1); } -int enb::parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data) +int enb::parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT *data, bool *mbsfn_section_present) { parser::section sib2("sib2"); @@ -214,12 +214,7 @@ int enb::parse_sib2(std::string filename, LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUC parser::section mbsfnSubframeConfigList("mbsfnSubframeConfigList"); sib2.add_subsection(&mbsfnSubframeConfigList); - bool mbsfn_present=false; - mbsfnSubframeConfigList.set_optional(&mbsfn_present); - - if (mbsfn_present) { - data->mbsfn_subfr_cnfg_list_size = 1; - } + mbsfnSubframeConfigList.set_optional(mbsfn_section_present); mbsfnSubframeConfigList.add_field( new parser::field @@ -876,11 +871,12 @@ int enb::parse_sibs(all_args_t *args, rrc_cfg_t *rrc_cfg, phy_cfg_t *phy_config_ // Generate SIB2 bzero(sib2, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_2_STRUCT)); - if (parse_sib2(args->enb_files.sib_config, sib2)) { + bool mbsfn_section_present = false; + if (parse_sib2(args->enb_files.sib_config, sib2, &mbsfn_section_present)) { return -1; } - // SRS not yet supported + // SRS not yet supported sib2->rr_config_common_sib.srs_ul_cnfg.present = false; if (sib2->ul_bw.present) { switch(args->enb.n_prb) { @@ -907,8 +903,13 @@ int enb::parse_sibs(all_args_t *args, rrc_cfg_t *rrc_cfg, phy_cfg_t *phy_config_ if (sib2->arfcn_value_eutra.present) { sib2->arfcn_value_eutra.value = args->rf.ul_earfcn; } - - // Generate SIB3 if defined in mapping info + + // Update MBSFN list counter. Only 1 supported + if (mbsfn_section_present) { + sib2->mbsfn_subfr_cnfg_list_size = 1; + } + + // Generate SIB3 if defined in mapping info if (sib_is_present(sib1->sched_info, sib1->N_sched_info, LIBLTE_RRC_SIB_TYPE_3)) { bzero(sib3, sizeof(LIBLTE_RRC_SYS_INFO_BLOCK_TYPE_3_STRUCT)); if (parse_sib3(args->enb_files.sib_config, sib3)) {