By using the OsmoSDR block you can take advantage of a common software api in your application(s) independent of the underlying radio hardware.

Build process

The Gnu Radio block requires a recent gnuradio (>= v3.7 if building master branch or 3.6.5 when building gr3.6 branch) to be installed.

Before building the block you have to make sure that all the dependencies (see list of supported devices above) you are intend to work with are properly installed. The build system of gr-osmosdr will recognize them and enable specific source/sink components thereafter.

Please note: prior pulling a new version from git and compiling it, please do a "make uninstall" first to properly remove the previous version.

Building with cmake:

git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/

If you are building for gnuradio 3.6 series, you have to switch to the gr3.6 branch as follows

git checkout gr3.6

then continue with

mkdir build
cd build/
cmake ../

Now cmake should print out a summary of enabled/disabled components. You may disable certain components by following guidelines shown by cmake. Make sure the device of your interest is listed here. Check your dependencies and retry otherwise.

bladeRF Source / Sink

Arguments that affect both the source & sink (i.e., the underlying device), when applied to either are marked bold.

Argument

Notes

bladerf[=0]

Device instance (optional). Currently, this is a 0-based device index. In the future, additional device attributes such as (a subset of) the serial number or desired backend would be desirable attributes to consider for this argument.

fpga=<'/path/to/the/bitstream.rbf'>

Load the FPGA bitstream from the specified file. This is required only once after powering the bladeRF on. If the FPGA is already loaded, this argument is ignored, unless 'fpga-reload=1' is specified.

fpga-reload=1

Force the FPGA to be reloaded. Requires fpga=<bitrstream> to be provided to have any effect.

buffers=<count>

Number of sample buffers to use. Increasing this value may alleviate transient timeouts, with the trade-off of added latency. This must be greater than the 'transfers' parameter. Default=32

buflen=<count>

Length of a sample buffer, in *samples* (not bytes). This must be a multiple of 1024. Default=4096

transfers=<count>

Number of in-flight sample buffer transfers. Defaults to one half of the 'buffers' count.

stream_timeout_ms=<timeout>

Specifies the timeout for the underlying sample stream. Default=3000.

loopback=<mode>

Configure the device for the specified loopback mode (disabled, baseband, or RF). See the libbladeRF documentation for descriptions of these available options: none, bb_txlpf_rxvga2, bb_txlpf_rxlpf, bb_txvga1_rxvga2, bb_txvga1_rxlpf, rf_lna1, rf_lna2, rf_lna3. The default mode is 'none'.

verbosity=<level>

Controls the verbosity of output written to stderr from libbladeRF. The available options, from least to most verbose are: silent, critical, error, warning, info, debug, verbose. The default level is determined by libbladeRF.

xb200

Automatic filter selection will be enabled if no value is given to the xb200 parameter.