Project

General

Profile

GrOsmoSDR » History » Version 89

laforge, 02/21/2016 09:55 AM

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