Commit Graph

33 Commits

Author SHA1 Message Date
Clayton Smith e5bee0820f Replace BOOST_FOREACH with range-based for loops
Range-based for loops are available since C++11. Using them reduces
gr-osmosdr's dependence on Boost. Here I've done the replacement using a
global search-and-replace.

Signed-off-by: Eric Wild <>
2020-11-01 00:04:27 +01:00
Eric Wild dadabeceaf cmake: actually make linking work
Appending to lists from subdirs does not work as expected, so work
around that to allow collecting the necessary libs.
2020-08-03 02:20:16 +02:00
Piotr Krysik 8cf6840da1 cmake: Go back CMake min ver. 3.8 by removing need for CMP0079
CMake 3.13 is not present in older (~2 years old)
Linux distributions and GNU Radio requires min CMake
version 3.8.

All that is needed in order to avoid bumping CMake version
is to not use 'target_link_libraries' in subdirectories.
Here this is done by creating a list of needed
libraries and adding them for linking at the end (like
it was done in gr-osmosdr before porting to GNU Radio 3.8).

One thing that is lost here is 'PRIVATE' statement in case
of FCD libraries linking.

Signed-off-by: Eric Wild <>
2020-08-02 22:17:05 +02:00
Sylvain Munaut 5d59e56ff9 build: Update build system to GR 3.8 standards
Part of GNURadio 3.8 migration

Signed-off-by: Sylvain Munaut <>
2020-02-16 09:52:00 +01:00
Sylvain Munaut 982945a477 build: Update CMakeLists.txt copyright header
Part of GNURadio 3.8 migration

Signed-off-by: Sylvain Munaut <>
2020-02-16 09:51:37 +01:00
Dimitri Stolnikov aa4094b3fd introduce time & clock synchronisation APIs 2014-11-25 20:47:59 +01:00
Dimitri Stolnikov 8604d76df3 uhd: disable dynamic signature change due to gnuradio bug #719
2014-08-27 21:37:39 +02:00
Dimitri Stolnikov b9489aecdf uhd: implement stream arguments for sample format
cpu_format: sc8, sc16, fc32, fc64
otw_format: sc8, sc16
fullscale: specifies the full-scale amplitude when using floats.
peak: specifies a fractional sample level to calculate scaling with the
sc8 wire format.


osmocom_fft -a uhd,otw_format=sc8,fpga=usrp1_fpga_4rx.rbf -s 16M
2014-05-04 15:16:35 +02:00
Dimitri Stolnikov 8ee05d3196 uhd: catch exceptions from dc offset & iq imbalance setters
since dc offset / iq imbalance is not implemented for recent USRPs this
might cause undesired behavior in GRC. As a workaround we do not pass
them to the caller but print them to the stderr.
2014-05-03 23:40:57 +02:00
Dimitri Stolnikov ac95af24fa uhd: pass through only the requested number of channels
B210 USRP appears as a 2-channel device by default. We prevent weird
application behavior by restricting the number of connected channels to
the value given via nchan= argument (1 by default).
2014-04-16 22:55:40 +02:00
Dimitri Stolnikov 55d005e28d uhd: improve device discovery 2013-10-25 23:32:58 +02:00
Dimitri Stolnikov 6b0f84f4ed uhd: implement frequency correction 2013-06-10 21:15:58 +02:00
Dimitri Stolnikov 02f38ca908 uhd: implement dc correction 2013-06-09 20:19:17 +02:00
Dimitri Stolnikov 7b18254262 uhd: implement bandwidth controls 2013-06-08 22:14:40 +02:00
Dimitri Stolnikov 7e55cb9224 introduce osmosdr namespace, remove _c suffix
- the namespace conversion adopts the common gnuradio coding guidelines
- suffix removal is a preparation to support 8/16 bit complex data types
2013-05-30 16:14:22 +02:00
Dimitri Stolnikov 3e6a24e5d9 convert to gnuradio 3.7 interface 2013-05-29 22:34:40 +02:00
Dimitri Stolnikov af819dfa4a uhd: add TX support 2013-05-07 22:46:07 +02:00
Dimitri Stolnikov 52e1272ba5 uhd: update includes 2013-05-07 22:44:08 +02:00
Dimitri Stolnikov 901dca8135 remove APPEND from include_directories 2013-03-12 20:17:24 +01:00
Dimitri Stolnikov d4de9d18c1 remove unused self() 2013-02-16 12:44:38 +01:00
Dimitri Stolnikov 0f371eeca1 remove gain_mode getter/setter where not used 2013-02-16 12:36:06 +01:00
Dimitri Stolnikov f81bf7cf12 uhd: return default subdev in get_devices 2013-01-10 20:30:38 +01:00
Dimitri Stolnikov ccff99ea4f uhd: add lo_offset argument
This might be used to tune away from the noisy center region caused by
direct conversion receiver principle. The offset shall be choosen within
receiver (daughterboard) bandwidth.

Thanks to Marcus Leech & G0HWW for the original idea.
2012-11-29 22:38:52 +01:00
Dimitri Stolnikov 38811fb853 uhd: remove the equal character from uhd argument 2012-06-09 16:26:49 +02:00
Dimitri Stolnikov 3c3bdc15cf uhd: include type, name (if available) and serial in label property 2012-06-09 16:00:24 +02:00
Dimitri Stolnikov 3ea0b38810 introduce device discovery api
This API allows to acquire a list of devices connected to the host and
creates an argument string ready to be passed to a source object for

Each device_t entry contains a "label" entry, which holds the generic
device name which may be shown to the user for device selection.

For certain radio hardware extended entries ("name", "serial", "type")
may be available to make bijective device addressing possible.

The argument string for target types "rtl_tcp" and "file" might be
constructed using the osmosdr::device_t class facilities.


 #include <osmosdr_device.h>
 #include <osmosdr_source_c.h>

osmosdr::devices_t devs = osmosdr::device::find();

BOOST_FOREACH(osmosdr::device_t &dev, devs) // try to create each dev
  osmosdr_source_c_sptr src = osmosdr_make_source_c(dev.to_string());
2012-05-20 12:55:52 +02:00
Dimitri Stolnikov 6bef750ac9 change gain mode argument to 'automatic' for clarity 2012-05-17 10:35:58 +02:00
Dimitri Stolnikov 52b5a8a4d3 uhd: added UHD as dependency for the gr-uhd based module
this may be required for compilation since the gnuradio trunk doesn't
provide UHD's include path via pkg-config.
2012-05-12 23:04:03 +02:00
Dimitri Stolnikov d384cf52e2 append dependency include dirs when building components 2012-05-12 12:41:55 +02:00
Dimitri Stolnikov cf1c3ab117 pick first device if no device arguments were specified 2012-05-05 20:43:34 +02:00
Dimitri Stolnikov 3a47e3661c add api for manual gain mode control 2012-05-05 00:43:32 +02:00
Dimitri Stolnikov c1c0c2f212 first working multichannel source 2012-04-28 20:18:14 +02:00
Dimitri Stolnikov 584ddafe10 uhd: add initial component files 2012-04-26 19:20:16 +02:00