diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 4d501a96f..80856e8ce 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -1055,6 +1055,13 @@ rrc::ue::ue(rrc* outer_rrc, uint16_t rnti_, const sched_interface::ue_cfg_t& sch current_sched_ue_cfg(sched_ue_cfg), phy_rrc_dedicated_list(sched_ue_cfg.supported_cc_list.size()) { + if (current_sched_ue_cfg.supported_cc_list.empty() or not current_sched_ue_cfg.supported_cc_list[0].active) { + parent->rrc_log->warning("No PCell set. Picking eNBccIdx=0 as PCell\n"); + current_sched_ue_cfg.supported_cc_list.resize(0); + current_sched_ue_cfg.supported_cc_list[0].active = true; + current_sched_ue_cfg.supported_cc_list[0].enb_cc_idx = 0; + } + activity_timer = outer_rrc->timers->get_unique_timer(); set_activity_timeout(MSG3_RX_TIMEOUT); // next UE response is Msg3 mobility_handler.reset(new rrc_mobility(this)); diff --git a/srsenb/test/upper/erab_setup_test.cc b/srsenb/test/upper/erab_setup_test.cc index 89c89a2d9..2a2198d65 100644 --- a/srsenb/test/upper/erab_setup_test.cc +++ b/srsenb/test/upper/erab_setup_test.cc @@ -53,8 +53,12 @@ int test_erab_setup(bool qci_exists) rrc.tti_clock(); }; - uint16_t rnti = 0x46; - rrc.add_user(rnti, {}); + uint16_t rnti = 0x46; + sched_interface::ue_cfg_t ue_cfg; + ue_cfg.supported_cc_list.resize(1); + ue_cfg.supported_cc_list[0].active = true; + ue_cfg.supported_cc_list[0].enb_cc_idx = 0; + rrc.add_user(rnti, ue_cfg); rrc_log->set_level(srslte::LOG_LEVEL_NONE); // mute all the startup log