Project

General

Profile

GrOsmoSDR » History » Version 90

laforge, 02/21/2016 09:58 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 87 horiz0n
h3. bladeRF Source / Sink
191
192
Arguments that affect both the source & sink (i.e., the underlying device), when applied to either are marked *bold*.
193 1 horiz0n
194 89 laforge
|_.Argument|_.Notes|
195
|<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.|
196
|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.|
197
|fpga-reload=1|Force the FPGA to be reloaded. Requires fpga=<bitrstream> to be provided to have any effect.|
198
|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|
199
|buflen=<count>|Length of a sample buffer, in *samples* (not bytes). This must be a multiple of 1024. Default=4096|
200
|transfers=<count>|Number of in-flight sample buffer transfers. Defaults to one half of the 'buffers' count.|
201 1 horiz0n
|stream_timeout_ms=<timeout>|Specifies the timeout for the underlying sample stream. Default=3000.|
202 90 laforge
|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'.|
203
|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.|
204 89 laforge
|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.|
205 1 horiz0n
206
207
<pre>
208 87 horiz0n
The following values are valid for the xb200 parameter:
209 1 horiz0n
"custom"  : custom band
210
"50M"     :  50MHz band
211
"144M"    : 144MHz band
212
"222M"    : 222MHz band
213
"auto3db" : Select fiterbank based on -3dB filter points
214
"auto"    : Select filerbank based on -1dB filter points (default)
215 84 horiz0n
216 1 horiz0n
217
gr-osmosdr <-> bladeRF gain mappings
218
219
Sink:
220 82 horiz0n
BB Gain: TX VGA1 [-35, -4]
221
IF Gain: N/A
222 28 horiz0n
RF Gain: TX VGA2 [0, 25]
223 1 horiz0n
224
Source:
225 61 horiz0n
RF Gain: LNA Gain {0, 3, 6}
226 1 horiz0n
IF Gain: N/A
227
BB Gain: : RX VGA1 + RX VGA2 [5, 60]
228
</pre>
229 87 horiz0n
230
h3. [[HackRF]] Source / Sink
231
232 89 laforge
|_.Argument|_.Notes||
233
|hackrf=<device-index>| 0-based device identifier OR serial number|
234
|<notextile>bias=0|1</notextile>| Disable or enable antenna bias voltage in receive mode (source)|
235
|<notextile>bias_tx=0|1</notextile>| Disable or enable antenna bias voltage in transmit mode (sink)|
236
|<notextile>buffers=<number-of-buffers></notextile>| Default is 32|
237 1 horiz0n
238
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).
239
240
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.
241
242 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.
243 1 horiz0n
244 87 horiz0n
245 1 horiz0n
h3. RFSPACE Source
246 87 horiz0n
247 89 laforge
|_.Argument|_.Notes|
248
|sdr-iq[=<serial-port>]| Optional parameter, serial-port defaults to the serial port (like /dev/ttyUSB0) used by first detected SDR-IQ|
249
|sdr-ip[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected SDR-IP|
250
|netsdr[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected [[NetSDR]]|
251
|nchan=<channel-count>| Optional parameter for [[NetSDR]], must be 1 or 2|
252 87 horiz0n
253
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...
254 64 horiz0n
255
The ftdi_sio driver is being used for SDR-IQ. It creates a character device of the form:
256 1 horiz0n
257
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
258
259
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.
260
261
262
h3. [[AirSpy]] Source
263
264 89 laforge
|_.Argument|_.Notes|
265
|airspy| Use this argument without a value|
266
|<notextile>bias=1|0</notextile>| Enable or disable DC bias at the antenna input|
267 70 horiz0n
268
269
h2. Included Apps
270
271 1 horiz0n
272 80 horiz0n
273 35 horiz0n
h3. Spectrum Browser
274 87 horiz0n
275
276 89 laforge
{{thumbnail(fft-lte.png)]]
277 45 horiz0n
278 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).
279 58 horiz0n
280 89 laforge
!fosphor.png!
281 87 horiz0n
282 89 laforge
!fosphor2.png!
283 57 horiz0n
284 35 horiz0n
usage examples:
285 87 horiz0n
<pre>
286
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
287
osmocom_fft -a rfspace -v
288 88 zecke
osmocom_fft -a bladerf -v
289 87 horiz0n
osmocom_fft -a hackrf -v
290
osmocom_fft -a uhd -v
291
osmocom_fft -a airspy -v
292 88 zecke
</pre>
293 35 horiz0n
294 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.
295 67 horiz0n
296
297 87 horiz0n
h3. Signal generator
298 45 horiz0n
299 65 horiz0n
300 89 laforge
!siggen-gsm.png!
301 36 horiz0n
302 89 laforge
!gsm-hackrf-8M.png!
303
304 87 horiz0n
usage examples:
305 39 horiz0n
<pre>
306 36 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sine
307 67 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sweep -x 2M -y 1 -c34
308 35 horiz0n
osmocom_siggen_nogui -a hackrf -f 100e6 --sweep -x 2e6 -y 10 -v
309 87 horiz0n
osmocom_siggen_nogui -a uhd,subdev=A:0 -f 100e6 --sweep -x 2e6 -y 10 -s 4e6 -v
310 35 horiz0n
osmocom_siggen -a bladerf -f 1G --sweep -x 4M -y 1 -s 4M
311 87 horiz0n
</pre>
312 88 zecke
313 87 horiz0n
h3. Spectrum sensing
314 7 horiz0n
315 87 horiz0n
316 7 horiz0n
TODO: document
317
318 15 horiz0n
319 8 horiz0n
h2. Known Apps
320 16 horiz0n
321 87 horiz0n
322 1 horiz0n
The following 3rd party applications are successfully using gr-osmosdr:
323 87 horiz0n
324 89 laforge
|_.Name|_.Type|_.Author|_.URL|
325
|gr-pocsag|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/gr-pocsag/trunk|
326
|multimode RX|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/multimode/trunk|
327
|simple_fm_rvc|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/simple_fm_rcv/trunk|
328
|Wireless Temp. Sensor RX|Gnuradio App|Kevin Mehall|https://github.com/kevinmehall/rtlsdr-433m-sensor|
329
|gqrx|SDR GUI|Alexandru Csete|https://github.com/csete/gqrx|
330
|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|
331
|airprobe|GSM sniffer|osmocom team et al|http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git|
332
|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/|
333
|gr-air-modes|ADS-B RX|Nick Foster|https://www.cgran.org/wiki/gr-air-modes call with --rtlsdr option|
334
|gr-ais (fork)|AIS RX|Nick Foster, Antoine Sirinelli, Christian Gagneraud|https://github.com/chgans/gr-ais|
335
|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|
336
|gr-scan|Scanner|techmeology|http://www.techmeology.co.uk/gr-scan/|
337
|pocsag-mrt|Multichannel Realtime Decoder|iZsh|https://github.com/iZsh/pocsag-mrt|
338
|osmo-gmr-rtl|GMR1 RX|Dimitri Stolnikov|http://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles|
339
|simple_ra|Radio Astronomy App|Marcus Leech|https://cgran.org/wiki/simple_ra|
340
|FS20_decode|FS20 Decoder|Thomas Frisch|https://github.com/eT0M/rtl_sdr_FS20_decoder|
341
|OpenLTE *(NEW)*|LTE Toolkit|Ben Wojtowicz|http://sourceforge.net/p/openlte/home/Home/|
342
|sdrangelove *(NEW)*|SDR GUI|Christian Daniel|http://sdrangelove.org|
343
|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|
344 87 horiz0n
345 1 horiz0n
346 87 horiz0n
h2. Credits
347
348
349 1 horiz0n
gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen, Steve Markgraf, Sylvain Munaut and Nuand LLC folks.
350 89 laforge
{{>toc}}
Add picture from clipboard (Maximum size: 48.8 MB)