From 5c088d75ae78c5b83e205768274a4a2328835c70 Mon Sep 17 00:00:00 2001 From: Ralf Lindstedt <40667152+litist@users.noreply.github.com> Date: Thu, 31 Jan 2019 21:14:09 +0100 Subject: [PATCH 1/3] Fixed check for valid cell-identity group --- lib/src/phy/common/phy_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/phy/common/phy_common.c b/lib/src/phy/common/phy_common.c index 489d6b3a5..c9835f427 100644 --- a/lib/src/phy/common/phy_common.c +++ b/lib/src/phy/common/phy_common.c @@ -117,7 +117,7 @@ bool srslte_N_id_2_isvalid(uint32_t N_id_2) { } bool srslte_N_id_1_isvalid(uint32_t N_id_1) { - if (N_id_1 < 169) { + if (N_id_1 < 168) { return true; } else { return false; From 3cc4ca851a18b15234d849a5a4a8f9bf0768d30f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 20 Feb 2019 15:25:31 +0100 Subject: [PATCH 2/3] move setting of EARFCNs straight into parse_args function --- srsenb/src/enb.cc | 22 ++-------------------- srsenb/src/main.cc | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index 157f55209..32cc0ab27 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -78,7 +78,7 @@ enb::~enb() bool enb::init(all_args_t *args_) { - args = args_; + args = args_; if (!args->log.filename.compare("stdout")) { logger = &logger_stdout; @@ -219,25 +219,7 @@ bool enb::init(all_args_t *args_) } radio.set_rx_gain(args->rf.rx_gain); - radio.set_tx_gain(args->rf.tx_gain); - - if (args->rf.dl_freq < 0) { - args->rf.dl_freq = 1e6*srslte_band_fd(args->rf.dl_earfcn); - if (args->rf.dl_freq < 0) { - fprintf(stderr, "Error getting DL frequency for EARFCN=%d\n", args->rf.dl_earfcn); - return false; - } - } - if (args->rf.ul_freq < 0) { - if (args->rf.ul_earfcn == 0) { - args->rf.ul_earfcn = srslte_band_ul_earfcn(args->rf.dl_earfcn); - } - args->rf.ul_freq = 1e6*srslte_band_fu(args->rf.ul_earfcn); - if (args->rf.ul_freq < 0) { - fprintf(stderr, "Error getting UL frequency for EARFCN=%d\n", args->rf.dl_earfcn); - return false; - } - } + radio.set_tx_gain(args->rf.tx_gain); ((srslte::log_filter*) phy_log[0])->console("Setting frequency: DL=%.1f Mhz, UL=%.1f MHz\n", args->rf.dl_freq/1e6, args->rf.ul_freq/1e6); radio.set_tx_freq(args->rf.dl_freq); diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index 4b9683b2e..d471c6e17 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -240,6 +240,25 @@ void parse_args(all_args_t *args, int argc, char* argv[]) { cout << "Error parsing enb.mnc:" << mnc << " - must be a 2 or 3-digit string." << endl; } + // Convert UL/DL EARFCN to frequency if needed + if (args->rf.dl_freq < 0) { + args->rf.dl_freq = 1e6 * srslte_band_fd(args->rf.dl_earfcn); + if (args->rf.dl_freq < 0) { + fprintf(stderr, "Error getting DL frequency for EARFCN=%d\n", args->rf.dl_earfcn); + exit(1); + } + } + if (args->rf.ul_freq < 0) { + if (args->rf.ul_earfcn == 0) { + args->rf.ul_earfcn = srslte_band_ul_earfcn(args->rf.dl_earfcn); + } + args->rf.ul_freq = 1e6 * srslte_band_fu(args->rf.ul_earfcn); + if (args->rf.ul_freq < 0) { + fprintf(stderr, "Error getting UL frequency for EARFCN=%d\n", args->rf.dl_earfcn); + exit(1); + } + } + // Apply all_level to any unset layers if (vm.count("log.all_level")) { if(!vm.count("log.phy_level")) { From 429ee9019dcbf5bb261ac332425a9bc78b1e8a6c Mon Sep 17 00:00:00 2001 From: aholtzma Date: Thu, 4 Apr 2019 14:01:03 -0400 Subject: [PATCH 3/3] Fix enb putting the SSS in the wrong place with ext CP enabled. --- lib/src/phy/enb/enb_dl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/phy/enb/enb_dl.c b/lib/src/phy/enb/enb_dl.c index b5e2cd283..32703febb 100644 --- a/lib/src/phy/enb/enb_dl.c +++ b/lib/src/phy/enb/enb_dl.c @@ -333,7 +333,7 @@ void srslte_enb_dl_put_sync(srslte_enb_dl_t *q, uint32_t sf_idx) for (int p = 0; p < q->cell.nof_ports; p++) { srslte_pss_put_slot(q->pss_signal, q->sf_symbols[p], q->cell.nof_prb, q->cell.cp); srslte_sss_put_slot(sf_idx ? q->sss_signal5 : q->sss_signal0, q->sf_symbols[p], - q->cell.nof_prb, SRSLTE_CP_NORM); + q->cell.nof_prb, q->cell.cp); } } }