diff --git a/CMakeLists.txt b/CMakeLists.txt index 30986ece9..fad9252d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ option(DISABLE_SIMD "disable simd instructions" OFF) option(ENABLE_GUI "Enable GUI (using srsGUI)" ON) option(ENABLE_BLADERF "Enable BladeRF" ON) +option(ENABLE_SOAPYSDR "Enable SoapySDR" ON) option(BUILD_STATIC "Attempt to statically link external deps" OFF) option(RPATH "Enable RPATH" OFF) @@ -158,11 +159,13 @@ if(ENABLE_BLADERF) endif(ENABLE_BLADERF) # Soapy -find_package(SoapySDR) -if(SOAPYSDR_FOUND) - include_directories(${SOAPYSDR_INCLUDE_DIRS}) - link_directories(${SOAPYSDR_LIBRARY_DIRS}) -endif(SOAPYSDR_FOUND) +if(ENABLE_SOAPYSDR) + find_package(SoapySDR) + if(SOAPYSDR_FOUND) + include_directories(${SOAPYSDR_INCLUDE_DIRS}) + link_directories(${SOAPYSDR_LIBRARY_DIRS}) + endif(SOAPYSDR_FOUND) +endif(ENABLE_SOAPYSDR) if(BLADERF_FOUND OR UHD_FOUND OR SOAPYSDR_FOUND) set(RF_FOUND TRUE CACHE INTERNAL "RF frontend found") diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c index 357707324..dc1bf6415 100644 --- a/lib/src/phy/rf/rf_uhd_imp.c +++ b/lib/src/phy/rf/rf_uhd_imp.c @@ -435,6 +435,12 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels) args = "type=e3x0,master_clock_rate=30.72e6"; handler->dynamic_rate = false; handler->devname = DEVNAME_E3X0; + } else if (find_string(devices_str, "type=n3xx")) { + args = "type=n3xx,master_clock_rate=122.88e6"; + handler->current_master_clock = 122880000; + handler->dynamic_rate = false; + handler->devname = DEVNAME_N300; + srslte_use_standard_symbol_size(true); } } else { // If args is set and x300 type is specified, make sure master_clock_rate is defined @@ -444,7 +450,14 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels) handler->current_master_clock = 184320000; handler->dynamic_rate = false; handler->devname = DEVNAME_X300; - } else if (strstr(args, "type=e3x0")) { + } else if (strstr(args, "type=n3xx")) { + sprintf(args2, "%s,master_clock_rate=122.88e6", args); + args = args2; + handler->current_master_clock = 122880000; + handler->dynamic_rate = false; + handler->devname = DEVNAME_N300; + srslte_use_standard_symbol_size(true); + } else if (strstr(args, "type=e3x0")) { snprintf(args2, sizeof(args2), "%s,master_clock_rate=30.72e6", args); args = args2; handler->devname = DEVNAME_E3X0; @@ -495,6 +508,8 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels) handler->devname = DEVNAME_B200; } else if (strstr(dev_str, "X3") || strstr(dev_str, "X3")) { handler->devname = DEVNAME_X300; + } else if (strstr(dev_str, "n3xx")) { + handler->devname = DEVNAME_N300; } } if (!handler->devname) { diff --git a/lib/src/phy/rf/rf_uhd_imp.h b/lib/src/phy/rf/rf_uhd_imp.h index 6bc0f22f7..e0ad09bba 100644 --- a/lib/src/phy/rf/rf_uhd_imp.h +++ b/lib/src/phy/rf/rf_uhd_imp.h @@ -32,6 +32,7 @@ #define DEVNAME_B200 "uhd_b200" #define DEVNAME_X300 "uhd_x300" +#define DEVNAME_N300 "uhd_n300" #define DEVNAME_E3X0 "uhd_e3x0" diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index eccf18f6a..2b5ad1d4e 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -95,6 +95,7 @@ void rrc::stop() pthread_mutex_destroy(&paging_mutex); } + /******************************************************************************* Public functions