From 06eba7eb7281b0233b6312f09f87efb41e1518f3 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 20 Jul 2020 00:51:36 +0200 Subject: [PATCH] Discard cells if not found during cel selection --- srsue/src/stack/rrc/rrc.cc | 2 +- srsue/src/stack/rrc/rrc_meas.cc | 2 +- srsue/src/stack/rrc/rrc_procedures.cc | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index e19879c08..7da2ce098 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -438,7 +438,7 @@ void rrc::in_sync() // Cell selection criteria Section 5.2.3.2 of 36.304 bool rrc::cell_selection_criteria(float rsrp, float rsrq) { - return (get_srxlev(rsrp) > 0 || !meas_cells.serving_cell().has_sib3()); + return std::isnormal(rsrp) && (get_srxlev(rsrp) > 0 || !meas_cells.serving_cell().has_sib3()); } float rrc::get_srxlev(float Qrxlevmeas) diff --git a/srsue/src/stack/rrc/rrc_meas.cc b/srsue/src/stack/rrc/rrc_meas.cc index 5b0ef40bf..713a64ebd 100644 --- a/srsue/src/stack/rrc/rrc_meas.cc +++ b/srsue/src/stack/rrc/rrc_meas.cc @@ -494,7 +494,7 @@ void rrc::rrc_meas::var_meas_cfg::eval_triggers() float Ms = is_rsrp(report_cfg.trigger_quant.value) ? serv_cell->get_rsrp() : serv_cell->get_rsrq(); if (!std::isnormal(Ms)) { - log_h->warning("MEAS: Serving cell Ms=%f invalid when evaluating triggers\n", Ms); + log_h->debug("MEAS: Serving cell Ms=%f invalid when evaluating triggers\n", Ms); return; } diff --git a/srsue/src/stack/rrc/rrc_procedures.cc b/srsue/src/stack/rrc/rrc_procedures.cc index 3c0e553de..a29f07995 100644 --- a/srsue/src/stack/rrc/rrc_procedures.cc +++ b/srsue/src/stack/rrc/rrc_procedures.cc @@ -564,7 +564,7 @@ proc_outcome_t rrc::cell_selection_proc::start_cell_selection() } // If any of the known cells meets the selection criteria or could not be selected, search again. - Info("Could not select any kown cell. Searching new cells\n"); + Info("Could not select any known cell. Searching new cells\n"); if (not rrc_ptr->cell_searcher.launch(&cell_search_fut)) { return proc_outcome_t::error; } @@ -590,6 +590,7 @@ proc_outcome_t rrc::cell_selection_proc::step_cell_selection(const bool& cs_ret) Error("Could not camp on serving cell.\n"); } + rrc_ptr->meas_cells.serving_cell().set_rsrp(-INFINITY); discard_serving = true; // Discard this cell // Continue to next neighbour cell ++neigh_index;