Project

General

Profile

GrOsmoSDR » History » Version 72

horiz0n, 02/19/2016 10:50 PM

1 1 horiz0n
[[PageOutline]]
2 1 horiz0n
3 47 horiz0n
= osmocom Gnu Radio Blocks =
4 1 horiz0n
5 20 horiz0n
While primarily being developed for the OsmoSDR hardware, this block as well supports:
6 1 horiz0n
7 20 horiz0n
 * [http://tetra.osmocom.org/trac/wiki/Funcube_Dongle FunCube Dongle] through libgnuradio-fcd
8 50 horiz0n
 * [http://www.funcubedongle.com/?page_id=1073 FUNcube Dongle Pro+] through [https://github.com/dl1ksv/gr-fcdproplus gr-fcdproplus]
9 44 horiz0n
 * [http://sdr.osmocom.org/trac/ sysmocom OsmoSDR] Devices through [http://cgit.osmocom.org/osmo-sdr/ libosmosdr]
10 51 horiz0n
 * [http://nuand.com/ Nuand LLC bladeRF] through [https://github.com/Nuand/bladeRF libbladeRF library]
11 20 horiz0n
 * [http://greatscottgadgets.com/hackrf/ Great Scott Gadgets HackRF] through [https://github.com/mossmann/hackrf libhackrf]
12 56 horiz0n
 * [http://www.ettus.com/product Ettus USRP] Devices through [http://files.ettus.com/uhd_docs/manual/html/build.html Ettus UHD library]
13 56 horiz0n
 * [http://umtrx.org Fairwaves UmTRX] through [https://github.com/fairwaves/UHD-Fairwaves Fairwaves' fork of Ettus' UHD library]
14 61 horiz0n
 * RFSPACE [http://www.rfspace.com/RFSPACE/SDR-IQ.html SDR-IQ], [http://www.rfspace.com/RFSPACE/SDR-IP.html SDR-IP], [http://rfspace.com/RFSPACE/NetSDR.html NetSDR] [http://www.rfspace.com/RFSPACE/NetSDR-X2.html (incl. X2 option)]
15 20 horiz0n
 * RTL2832U based DVB-T dongles through [http://sdr.osmocom.org/trac/wiki/rtl-sdr librtlsdr]
16 20 horiz0n
 * RTL-TCP spectrum server (see librtlsdr project)
17 20 horiz0n
 * MSi2500 based DVB-T dongles through [http://cgit.osmocom.org/libmirisdr/ libmirisdr]
18 69 horiz0n
 * [http://www.airspy.com/ AirSpy R820t] dongles through [https://github.com/airspy/host libairspy]
19 42 horiz0n
 * gnuradio .cfile input through libgnuradio-blocks
20 20 horiz0n
21 20 horiz0n
By using the OsmoSDR block you can take advantage of a common software api in your application(s) independent of the underlying radio hardware.
22 20 horiz0n
23 1 horiz0n
== Build process ==
24 1 horiz0n
25 48 horiz0n
'''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.'''
26 20 horiz0n
27 43 horiz0n
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.
28 1 horiz0n
29 1 horiz0n
Please note: prior pulling a new version from git and compiling it, please do a "make uninstall" first to properly remove the previous version.
30 1 horiz0n
31 1 horiz0n
Building with cmake:
32 30 horiz0n
33 1 horiz0n
{{{
34 1 horiz0n
git clone git://git.osmocom.org/gr-osmosdr
35 1 horiz0n
cd gr-osmosdr/
36 48 horiz0n
}}}
37 48 horiz0n
38 48 horiz0n
If you are building for gnuradio 3.6 series, you have to switch to the gr3.6 branch as follows
39 48 horiz0n
{{{
40 48 horiz0n
git checkout gr3.6
41 48 horiz0n
}}}
42 48 horiz0n
43 51 horiz0n
then continue with
44 48 horiz0n
{{{
45 1 horiz0n
mkdir build
46 1 horiz0n
cd build/
47 14 horiz0n
cmake ../
48 30 horiz0n
}}}
49 30 horiz0n
50 34 horiz0n
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.
51 30 horiz0n
{{{
52 30 horiz0n
-- ######################################################
53 30 horiz0n
-- # gr-osmosdr enabled components                         
54 30 horiz0n
-- ######################################################
55 30 horiz0n
--   * Python support
56 30 horiz0n
--   * Osmocom IQ Imbalance Correction
57 1 horiz0n
--   * sysmocom OsmoSDR
58 51 horiz0n
--   * FUNcube Dongle
59 51 horiz0n
--   * FUNcube Dongle Pro+
60 30 horiz0n
--   * IQ File Source
61 30 horiz0n
--   * Osmocom RTLSDR
62 30 horiz0n
--   * RTLSDR TCP Client
63 30 horiz0n
--   * Ettus USRP Devices
64 30 horiz0n
--   * Osmocom MiriSDR
65 1 horiz0n
--   * HackRF Jawbreaker
66 51 horiz0n
--   * nuand bladeRF
67 61 horiz0n
--   * RFSPACE Receivers
68 30 horiz0n
-- 
69 30 horiz0n
-- ######################################################
70 30 horiz0n
-- # gr-osmosdr disabled components                        
71 1 horiz0n
-- ######################################################
72 30 horiz0n
-- 
73 51 horiz0n
-- Building for version: v0.1.0-4-g37aba331 / 0.1.1git
74 30 horiz0n
-- Using install prefix: /usr/local
75 30 horiz0n
}}}
76 30 horiz0n
77 30 horiz0n
Now build & install
78 30 horiz0n
{{{
79 1 horiz0n
make
80 1 horiz0n
sudo make install
81 1 horiz0n
sudo ldconfig
82 1 horiz0n
}}}
83 1 horiz0n
84 44 horiz0n
NOTE: The osmocom source/sink blocks will appear under 'Sources' and 'Sinks' categories in GRC menu.
85 1 horiz0n
86 10 chris
To build the API documentation:
87 10 chris
{{{
88 10 chris
cd build/
89 1 horiz0n
cmake ../ -DENABLE_DOXYGEN=1
90 1 horiz0n
make -C docs
91 14 horiz0n
}}}
92 44 horiz0n
93 1 horiz0n
== Automated installation ==
94 1 horiz0n
95 1 horiz0n
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.
96 7 horiz0n
97 11 chris
== Device specification ==
98 33 horiz0n
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].
99 19 horiz0n
100 18 horiz0n
=== FCD Source ===
101 18 horiz0n
||Argument||Notes||
102 54 horiz0n
||fcd=<device-index>|| 0-based device identifier, optional||
103 54 horiz0n
||device=hw:2|| overrides the audio device||
104 54 horiz0n
||type=2|| selects the dongle type, 1 for Classic, 2 for Pro+||
105 50 horiz0n
106 50 horiz0n
The "device" argument overrides the audio device used by the underlying driver to access the dongle's IQ sample stream.
107 50 horiz0n
108 50 horiz0n
The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.
109 18 horiz0n
110 58 horiz0n
=== IQ File Source ===
111 58 horiz0n
||Argument||Notes||
112 58 horiz0n
||file=<path-to-file-name>||||
113 58 horiz0n
||freq=<frequency>|| Center frequency in Hz, accepts eng notation||
114 58 horiz0n
||rate=<sampling-rate>|| Mandatory, in samples/s, accepts eng notation||
115 58 horiz0n
||repeat=true|false|| Default is true||
116 58 horiz0n
||throttle=true|false|| Throttle flow of samples, default is true||
117 58 horiz0n
118 1 horiz0n
=== OsmoSDR Source ===
119 28 horiz0n
||Argument||Notes||
120 28 horiz0n
||osmosdr=<device-index>|| 0-based device identifier||
121 1 horiz0n
||buffers=<number-of-buffers>|| Default is 32||
122 28 horiz0n
||buflen=<length-of-buffer>|| Default is 256kB, must be multiple of 512||
123 1 horiz0n
124 11 chris
=== RTL-SDR Source ===
125 28 horiz0n
||Argument||Notes||
126 28 horiz0n
||rtl=<device-index>|| 0-based device identifier OR serial number||
127 28 horiz0n
||rtl_xtal=<frequency>|| Frequency (Hz) used for the RTL chip, accepts eng notation||
128 28 horiz0n
||tuner_xtal=<frequency>|| Frequency (Hz) used for the tuner chip, accepts eng notation||
129 1 horiz0n
||buffers=<number-of-buffers>|| Default is 32||
130 28 horiz0n
||buflen=<length-of-buffer>|| Default is 256kB, must be multiple of 512||
131 29 horiz0n
||direct_samp=0|1|2|| Enable direct sampling mode on the RTL chip. 0: Disable, 1: use I channel, 2: use Q channel||
132 29 horiz0n
||offset_tune=0|1|| Enable offset tune mode for E4000 tuners||
133 28 horiz0n
134 28 horiz0n
NOTE: use rtl_eeprom -s to program your own serial number to the device
135 32 horiz0n
136 11 chris
NOTE: if you don't specify rtl_xtal/tuner_xtal, the underlying driver will use 28.0MHz
137 1 horiz0n
138 1 horiz0n
=== RTL-SDR TCP Source ===
139 28 horiz0n
||Argument||Notes||
140 1 horiz0n
||rtl_tcp=<hostname>:<port>|| hostname defaults to "localhost", port to "1234"||
141 1 horiz0n
||psize=<payload-size>|| Default is 16384 bytes||
142 29 horiz0n
||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||
143 29 horiz0n
||offset_tune=0|1|| Enable offset tune mode for E4000 tuners||
144 1 horiz0n
145 28 horiz0n
=== Miri Source ===
146 28 horiz0n
||Argument||Notes||
147 28 horiz0n
||miri=<device-index>|| 0-based device identifier||
148 28 horiz0n
||buffers=<number-of-buffers>|| Default is 32||
149 28 horiz0n
150 1 horiz0n
=== UHD Source / Sink ===
151 28 horiz0n
||Argument||Notes||
152 28 horiz0n
||uhd|| Use this argument without a value||
153 28 horiz0n
||nchan=<channel-count>|| For multichannel USRP configurations use the subdev parameter to specify stream mapping||
154 28 horiz0n
||subdev=<subdev-spec>|| Examples: "A:0", "B:0", "A:0 B:0" when nchan=2. Refer original ettus documentation on this||
155 28 horiz0n
||lo_offset=<frequency>|| Offset frequency in Hz, must be within daughterboard bandwidth. Accepts eng notation||
156 1 horiz0n
157 1 horiz0n
Additional argument/value pairs will be passed to the underlying driver, for more information see
158 1 horiz0n
[http://files.ettus.com/uhd_docs/manual/html/general.html#specifying-the-subdevice-to-use specifying the subdevice] and 
159 1 horiz0n
[http://files.ettus.com/uhd_docs/manual/html/identification.html#common-device-identifiers common device identifiers] in the Ettus documentation.
160 54 horiz0n
161 54 horiz0n
=== bladeRF Source / Sink ===
162 71 horiz0n
Arguments that affect both the source & sink (i.e., the underlying device), when applied to either are marked '''bold'''.
163 71 horiz0n
164 1 horiz0n
||Argument||Notes||
165 71 horiz0n
||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.||
166 71 horiz0n
||'''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.||
167 71 horiz0n
||'''fpga-reload'''=1||Force the FPGA to be reloaded. Requires fpga=<bitrstream> to be provided to have any effect.||
168 71 horiz0n
||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||
169 71 horiz0n
||buflen=<count>||Length of a sample buffer, in *samples* (not bytes). This must be a multiple of 1024. Default=4096||
170 71 horiz0n
||transfers=<count>||Number of in-flight sample buffer transfers. Defaults to one half of the 'buffers' count.||
171 71 horiz0n
||stream_timeout_ms=<timeout>||Specifies the timeout for the underlying sample stream. Default=3000.||
172 71 horiz0n
||'''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_txlpfk_rxlpf, bb_txvga1_rxvga2, bb_txvga1_rxlpf, rf_lna1, rf_lna2, rf_lna3. The default mode is 'none'.
173 71 horiz0n
||'''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.||
174 72 horiz0n
||'''xb200'''||Automatic filter selection will be enabled if no value is given to the xb200 parameter.||
175 72 horiz0n
176 72 horiz0n
The following values are valid for the xb200 parameter:
177 72 horiz0n
   "custom"  : custom band
178 72 horiz0n
   "50M"     :  50MHz band
179 72 horiz0n
   "144M"    : 144MHz band
180 72 horiz0n
   "222M"    : 222MHz band
181 72 horiz0n
   "auto3db" : Select fiterbank based on -3dB filter points
182 72 horiz0n
   "auto"    : Select filerbank based on -1dB filter points (default)
183 28 horiz0n
184 38 horiz0n
=== HackRF Source / Sink ===
185 38 horiz0n
||Argument||Notes||
186 24 horiz0n
||hackrf|| Use this argument without a value||
187 28 horiz0n
||buffers=<number-of-buffers>|| Default is 32||
188 1 horiz0n
189 1 horiz0n
Only the first device found may be used at the moment because of libhackrf limitation.
190 28 horiz0n
191 1 horiz0n
Transmit support has been verified by using the [http://sdr.osmocom.org/trac/attachment/wiki/GrOsmoSDR/hackrf-dab.jpg crc-mmbTools DAB sdr transmitter].
192 61 horiz0n
193 1 horiz0n
=== RFSPACE Source ===
194 61 horiz0n
||Argument||Notes||
195 63 horiz0n
||sdr-iq[=<serial-port>]|| Optional parameter, serial-port defaults to the serial port (like /dev/ttyUSB0) used by first detected SDR-IQ||
196 63 horiz0n
||sdr-ip[=<hostname>][:<port>]|| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected SDR-IP||
197 61 horiz0n
||netsdr[=<hostname>][:<port>]|| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected NetSDR||
198 7 horiz0n
||nchan=<channel-count>|| Optional parameter for NetSDR, must be 1 or 2||
199 63 horiz0n
200 58 horiz0n
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...
201 64 horiz0n
202 64 horiz0n
The ftdi_sio driver is being used for SDR-IQ. It creates a character device of the form:
203 64 horiz0n
204 64 horiz0n
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
205 64 horiz0n
206 64 horiz0n
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.
207 70 horiz0n
208 70 horiz0n
=== AirSpy Source ===
209 70 horiz0n
210 70 horiz0n
||airspy|| Use this argument without a value||
211 35 horiz0n
212 35 horiz0n
== Included Apps ==
213 35 horiz0n
214 45 horiz0n
=== Spectrum Browser ===
215 45 horiz0n
216 57 horiz0n
[[Image(fft-lte.png)]]
217 58 horiz0n
218 57 horiz0n
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).
219 57 horiz0n
220 57 horiz0n
[[Image(fosphor.png)]]
221 57 horiz0n
222 35 horiz0n
[[Image(fosphor2.png)]]
223 36 horiz0n
224 35 horiz0n
usage examples:
225 1 horiz0n
{{{
226 66 horiz0n
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
227 66 horiz0n
osmocom_fft -a rfspace -v
228 35 horiz0n
osmocom_fft -a bladerf -v
229 36 horiz0n
osmocom_fft -a hackrf -v
230 69 horiz0n
osmocom_fft -a uhd -v
231 35 horiz0n
osmocom_fft -a airspy -v
232 67 horiz0n
}}}
233 67 horiz0n
234 67 horiz0n
DC offset and IQ imbalance correction controls may be enabled using --dc-offset-mode=0 and --iq-balance-mode=0 command line switches respectively.
235 1 horiz0n
236 45 horiz0n
=== Signal generator ===
237 65 horiz0n
238 35 horiz0n
[[Image(siggen-gsm.png)]]   [[Image(gsm-hackrf-8M.png, 500px)]]
239 36 horiz0n
240 49 horiz0n
usage examples:
241 49 horiz0n
{{{
242 39 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sine
243 39 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sweep -x 2M -y 1 -c34
244 36 horiz0n
osmocom_siggen_nogui -a hackrf -f 100e6 --sweep -x 2e6 -y 10 -v
245 67 horiz0n
osmocom_siggen_nogui -a uhd,subdev=A:0 -f 100e6 --sweep -x 2e6 -y 10 -s 4e6 -v
246 35 horiz0n
osmocom_siggen -a bladerf -f 1G --sweep -x 4M -y 1 -s 4M
247 35 horiz0n
}}}
248 35 horiz0n
=== Spectrum sensing ===
249 35 horiz0n
250 7 horiz0n
TODO: document
251 7 horiz0n
252 7 horiz0n
== Known Apps ==
253 7 horiz0n
254 7 horiz0n
The following 3rd party applications are successfully using gr-osmosdr:
255 7 horiz0n
256 15 horiz0n
||'''Name'''||'''Type'''||'''Author'''||'''URL'''||
257 8 horiz0n
||gr-pocsag||GRC Flowgraph||Marcus Leech||[https://www.cgran.org/browser/projects/gr-pocsag/trunk]||
258 16 horiz0n
||multimode RX||GRC Flowgraph||Marcus Leech||[https://www.cgran.org/browser/projects/multimode/trunk]||
259 1 horiz0n
||simple_fm_rvc||GRC Flowgraph||Marcus Leech||[https://www.cgran.org/browser/projects/simple_fm_rcv/trunk]||
260 1 horiz0n
||Wireless Temp. Sensor RX||Gnuradio App||Kevin Mehall||[https://github.com/kevinmehall/rtlsdr-433m-sensor]||
261 1 horiz0n
||gqrx||SDR GUI||Alexandru Csete||[https://github.com/csete/gqrx]||
262 1 horiz0n
||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] ||
263 1 horiz0n
||airprobe||GSM sniffer||osmocom team et al||[http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git]||
264 16 horiz0n
||gr-smartnet (WIP)||Trunking RX||Nick Foster||[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]||
265 16 horiz0n
||gr-air-modes||ADS-B RX||Nick Foster||[https://www.cgran.org/wiki/gr-air-modes] call with --rtlsdr option||
266 15 horiz0n
||gr-ais (fork)||AIS RX||Nick Foster[[br]]Antoine Sirinelli[[br]]Christian Gagneraud||[https://github.com/chgans/gr-ais]||
267 15 horiz0n
||GNSS-SDR ||GPS RX (Realtime!)||Centre Tecnològic de[[br]]Telecomunicacions 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]||
268 15 horiz0n
||gr-scan ||Scanner||techmeology||[http://www.techmeology.co.uk/gr-scan/]||
269 15 horiz0n
||pocsag-mrt||Multichannel Realtime[[br]]Decoder||iZsh||[https://github.com/iZsh/pocsag-mrt]||
270 68 horiz0n
||osmo-gmr-rtl||GMR1 RX||Dimitri Stolnikov||[http://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles]||
271 68 horiz0n
||simple_ra||Radio Astronomy App||Marcus Leech||[https://cgran.org/wiki/simple_ra]||
272 1 horiz0n
||FS20_decode||FS20 Decoder||Thomas Frisch||[https://github.com/eT0M/rtl_sdr_FS20_decoder]||
273 56 horiz0n
||OpenLTE '''(NEW)'''||LTE Toolkit||Ben Wojtowicz||[http://sourceforge.net/p/openlte/home/Home/]||
274 68 horiz0n
||sdrangelove '''(NEW)'''||SDR GUI||Christian Daniel||[http://sdrangelove.org]||
275 28 horiz0n
||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]||
276 28 horiz0n
277 53 horiz0n
== Credits ==
278 59 horiz0n
279 1 horiz0n
gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen, Steve Markgraf, Sylvain Munaut and Nuand LLC folks.
Add picture from clipboard (Maximum size: 48.8 MB)