UE NR PHY cell select minor fixes

master
Xavier Arteaga 3 years ago committed by Xavier Arteaga
parent 8854ba49b9
commit ae0fb4f4fc

@ -54,6 +54,13 @@ bool cell_search::start(const cfg_t& cfg)
ssb_cfg.pattern = cfg.ssb_pattern;
ssb_cfg.duplex_mode = cfg.duplex_mode;
// Print SSB configuration, helps debugging gNb and UE
if (logger.info.enabled()) {
std::array<char, 512> ssb_cfg_str = {};
srsran_ssb_cfg_to_str(&ssb_cfg, ssb_cfg_str.data(), (uint32_t)ssb_cfg_str.size());
logger.info("Cell search: Setting SSB configuration %s", ssb_cfg_str.data());
}
// Configure SSB
if (srsran_ssb_set_cfg(&ssb, &ssb_cfg) < SRSRAN_SUCCESS) {
logger.error("Cell search: Error setting SSB configuration");

@ -122,11 +122,9 @@ cell_search::ret_t sync_sa::cell_search_run(const cell_search::cfg_t& cfg)
rrc_proc_state = PROC_SEARCH_RUNNING;
// Configure searcher without locking state for avoiding stalling the Rx stream
logger.info("Cell search: starting in center frequency %.2f and SSB frequency %.2f with subcarrier spacing of %s",
cfg.center_freq_hz / 1e6,
cfg.ssb_freq_hz / 1e6,
srsran_subcarrier_spacing_to_str(cfg.ssb_scs));
// tune radio
logger.info("Tuning Rx channel %d to %.2f MHz", 0, cfg.center_freq_hz / 1e6);
radio->set_rx_freq(0, cfg.center_freq_hz);
if (not searcher.start(cfg)) {
logger.error("Sync: failed to start cell search");

Loading…
Cancel
Save