Project

General

Profile

Actions

GrOsmoSDR » History » Revision 84

« Previous | Revision 84/98 (diff) | Next »
horiz0n, 02/19/2016 10:50 PM


PageOutline

= 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
}}}

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. {{{
-- ######################################################
-- # gr-osmosdr enabled components
-- ######################################################
-- * Python support
-- * Osmocom IQ Imbalance Correction
-- * sysmocom OsmoSDR
-- * FUNcube Dongle
-- * FUNcube Dongle Pro+
-- * IQ File Source
-- * Osmocom RTLSDR
-- * RTLSDR TCP Client
-- * Ettus USRP Devices
-- * Osmocom MiriSDR
-- * HackRF Jawbreaker
-- * nuand bladeRF
-- * RFSPACE Receivers
--
-- ######################################################
-- # gr-osmosdr disabled components
-- ######################################################
--
-- Building for version: v0.1.0-4-g37aba331 / 0.1.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 [http://cgit.osmocom.org/gr-osmosdr/tree/grc/gen_osmosdr_blocks.py#n100 right here]. === FCD Source ===
Argument Notes
fcd=<device-index> 0-based device identifier, optional
device=hw:2 overrides the audio device
type=2 selects the dongle type, 1 for Classic, 2 for Pro+

The "device" argument overrides the audio device used by the underlying driver to access the dongle's IQ sample stream.

The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.

=== IQ File Source ===
Argument Notes
file=<path-to-file-name>
freq=<frequency> Center frequency in Hz, accepts scientific notation
rate=<sampling-rate> Mandatory, in samples/s, accepts scientific notation
repeat=true false Default is true
throttle=true false Throttle flow of samples, default is true
=== OsmoSDR Source ===
Argument Notes
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 ===
Argument Notes
rtl=<device-index> 0-based device identifier OR serial number
rtl_xtal=<frequency> Frequency (Hz) used for the RTL chip, accepts scientific notation
tuner_xtal=<frequency> Frequency (Hz) used for the tuner chip, accepts scientific 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 ===
Argument Notes
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 ===
Argument Notes
miri=<device-index> 0-based device identifier
buffers=<number-of-buffers> Default is 32

=== SDRplay Source ===

The sdrplay source uses a precompiled (closed source) library available from http://www.sdrplay.com/api_drivers.html to interface with the hardware. To enable this nonfree driver you have to call cmake with the additional parameter -DENABLE_NONFREE=TRUE

sdrplay Use this argument without a value
=== UHD Source / Sink ===
Argument Notes
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 scientific notation

Additional argument/value pairs will be passed to the underlying driver, for more information see
[http://files.ettus.com/uhd_docs/manual/html/general.html#specifying-the-subdevice-to-use specifying the subdevice] and
[http://files.ettus.com/uhd_docs/manual/html/identification.html#common-device-identifiers common device identifiers] in the Ettus documentation.

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

{{{
The following values are valid for the xb200 parameter:
"custom" : custom band
"50M" : 50MHz band
"144M" : 144MHz band
"222M" : 222MHz band
"auto3db" : Select fiterbank based on -3dB filter points
"auto" : Select filerbank based on -1dB filter points (default)

gr-osmosdr <-> bladeRF gain mappings (2015-04-22)

Sink:
BB Gain: TX VGA1 (-35, -4)
IF Gain: N/A
RF Gain: TX VGA2 (0, 25)

Source:
RF Gain: LNA Gain [0, 3, 6]
IF Gain: N/A
BB Gain: : RX VGA1 + RX VGA2 (5, 60)
}}}

=== HackRF Source / Sink ===
Argument Notes
hackrf=<device-index> 0-based device identifier OR serial number
bias=0 1 Disable or enable antenna bias voltage in receive mode (source)
bias_tx=0 1 Disable or enable antenna bias voltage in transmit mode (sink)
buffers=<number-of-buffers> Default is 32

You can specify either hackrf=0 and hackrf=1 to select by a device index, or the serial number (or an unique suffix of a serial number), hackrf=f00d and hackrf=1234abba. hackrf_info lists multiple devices and their serial numbers. Device selection by serial number tail ("hackrf=beeff00d") requires updated hackrf firmware. The firmware changes have been in the hackrf git master, but there's no official firmware binary published yet (02.06.2015).

Beware of a little catch, there are some examples floating on the net with "hackrf=1" as the device argument. Device index numbers are 0-based (like with rtlsdr and other drivers), so you'll have to use hackrf=0 if you only have a single device attached, hackrf=1 would be the second device. Before this patch the hackrf gr-osmosdr driver did not care about the parameter at all.

Transmit support has been verified by using the [http://sdr.osmocom.org/trac/attachment/wiki/GrOsmoSDR/hackrf-dab.jpg crc-mmbTools DAB sdr transmitter].

=== RFSPACE Source ===
Argument Notes
sdr-iq[=<serial-port>] Optional parameter, serial-port defaults to the serial port (like /dev/ttyUSB0) used by first detected SDR-IQ
sdr-ip[=<hostname>][:<port>] Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected SDR-IP
netsdr[=<hostname>][:<port>] Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected NetSDR
nchan=<channel-count> Optional parameter for NetSDR, must be 1 or 2

The SDR-IP/NetSDR discovery protocol (UDP broadcast) is implemented, thus specifying the ip & port should not be neccessary. Note: for the receiver to operate properly it is required that the UDP packets (port 50000) carrying the sample data can reach your PC, therefore configure your firewall/router/etc. accordingly...

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.

=== AirSpy Source ===

airspy Use this argument without a value
bias=1 0 Enable or disable DC bias at the antenna input
Included Apps

=== Spectrum Browser ===

Image(fft-lte.png)

RTSA-like spectrum visualization is available through [https://sdr.osmocom.org/trac/wiki/fosphor fosphor] component. Call osmocom_fft with -F switch to enable it (a graphics card supporting OpenCL/OpenGL interop is a requirement).

Image(fosphor.png)

Image(fosphor2.png)

usage examples: {{{
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
osmocom_fft -a rfspace -v
osmocom_fft -a bladerf -v
osmocom_fft -a hackrf -v
osmocom_fft -a uhd -v
osmocom_fft -a airspy -v
}}}

DC offset and IQ imbalance correction controls may be enabled using --dc-offset-mode=0 and --iq-balance-mode=0 command line switches respectively.

=== Signal generator ===

Image(siggen-gsm.png) Image(gsm-hackrf-8M.png, 500px)

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
osmocom_siggen -a bladerf -f 1G --sweep -x 4M -y 1 -s 4M
}}} === Spectrum sensing ===

TODO: document

Known Apps

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

'''Name''' '''Type''' '''Author''' '''URL'''
gr-pocsag GRC Flowgraph Marcus Leech [https://www.cgran.org/browser/projects/gr-pocsag/trunk]
multimode RX GRC Flowgraph Marcus Leech [https://www.cgran.org/browser/projects/multimode/trunk]
simple_fm_rvc GRC Flowgraph Marcus Leech [https://www.cgran.org/browser/projects/simple_fm_rcv/trunk]
Wireless Temp. Sensor RX Gnuradio App Kevin Mehall [https://github.com/kevinmehall/rtlsdr-433m-sensor]
gqrx SDR GUI Alexandru Csete [https://github.com/csete/gqrx]
tetra_demod_fft Trunking RX osmocom team [http://cgit.osmocom.org/cgit/osmo-tetra/tree/src/demod/python/osmosdr-tetra_demod_fft.py osmosdr-tetra_demod_fft.py] and the [http://tetra.osmocom.org/trac/wiki/osmo-tetra#Quickexample HOWTO]
airprobe GSM sniffer osmocom team et al [http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git]
gr-smartnet (WIP) Trunking RX Nick Foster [br[http://www.reddit.com/r/RTLSDR/comments/vbxl0/attention_grsmartnet_users_or_attempted_users/">http://www.reddit.com/r/RTLSDR/comments/us3yo/rtlsdr_smartnet/]br[http://www.reddit.com/r/RTLSDR/comments/vbxl0/attention_grsmartnet_users_or_attempted_users/ Notes from the author]
gr-air-modes ADS-B RX Nick Foster [https://www.cgran.org/wiki/gr-air-modes] call with --rtlsdr option
gr-ais (fork) AIS RX Nick FosterbrAntoine SirinellibrChristian Gagneraud [https://github.com/chgans/gr-ais]
GNSS-SDR GPS RX (Realtime!) Centre Tecnològic debrTelecomunicacions de Catalunya [http://www.gnss-sdr.org/documentation/gnss-sdr-operation-realtek-rtl2832u-usb-dongle-dvb-t-receiver Documentation] and [http://www.gnss-sdr.org]
gr-scan Scanner techmeology [http://www.techmeology.co.uk/gr-scan/]
pocsag-mrt Multichannel RealtimebrDecoder iZsh [https://github.com/iZsh/pocsag-mrt]
osmo-gmr-rtl GMR1 RX Dimitri Stolnikov [http://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles]
simple_ra Radio Astronomy App Marcus Leech [https://cgran.org/wiki/simple_ra]
FS20_decode FS20 Decoder Thomas Frisch [https://github.com/eT0M/rtl_sdr_FS20_decoder]
OpenLTE '''(NEW)''' LTE Toolkit Ben Wojtowicz [http://sourceforge.net/p/openlte/home/Home/]
sdrangelove '''(NEW)''' SDR GUI Christian Daniel [http://sdrangelove.org]
gr-dvbt '''(NEW)''' DVB-T Transmitter & Receiver Bogdan Diaconescu [https://github.com/BogdanDIA/gr-dvbt] [http://yo3iiu.ro/blog/?p=1191 Blog Post] [http://nuand.com/forums/viewtopic.php?f=8&t=3499#p5124 bladeRF transmit flowgraph]
Credits

gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen, Steve Markgraf, Sylvain Munaut and Nuand LLC folks.

Files (7)
hackrf-siggen.png View hackrf-siggen.png 79.1 KB signal generator app horiz0n, 05/26/2013 11:15 AM
hackrf-dab.jpg View hackrf-dab.jpg 127 KB HackRF transmitting DAB signal generated by crc-mmbTools horiz0n, 05/26/2013 11:18 AM
fft-lte.png View fft-lte.png 55.8 KB osmocom_fft showing LTE signal captured with HackRF Jawbreaker horiz0n, 06/15/2013 08:00 AM
siggen-gsm.png View siggen-gsm.png 26.9 KB osmocom_siggen producing a GSM waveform horiz0n, 06/15/2013 08:01 AM
fosphor.png View fosphor.png 433 KB LTE carrier horiz0n, 10/26/2013 10:09 AM
fosphor2.png View fosphor2.png 480 KB GSM900 band horiz0n, 10/26/2013 10:10 AM
gsm-hackrf-8M.png View gsm-hackrf-8M.png 9.69 KB osmocom_siggen running the GSM waveform on a HackRF horiz0n, 12/30/2013 03:42 PM

Updated by horiz0n about 8 years ago · 84 revisions

Add picture from clipboard (Maximum size: 48.8 MB)