From d448eac94108e522a941628cc1ab5a42419e10d6 Mon Sep 17 00:00:00 2001 From: Bedran Karakoc Date: Thu, 27 Jan 2022 19:55:51 +0100 Subject: [PATCH] ue,rrc_nr: Add dummy handler for RRC Release to avoid logging an unhandled message error --- srsue/hdr/stack/rrc_nr/rrc_nr.h | 9 +++++---- srsue/src/stack/rrc_nr/rrc_nr.cc | 12 +++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/srsue/hdr/stack/rrc_nr/rrc_nr.h b/srsue/hdr/stack/rrc_nr/rrc_nr.h index f01525f4b..5ede655e4 100644 --- a/srsue/hdr/stack/rrc_nr/rrc_nr.h +++ b/srsue/hdr/stack/rrc_nr/rrc_nr.h @@ -148,6 +148,7 @@ private: void handle_rrc_reconfig(const asn1::rrc_nr::rrc_recfg_s& reconfig); void handle_dl_info_transfer(const asn1::rrc_nr::dl_info_transfer_s& dl_info_transfer); void handle_security_mode_command(const asn1::rrc_nr::security_mode_cmd_s& smc); + void handle_rrc_release(const asn1::rrc_nr::rrc_release_s& rrc_release); void generate_as_keys(); srsran::task_sched_handle task_sched; @@ -184,7 +185,7 @@ private: uint32_t sim_measurement_carrier_freq_r15; srsran::timer_handler::unique_timer sim_measurement_timer; - rrc_nr_state_t state = RRC_NR_STATE_IDLE; + rrc_nr_state_t state = RRC_NR_STATE_IDLE; uint8_t transaction_id = 0; @@ -251,9 +252,9 @@ private: class setup_request_proc; srsran::proc_t cell_selector; - srsran::proc_t conn_setup_proc; - srsran::proc_t conn_recfg_proc; - srsran::proc_t setup_req_proc; + srsran::proc_t conn_setup_proc; + srsran::proc_t conn_recfg_proc; + srsran::proc_t setup_req_proc; srsran::proc_manager_list_t callback_list; }; diff --git a/srsue/src/stack/rrc_nr/rrc_nr.cc b/srsue/src/stack/rrc_nr/rrc_nr.cc index 581641188..5f9876919 100644 --- a/srsue/src/stack/rrc_nr/rrc_nr.cc +++ b/srsue/src/stack/rrc_nr/rrc_nr.cc @@ -311,6 +311,11 @@ void rrc_nr::decode_dl_dcch(uint32_t lcid, unique_byte_buffer_t pdu) task_sched.defer_task([this, smc]() { handle_security_mode_command(smc); }); break; } + case dl_dcch_msg_type_c::c1_c_::types::rrc_release: { + rrc_release_s rrc_release = c1->rrc_release(); + task_sched.defer_task([this, rrc_release]() { handle_rrc_release(rrc_release); }); + break; + } default: logger.error("The provided DL-DCCH message type is not recognized or supported"); break; @@ -350,7 +355,7 @@ void rrc_nr::handle_sib1(const sib1_s& sib1) logger.info("SIB1 received, CellID=%d", meas_cells.serving_cell().get_cell_id() & 0xfff); meas_cells.serving_cell().set_sib1(sib1); - + // TODO: config basic config and remove early exit return; @@ -2117,6 +2122,11 @@ void rrc_nr::handle_security_mode_command(const asn1::rrc_nr::security_mode_cmd_ pdcp->enable_encryption(lcid, DIRECTION_TXRX); } +void rrc_nr::handle_rrc_release(const asn1::rrc_nr::rrc_release_s& rrc_release) +{ + logger.info("RRC Release not handled yet"); +} + // Security helper used by Security Mode Command and Mobility handling routines void rrc_nr::generate_as_keys() {