Project

General

Profile

GrOsmoSDR » History » Version 95

laforge, 05/14/2019 09:41 AM

1 87 horiz0n
{{>toc}}
2 1 horiz0n
3 87 horiz0n
h1. osmocom Gnu Radio Blocks
4 1 horiz0n
5 94 laforge
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 91 laforge
* "sysmocom [[OsmoSDR:]]":http://sdr.osmocom.org/trac/ Devices through "libosmosdr":http://cgit.osmocom.org/osmo-sdr/
10 87 horiz0n
* "Nuand LLC bladeRF":http://nuand.com/ through "libbladeRF library":https://github.com/Nuand/bladeRF
11 94 laforge
* "Great Scott Gadgets HackRF":http://greatscottgadgets.com/hackrf/ through "libhackrf":https://github.com/mossmann/hackrf
12 87 horiz0n
* "Ettus USRP":http://www.ettus.com/product Devices through "Ettus UHD library":http://files.ettus.com/manual/page_identification.html
13 94 laforge
* Fairwaves [[UmTRX:]] through "Fairwaves' fork of Ettus' UHD library":https://github.com/fairwaves/UHD-Fairwaves
14 87 horiz0n
* 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 91 laforge
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 94 laforge
--   * 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 94 laforge
--   * 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 95 laforge
h3. [[gr-osmosdr:|OsmoSDR]] Source
129 1 horiz0n
130 89 laforge
|_.Argument|_.Notes|
131
|osmosdr=<device-index>|0-based device identifier|
132
|buffers=<number-of-buffers>|Default is 32|
133 1 horiz0n
|buflen=<length-of-buffer>|Default is 256kB, must be multiple of 512|
134 87 horiz0n
135
h3. RTL-SDR Source
136
137 89 laforge
|_.Argument|_.Notes|
138
|rtl=<device-index>|0-based device identifier OR serial number|
139
|rtl_xtal=<frequency>|Frequency (Hz) used for the RTL chip, accepts scientific notation|
140
|tuner_xtal=<frequency>|Frequency (Hz) used for the tuner chip, accepts scientific notation|
141
|buffers=<number-of-buffers>|Default is 32|
142
|buflen=<length-of-buffer>|Default is 256kB, must be multiple of 512|
143
|<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|
144
|<notextile>offset_tune=0|1</notextile>|Enable offset tune mode for E4000 tuners|
145 1 horiz0n
146 89 laforge
NOTE: use @rtl_eeprom -s@ to program your own serial number to the device
147 1 horiz0n
148
NOTE: if you don't specify rtl_xtal/tuner_xtal, the underlying driver will use 28.0MHz
149
150 28 horiz0n
151 87 horiz0n
h3. RTL-SDR TCP Source
152
153 89 laforge
|_.Argument|_.Notes|
154
|rtl_tcp=<hostname>:<port>| hostname defaults to "localhost", port to "1234"|
155
|psize=<payload-size>| Default is 16384 bytes|
156
|<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|
157
|<notextile>offset_tune=0|1</notextile>| Enable offset tune mode for E4000 tuners|
158 1 horiz0n
159
160 87 horiz0n
h3. Miri Source
161
162 89 laforge
|_.Argument|_.Notes|
163
|miri=<device-index>|0-based device identifier|
164
|buffers=<number-of-buffers>|Default is 32|
165 28 horiz0n
166 80 horiz0n
167
h3. SDRplay Source
168 87 horiz0n
169
170
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
171 1 horiz0n
172 89 laforge
|_.Argument|_.Notes|
173
|sdrplay|Use this argument without a value|
174 28 horiz0n
175 87 horiz0n
176
h3. UHD Source / Sink
177
178 89 laforge
|_.Argument|_.Notes|
179
|uhd| Use this argument without a value|
180
|nchan=<channel-count>| For multichannel USRP configurations use the subdev parameter to specify stream mapping|
181
|subdev=<subdev-spec>| Examples: "A:0", "B:0", "A:0 B:0" when nchan=2. Refer original ettus documentation on this|
182
|lo_offset=<frequency>| Offset frequency in Hz, must be within daughterboard bandwidth. Accepts scientific notation|
183 1 horiz0n
184
Additional argument/value pairs will be passed to the underlying driver, for more information see
185 87 horiz0n
"specifying the subdevice":http://files.ettus.com/uhd_docs/manual/html/general.html#specifying-the-subdevice-to-use and 
186
"common device identifiers":http://files.ettus.com/uhd_docs/manual/html/identification.html#common-device-identifiers in the Ettus documentation.
187 71 horiz0n
188 87 horiz0n
h3. bladeRF Source / Sink
189
190
Arguments that affect both the source & sink (i.e., the underlying device), when applied to either are marked *bold*.
191 1 horiz0n
192 89 laforge
|_.Argument|_.Notes|
193
|<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.|
194
|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.|
195
|fpga-reload=1|Force the FPGA to be reloaded. Requires fpga=<bitrstream> to be provided to have any effect.|
196
|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|
197
|buflen=<count>|Length of a sample buffer, in *samples* (not bytes). This must be a multiple of 1024. Default=4096|
198
|transfers=<count>|Number of in-flight sample buffer transfers. Defaults to one half of the 'buffers' count.|
199 1 horiz0n
|stream_timeout_ms=<timeout>|Specifies the timeout for the underlying sample stream. Default=3000.|
200 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'.|
201
|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.|
202 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.|
203 92 horiz0n
|smb=<frequency>|Enable frequency output on SMB connector (named CLK)|
204
|<notextile>tamer=[internal,external,external_1pps]</notextile>|Set one of the clock input modes|
205 1 horiz0n
206
<pre>
207 87 horiz0n
The following values are valid for the xb200 parameter:
208 1 horiz0n
"custom"  : custom band
209
"50M"     :  50MHz band
210
"144M"    : 144MHz band
211
"222M"    : 222MHz band
212
"auto3db" : Select fiterbank based on -3dB filter points
213
"auto"    : Select filerbank based on -1dB filter points (default)
214 84 horiz0n
215 1 horiz0n
216
gr-osmosdr <-> bladeRF gain mappings
217
218
Sink:
219 82 horiz0n
BB Gain: TX VGA1 [-35, -4]
220
IF Gain: N/A
221 28 horiz0n
RF Gain: TX VGA2 [0, 25]
222 1 horiz0n
223
Source:
224 61 horiz0n
RF Gain: LNA Gain {0, 3, 6}
225 1 horiz0n
IF Gain: N/A
226
BB Gain: : RX VGA1 + RX VGA2 [5, 60]
227
</pre>
228 87 horiz0n
229
h3. [[HackRF]] Source / Sink
230
231 89 laforge
|_.Argument|_.Notes||
232
|hackrf=<device-index>| 0-based device identifier OR serial number|
233
|<notextile>bias=0|1</notextile>| Disable or enable antenna bias voltage in receive mode (source)|
234
|<notextile>bias_tx=0|1</notextile>| Disable or enable antenna bias voltage in transmit mode (sink)|
235
|<notextile>buffers=<number-of-buffers></notextile>| Default is 32|
236 1 horiz0n
237
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).
238
239
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.
240
241 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.
242 1 horiz0n
243 87 horiz0n
244 1 horiz0n
h3. RFSPACE Source
245 87 horiz0n
246 89 laforge
|_.Argument|_.Notes|
247
|sdr-iq[=<serial-port>]| Optional parameter, serial-port defaults to the serial port (like /dev/ttyUSB0) used by first detected SDR-IQ|
248
|sdr-ip[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected SDR-IP|
249
|netsdr[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected [[NetSDR]]|
250
|nchan=<channel-count>| Optional parameter for [[NetSDR]], must be 1 or 2|
251 87 horiz0n
252
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...
253 64 horiz0n
254
The ftdi_sio driver is being used for SDR-IQ. It creates a character device of the form:
255 1 horiz0n
256
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
257
258
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.
259
260
261
h3. [[AirSpy]] Source
262
263 89 laforge
|_.Argument|_.Notes|
264 1 horiz0n
|airspy| Use this argument without a value|
265 89 laforge
|<notextile>bias=1|0</notextile>| Enable or disable DC bias at the antenna input|
266 92 horiz0n
|<notextile>pack=1|0</notextile>| Enable or disable packed USB transmission|
267 70 horiz0n
268
h2. Included Apps
269
270 1 horiz0n
271 80 horiz0n
272 35 horiz0n
h3. Spectrum Browser
273 87 horiz0n
274
275 89 laforge
{{thumbnail(fft-lte.png)]]
276 45 horiz0n
277 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).
278 58 horiz0n
279 89 laforge
!fosphor.png!
280 87 horiz0n
281 89 laforge
!fosphor2.png!
282 57 horiz0n
283 35 horiz0n
usage examples:
284 87 horiz0n
<pre>
285
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
286
osmocom_fft -a rfspace -v
287 88 zecke
osmocom_fft -a bladerf -v
288 87 horiz0n
osmocom_fft -a hackrf -v
289
osmocom_fft -a uhd -v
290
osmocom_fft -a airspy -v
291 88 zecke
</pre>
292 35 horiz0n
293 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.
294 67 horiz0n
295
296 87 horiz0n
h3. Signal generator
297 45 horiz0n
298 65 horiz0n
299 89 laforge
!siggen-gsm.png!
300 36 horiz0n
301 89 laforge
!gsm-hackrf-8M.png!
302
303 87 horiz0n
usage examples:
304 39 horiz0n
<pre>
305 36 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sine
306 67 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sweep -x 2M -y 1 -c34
307 35 horiz0n
osmocom_siggen_nogui -a hackrf -f 100e6 --sweep -x 2e6 -y 10 -v
308 87 horiz0n
osmocom_siggen_nogui -a uhd,subdev=A:0 -f 100e6 --sweep -x 2e6 -y 10 -s 4e6 -v
309 35 horiz0n
osmocom_siggen -a bladerf -f 1G --sweep -x 4M -y 1 -s 4M
310 87 horiz0n
</pre>
311 88 zecke
312 87 horiz0n
h3. Spectrum sensing
313 7 horiz0n
314 87 horiz0n
315 7 horiz0n
TODO: document
316
317 15 horiz0n
318 8 horiz0n
h2. Known Apps
319 16 horiz0n
320 87 horiz0n
321 1 horiz0n
The following 3rd party applications are successfully using gr-osmosdr:
322 87 horiz0n
323 89 laforge
|_.Name|_.Type|_.Author|_.URL|
324
|gr-pocsag|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/gr-pocsag/trunk|
325
|multimode RX|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/multimode/trunk|
326
|simple_fm_rvc|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/simple_fm_rcv/trunk|
327
|Wireless Temp. Sensor RX|Gnuradio App|Kevin Mehall|https://github.com/kevinmehall/rtlsdr-433m-sensor|
328
|gqrx|SDR GUI|Alexandru Csete|https://github.com/csete/gqrx|
329
|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|
330
|airprobe|GSM sniffer|osmocom team et al|http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git|
331
|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/|
332
|gr-air-modes|ADS-B RX|Nick Foster|https://www.cgran.org/wiki/gr-air-modes call with --rtlsdr option|
333
|gr-ais (fork)|AIS RX|Nick Foster, Antoine Sirinelli, Christian Gagneraud|https://github.com/chgans/gr-ais|
334 93 carlesfernandez
|GNSS-SDR|GPS/Galileo RX (Realtime!)|Centre Tecnològic de Telecomunicacions de Catalunya|"Documentation":http://gnss-sdr.org/docs/tutorials/gnss-sdr-operation-realtek-rtl2832u-usb-dongle-dvb-t-receiver/ and http://gnss-sdr.org|
335 89 laforge
|gr-scan|Scanner|techmeology|http://www.techmeology.co.uk/gr-scan/|
336
|pocsag-mrt|Multichannel Realtime Decoder|iZsh|https://github.com/iZsh/pocsag-mrt|
337
|osmo-gmr-rtl|GMR1 RX|Dimitri Stolnikov|http://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles|
338
|simple_ra|Radio Astronomy App|Marcus Leech|https://cgran.org/wiki/simple_ra|
339
|FS20_decode|FS20 Decoder|Thomas Frisch|https://github.com/eT0M/rtl_sdr_FS20_decoder|
340
|OpenLTE *(NEW)*|LTE Toolkit|Ben Wojtowicz|http://sourceforge.net/p/openlte/home/Home/|
341
|sdrangelove *(NEW)*|SDR GUI|Christian Daniel|http://sdrangelove.org|
342
|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|
343 87 horiz0n
344 1 horiz0n
345 87 horiz0n
h2. Credits
346
347
348 1 horiz0n
gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen, Steve Markgraf, Sylvain Munaut and Nuand LLC folks.
349 89 laforge
{{>toc}}
Add picture from clipboard (Maximum size: 48.8 MB)