diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-12-18 23:55:10 +0100 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-12-22 16:28:27 +0100 |
commit | 9c6ac9e3e3878a5cbe1a261e91350a9123dec532 (patch) | |
tree | f32ca7364b68e7912a1748129b8c92e3179679ec /lib/source_impl.cc | |
parent | 5410ee53b26f954f9895f84257526e5b0c88e1d4 (diff) |
rfspace: add support for RFSPACE SDR-IQ and SDR-IP
Usage example:
osmocom_fft -a sdr-iq=/dev/ttyUSB0
osmocom_fft -a sdr-ip=host[:port]
osmocom_fft -a netsdr=host[:port][,nchan=2]
The following named gain stages are available:
SDR-IQ: ATT: -20 to +10 dB, in 10dB steps
SDR-IP: ATT: -30 to 0 dB, in 10dB steps
The ftdi_sio driver is being used for SDR-IQ. It creates a character
device of the form:
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
To be able to open the device without root permissions add yourself to
the "dialout" group or do a "chmod 666 /dev/ttyUSB0" after pluggin in.
Diffstat (limited to 'lib/source_impl.cc')
-rw-r--r-- | lib/source_impl.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/source_impl.cc b/lib/source_impl.cc index 7672de1..055657f 100644 --- a/lib/source_impl.cc +++ b/lib/source_impl.cc @@ -68,8 +68,8 @@ #include <bladerf_source_c.h> #endif -#ifdef ENABLE_NETSDR -#include <netsdr_source_c.h> +#ifdef ENABLE_RFSPACE +#include <rfspace_source_c.h> #endif #include "arg_helpers.h" @@ -132,8 +132,8 @@ source_impl::source_impl( const std::string &args ) #ifdef ENABLE_BLADERF dev_types.push_back("bladerf"); #endif -#ifdef ENABLE_NETSDR - dev_types.push_back("netsdr"); +#ifdef ENABLE_RFSPACE + dev_types.push_back("rfspace"); #endif std::cerr << "gr-osmosdr " << GR_OSMOSDR_VERSION << " (" << GR_OSMOSDR_LIBVER << ") " @@ -143,6 +143,12 @@ source_impl::source_impl( const std::string &args ) std::cerr << dev_type << " "; std::cerr << std::endl << std::flush; +#ifdef ENABLE_RFSPACE + dev_types.push_back("sdr-iq"); /* additional aliases for rfspace backend */ + dev_types.push_back("sdr-ip"); + dev_types.push_back("netsdr"); +#endif + BOOST_FOREACH(std::string arg, arg_list) { dict_t dict = params_to_dict(arg); BOOST_FOREACH(std::string dev_type, dev_types) { @@ -180,8 +186,8 @@ source_impl::source_impl( const std::string &args ) BOOST_FOREACH( std::string dev, bladerf_source_c::get_devices() ) dev_list.push_back( dev ); #endif -#ifdef ENABLE_NETSDR - BOOST_FOREACH( std::string dev, netsdr_source_c::get_devices() ) +#ifdef ENABLE_RFSPACE + BOOST_FOREACH( std::string dev, rfspace_source_c::get_devices() ) dev_list.push_back( dev ); #endif #ifdef ENABLE_HACKRF @@ -274,9 +280,12 @@ source_impl::source_impl( const std::string &args ) } #endif -#ifdef ENABLE_NETSDR - if ( dict.count("netsdr") ) { - netsdr_source_c_sptr src = make_netsdr_source_c( arg ); +#ifdef ENABLE_RFSPACE + if ( dict.count("rfspace") || + dict.count("sdr-iq") || + dict.count("sdr-ip") || + dict.count("netsdr") ) { + rfspace_source_c_sptr src = make_rfspace_source_c( arg ); block = src; iface = src.get(); } #endif |