wiki:GrOsmoSDR
Last modified 3 days ago Last modified on 06/15/13 18:16:29

osmocom Gnu Radio Blocks

While primarily being developed for the OsmoSDR hardware, this block as well supports:

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
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.

-- ######################################################
-- # gr-osmosdr enabled components                         
-- ######################################################
--   * Python support
--   * Osmocom IQ Imbalance Correction
--   * sysmocom OsmoSDR
--   * FunCube Dongle
--   * IQ File Source
--   * Osmocom RTLSDR
--   * RTLSDR TCP Client
--   * Ettus USRP Devices
--   * Osmocom MiriSDR
--   * HackRF Jawbreaker
-- 
-- ######################################################
-- # gr-osmosdr disabled components                        
-- ######################################################
-- 
-- Building for version: 4c101ea4 / 0.0.1git
-- Using install prefix: /usr/local

Now build & install

make
sudo make install
sudo ldconfig

NOTE: The osmocom source/sink blocks will appear under 'Sources' and 'Sinks' categories in GRC menu.

To build the API documentation:

cd build/
cmake ../ -DENABLE_DOXYGEN=1
make -C docs

Automated installation

Marcus D. Leech has kindly integrated the forementioned build steps into his gnuradio installation script at http://www.sbrac.org/files/build-gnuradio. This is the most user-friendly option so far.

Device specification

You can specify the source or sink device using a comma separated string of argument=value pairs. The always-up-to-date block documentation with examples is available right here.

FCD Source

ArgumentNotes
fcd=<device-index> 0-based device identifier

OsmoSDR Source

ArgumentNotes
osmosdr=<device-index> 0-based device identifier
buffers=<number-of-buffers> Default is 32
buflen=<length-of-buffer> Default is 256kB, must be multiple of 512

RTL-SDR Source

ArgumentNotes
rtl=<device-index> 0-based device identifier OR serial number
rtl_xtal=<frequency> Frequency (Hz) used for the RTL chip, accepts eng notation
tuner_xtal=<frequency> Frequency (Hz) used for the tuner chip, accepts eng notation
buffers=<number-of-buffers> Default is 32
buflen=<length-of-buffer> Default is 256kB, must be multiple of 512
direct_samp=0|1|2 Enable direct sampling mode on the RTL chip. 0: Disable, 1: use I channel, 2: use Q channel
offset_tune=0|1 Enable offset tune mode for E4000 tuners

NOTE: use rtl_eeprom -s to program your own serial number to the device

NOTE: if you don't specify rtl_xtal/tuner_xtal, the underlying driver will use 28.0MHz

RTL-SDR TCP Source

ArgumentNotes
rtl_tcp=<hostname>:<port> hostname defaults to "localhost", port to "1234"
psize=<payload-size> Default is 16384 bytes
direct_samp=0|1|2 Enable direct sampling mode on the RTL chip 0=Off, 1=I-ADC input enabled, 2=Q-ADC input enabled
offset_tune=0|1 Enable offset tune mode for E4000 tuners

Miri Source

ArgumentNotes
miri=<device-index> 0-based device identifier
buffers=<number-of-buffers> Default is 32

NOTE: if you don't specify rtl_xtal/tuner_xtal, the underlying driver will use 28.0MHz

UHD Source / Sink

ArgumentNotes
uhd Use this argument without a value
nchan=<channel-count> For multichannel USRP configurations use the subdev parameter to specify stream mapping
subdev=<subdev-spec> Examples: "A:0", "B:0", "A:0 B:0" when nchan=2. Refer original ettus documentation on this
lo_offset=<frequency> Offset frequency in Hz, must be within daughterboard bandwidth. Accepts eng notation

Additional argument/value pairs will be passed to the underlying driver, for more information see specifying the subdevice and common device identifiers in the Ettus documentation.

HackRF Source / Sink

ArgumentNotes
hackrf Use this argument without a value
buffers=<number-of-buffers> Default is 32

Only the first device found may be used at the moment because of libhackrf limitation.

Transmit support has been verified by using the crc-mmbTools DAB sdr transmitter.

IQ File Source

ArgumentNotes
file=<path-to-file-name>
freq=<frequency> Center frequency in Hz, accepts eng notation
rate=<sampling-rate> Mandatory, in samples/s, accepts eng notation
repeat=true|false Default is true
throttle=true|false Throttle flow of samples, default is true

Included Apps

Spectrum Browser

osmocom_fft showing LTE signal captured with HackRF Jawbreaker

usage examples:

osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
osmocom_fft -a hackrf -v
osmocom_fft -a uhd -v

Signal generator

osmocom_siggen producing a GSM waveform

usage examples:

osmocom_siggen -a hackrf -f 100e6 --sine
osmocom_siggen -a hackrf -f 100e6 --sweep -x 2M -y 1 -c34
osmocom_siggen_nogui -a hackrf -f 100e6 --sweep -x 2e6 -y 10 -v
osmocom_siggen_nogui -a uhd,subdev=A:0 -f 100e6 --sweep -x 2e6 -y 10 -s 4e6 -v

Spectrum sensing

TODO: document

Known Apps

The following 3rd party applications are successfully using gr-osmosdr:

NameTypeAuthorURL
gr-pocsagGRC FlowgraphMarcus Leechhttps://www.cgran.org/browser/projects/gr-pocsag/trunk
multimode RXGRC FlowgraphMarcus Leechhttps://www.cgran.org/browser/projects/multimode/trunk
simple_fm_rvcGRC FlowgraphMarcus Leechhttps://www.cgran.org/browser/projects/simple_fm_rcv/trunk
Wireless Temp. Sensor RXGnuradio AppKevin Mehallhttps://github.com/kevinmehall/rtlsdr-433m-sensor
gqrxSDR GUIAlexandru Csetehttps://github.com/csete/gqrx
tetra_demod_fftTrunking RXosmocom teamosmosdr-tetra_demod_fft.py and the HOWTO
airprobeGSM snifferosmocom team et alhttp://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git
gr-smartnet (WIP)Trunking RXNick Fosterhttp://www.reddit.com/r/RTLSDR/comments/us3yo/rtlsdr_smartnet/
Notes from the author
gr-air-modesADS-B RXNick Fosterhttps://www.cgran.org/wiki/gr-air-modes call with --rtlsdr option
gr-ais (fork)AIS RXNick Foster
Antoine Sirinelli
Christian Gagneraud
https://github.com/chgans/gr-ais
GNSS-SDR GPS RX (Realtime!)Centre Tecnològic de
Telecomunicacions de Catalunya
Documentation and http://www.gnss-sdr.org
gr-scan Scannertechmeologyhttp://www.techmeology.co.uk/gr-scan/
pocsag-mrtMultichannel Realtime
Decoder
iZshhttps://github.com/iZsh/pocsag-mrt
osmo-gmr-rtlGMR1 RXDimitri Stolnikovhttp://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles
simple_ra (NEW)Radio Astronomy AppMarcus Leechhttps://cgran.org/wiki/simple_ra
FS20_decode (NEW)FS20 DecoderThomas Frischhttps://github.com/eT0M/rtl_sdr_FS20_decoder
OpenLTE (NEW)LTE ToolkitBen Wojtowiczhttp://sourceforge.net/p/openlte/home/Home/

Credits

gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen and Steve Markgraf.

Attachments