Project

General

Profile

GrOsmoSDR » History » Version 97

Hoernchen, 06/16/2021 01:15 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 97 Hoernchen
*The Gnu Radio block requires gnuradio v3.9 if building master branch.
28 87 horiz0n
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 48 horiz0n
cd gr-osmosdr/
38 87 horiz0n
</pre>
39 51 horiz0n
40 1 horiz0n
then continue with
41 87 horiz0n
<pre>
42 1 horiz0n
mkdir build
43
cd build/
44 30 horiz0n
cmake ../
45 87 horiz0n
</pre>
46 1 horiz0n
47 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.
48 87 horiz0n
<pre>
49 30 horiz0n
-- ######################################################
50 1 horiz0n
-- # gr-osmosdr enabled components                         
51 30 horiz0n
-- ######################################################
52 51 horiz0n
--   * Python support
53 1 horiz0n
--   * Osmocom IQ Imbalance Correction
54 94 laforge
--   * sysmocom OsmoSDR
55 1 horiz0n
--   * FUNcube Dongle
56
--   * FUNcube Dongle Pro+
57
--   * IQ File Source
58
--   * Osmocom RTLSDR
59
--   * RTLSDR TCP Client
60
--   * Ettus USRP Devices
61 94 laforge
--   * Osmocom MiriSDR
62
--   * HackRF Jawbreaker
63 1 horiz0n
--   * nuand bladeRF
64 30 horiz0n
--   * RFSPACE Receivers
65
-- 
66 1 horiz0n
-- ######################################################
67 51 horiz0n
-- # gr-osmosdr disabled components                        
68 61 horiz0n
-- ######################################################
69 30 horiz0n
-- 
70
-- Building for version: v0.1.0-4-g37aba331 / 0.1.1git
71 1 horiz0n
-- Using install prefix: /usr/local
72 87 horiz0n
</pre>
73 1 horiz0n
74
Now build & install
75 87 horiz0n
<pre>
76 30 horiz0n
make
77
sudo make install
78
sudo ldconfig
79 87 horiz0n
</pre>
80 30 horiz0n
81 1 horiz0n
NOTE: The osmocom source/sink blocks will appear under 'Sources' and 'Sinks' categories in GRC menu.
82
83
To build the API documentation:
84 87 horiz0n
<pre>
85 1 horiz0n
cd build/
86
cmake ../ -DENABLE_DOXYGEN=1
87
make -C docs
88 87 horiz0n
</pre>
89 1 horiz0n
90
91 87 horiz0n
h2. Automated installation
92 1 horiz0n
93 10 horiz0n
94 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.
95
96
97
h2. Device specification
98
99
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]..
100
101 1 horiz0n
102
h3. FCD Source
103
104 89 laforge
|_.Argument|_.Notes|
105
|fcd=<device-index>| 0-based device identifier, optional|
106
|device=hw:2| overrides the audio device|
107
|type=2| selects the dongle type, 1 for Classic, 2 for Pro+|
108 18 horiz0n
109 1 horiz0n
The "device" argument overrides the audio device used by the underlying driver to access the dongle's IQ sample stream.
110
111
The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.
112
113
114
h3. IQ File Source
115
116 89 laforge
|_.Argument|_.Notes|
117
|file=<path-to-file-name>||
118
|freq=<frequency>| Center frequency in Hz, accepts scientific notation|
119
|rate=<sampling-rate>| Mandatory, in samples/s, accepts scientific notation|
120
|<notextile>repeat=true|false</notextile>| Default is true|
121
|<notextile>throttle=true|false</notextile>| Throttle flow of samples, default is true|
122 28 horiz0n
123 95 laforge
h3. [[gr-osmosdr:|OsmoSDR]] Source
124 1 horiz0n
125 89 laforge
|_.Argument|_.Notes|
126
|osmosdr=<device-index>|0-based device identifier|
127
|buffers=<number-of-buffers>|Default is 32|
128 1 horiz0n
|buflen=<length-of-buffer>|Default is 256kB, must be multiple of 512|
129 87 horiz0n
130
h3. RTL-SDR Source
131
132 89 laforge
|_.Argument|_.Notes|
133
|rtl=<device-index>|0-based device identifier OR serial number|
134
|rtl_xtal=<frequency>|Frequency (Hz) used for the RTL chip, accepts scientific notation|
135
|tuner_xtal=<frequency>|Frequency (Hz) used for the tuner chip, accepts scientific notation|
136
|buffers=<number-of-buffers>|Default is 32|
137
|buflen=<length-of-buffer>|Default is 256kB, must be multiple of 512|
138
|<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|
139
|<notextile>offset_tune=0|1</notextile>|Enable offset tune mode for E4000 tuners|
140 1 horiz0n
141 89 laforge
NOTE: use @rtl_eeprom -s@ to program your own serial number to the device
142 1 horiz0n
143
NOTE: if you don't specify rtl_xtal/tuner_xtal, the underlying driver will use 28.0MHz
144
145 28 horiz0n
146 87 horiz0n
h3. RTL-SDR TCP Source
147
148 89 laforge
|_.Argument|_.Notes|
149
|rtl_tcp=<hostname>:<port>| hostname defaults to "localhost", port to "1234"|
150
|psize=<payload-size>| Default is 16384 bytes|
151
|<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|
152
|<notextile>offset_tune=0|1</notextile>| Enable offset tune mode for E4000 tuners|
153 1 horiz0n
154
155 87 horiz0n
h3. Miri Source
156
157 89 laforge
|_.Argument|_.Notes|
158
|miri=<device-index>|0-based device identifier|
159
|buffers=<number-of-buffers>|Default is 32|
160 28 horiz0n
161 80 horiz0n
162
h3. SDRplay Source
163 87 horiz0n
164
165
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
166 1 horiz0n
167 89 laforge
|_.Argument|_.Notes|
168
|sdrplay|Use this argument without a value|
169 28 horiz0n
170 87 horiz0n
171
h3. UHD Source / Sink
172
173 89 laforge
|_.Argument|_.Notes|
174
|uhd| Use this argument without a value|
175
|nchan=<channel-count>| For multichannel USRP configurations use the subdev parameter to specify stream mapping|
176
|subdev=<subdev-spec>| Examples: "A:0", "B:0", "A:0 B:0" when nchan=2. Refer original ettus documentation on this|
177
|lo_offset=<frequency>| Offset frequency in Hz, must be within daughterboard bandwidth. Accepts scientific notation|
178 1 horiz0n
179
Additional argument/value pairs will be passed to the underlying driver, for more information see
180 87 horiz0n
"specifying the subdevice":http://files.ettus.com/uhd_docs/manual/html/general.html#specifying-the-subdevice-to-use and 
181
"common device identifiers":http://files.ettus.com/uhd_docs/manual/html/identification.html#common-device-identifiers in the Ettus documentation.
182 71 horiz0n
183 87 horiz0n
h3. bladeRF Source / Sink
184
185
Arguments that affect both the source & sink (i.e., the underlying device), when applied to either are marked *bold*.
186 1 horiz0n
187 89 laforge
|_.Argument|_.Notes|
188
|<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.|
189
|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.|
190
|fpga-reload=1|Force the FPGA to be reloaded. Requires fpga=<bitrstream> to be provided to have any effect.|
191
|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|
192
|buflen=<count>|Length of a sample buffer, in *samples* (not bytes). This must be a multiple of 1024. Default=4096|
193
|transfers=<count>|Number of in-flight sample buffer transfers. Defaults to one half of the 'buffers' count.|
194 1 horiz0n
|stream_timeout_ms=<timeout>|Specifies the timeout for the underlying sample stream. Default=3000.|
195 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'.|
196
|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.|
197 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.|
198 92 horiz0n
|smb=<frequency>|Enable frequency output on SMB connector (named CLK)|
199
|<notextile>tamer=[internal,external,external_1pps]</notextile>|Set one of the clock input modes|
200 1 horiz0n
201
<pre>
202 87 horiz0n
The following values are valid for the xb200 parameter:
203 1 horiz0n
"custom"  : custom band
204
"50M"     :  50MHz band
205
"144M"    : 144MHz band
206
"222M"    : 222MHz band
207
"auto3db" : Select fiterbank based on -3dB filter points
208
"auto"    : Select filerbank based on -1dB filter points (default)
209 84 horiz0n
210 1 horiz0n
211
gr-osmosdr <-> bladeRF gain mappings
212
213
Sink:
214 82 horiz0n
BB Gain: TX VGA1 [-35, -4]
215
IF Gain: N/A
216 28 horiz0n
RF Gain: TX VGA2 [0, 25]
217 1 horiz0n
218
Source:
219 61 horiz0n
RF Gain: LNA Gain {0, 3, 6}
220 1 horiz0n
IF Gain: N/A
221
BB Gain: : RX VGA1 + RX VGA2 [5, 60]
222
</pre>
223 87 horiz0n
224
h3. [[HackRF]] Source / Sink
225
226 89 laforge
|_.Argument|_.Notes||
227
|hackrf=<device-index>| 0-based device identifier OR serial number|
228
|<notextile>bias=0|1</notextile>| Disable or enable antenna bias voltage in receive mode (source)|
229
|<notextile>bias_tx=0|1</notextile>| Disable or enable antenna bias voltage in transmit mode (sink)|
230
|<notextile>buffers=<number-of-buffers></notextile>| Default is 32|
231 1 horiz0n
232
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).
233
234
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.
235
236 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.
237 1 horiz0n
238 87 horiz0n
239 1 horiz0n
h3. RFSPACE Source
240 87 horiz0n
241 89 laforge
|_.Argument|_.Notes|
242
|sdr-iq[=<serial-port>]| Optional parameter, serial-port defaults to the serial port (like /dev/ttyUSB0) used by first detected SDR-IQ|
243
|sdr-ip[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected SDR-IP|
244
|netsdr[=<hostname>][:<port>]| Optional parameters, hostname defaults to "localhost", port to "50000" or the first detected [[NetSDR]]|
245
|nchan=<channel-count>| Optional parameter for [[NetSDR]], must be 1 or 2|
246 87 horiz0n
247
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...
248 64 horiz0n
249
The ftdi_sio driver is being used for SDR-IQ. It creates a character device of the form:
250 1 horiz0n
251
crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0
252
253
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.
254
255
256
h3. [[AirSpy]] Source
257
258 89 laforge
|_.Argument|_.Notes|
259 1 horiz0n
|airspy| Use this argument without a value|
260 89 laforge
|<notextile>bias=1|0</notextile>| Enable or disable DC bias at the antenna input|
261 92 horiz0n
|<notextile>pack=1|0</notextile>| Enable or disable packed USB transmission|
262 70 horiz0n
263
h2. Included Apps
264
265 1 horiz0n
266 80 horiz0n
267 35 horiz0n
h3. Spectrum Browser
268 87 horiz0n
269
270 89 laforge
{{thumbnail(fft-lte.png)]]
271 45 horiz0n
272 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).
273 58 horiz0n
274 89 laforge
!fosphor.png!
275 87 horiz0n
276 89 laforge
!fosphor2.png!
277 57 horiz0n
278 35 horiz0n
usage examples:
279 87 horiz0n
<pre>
280
osmocom_fft -a rtl=0 -v -f 100e6 -s 2.4e6 -g 15
281
osmocom_fft -a rfspace -v
282 88 zecke
osmocom_fft -a bladerf -v
283 87 horiz0n
osmocom_fft -a hackrf -v
284
osmocom_fft -a uhd -v
285
osmocom_fft -a airspy -v
286 88 zecke
</pre>
287 35 horiz0n
288 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.
289 67 horiz0n
290
291 87 horiz0n
h3. Signal generator
292 45 horiz0n
293 65 horiz0n
294 89 laforge
!siggen-gsm.png!
295 36 horiz0n
296 89 laforge
!gsm-hackrf-8M.png!
297
298 87 horiz0n
usage examples:
299 39 horiz0n
<pre>
300 36 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sine
301 67 horiz0n
osmocom_siggen -a hackrf -f 100e6 --sweep -x 2M -y 1 -c34
302 35 horiz0n
osmocom_siggen_nogui -a hackrf -f 100e6 --sweep -x 2e6 -y 10 -v
303 87 horiz0n
osmocom_siggen_nogui -a uhd,subdev=A:0 -f 100e6 --sweep -x 2e6 -y 10 -s 4e6 -v
304 35 horiz0n
osmocom_siggen -a bladerf -f 1G --sweep -x 4M -y 1 -s 4M
305 87 horiz0n
</pre>
306 88 zecke
307 87 horiz0n
h3. Spectrum sensing
308 7 horiz0n
309 87 horiz0n
310 7 horiz0n
TODO: document
311
312 15 horiz0n
313 8 horiz0n
h2. Known Apps
314 16 horiz0n
315 87 horiz0n
316 1 horiz0n
The following 3rd party applications are successfully using gr-osmosdr:
317 87 horiz0n
318 89 laforge
|_.Name|_.Type|_.Author|_.URL|
319
|gr-pocsag|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/gr-pocsag/trunk|
320
|multimode RX|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/multimode/trunk|
321
|simple_fm_rvc|GRC Flowgraph|Marcus Leech|https://www.cgran.org/browser/projects/simple_fm_rcv/trunk|
322
|Wireless Temp. Sensor RX|Gnuradio App|Kevin Mehall|https://github.com/kevinmehall/rtlsdr-433m-sensor|
323
|gqrx|SDR GUI|Alexandru Csete|https://github.com/csete/gqrx|
324
|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|
325
|airprobe|GSM sniffer|osmocom team et al|http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=airprobe.git|
326
|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/|
327
|gr-air-modes|ADS-B RX|Nick Foster|https://www.cgran.org/wiki/gr-air-modes call with --rtlsdr option|
328
|gr-ais (fork)|AIS RX|Nick Foster, Antoine Sirinelli, Christian Gagneraud|https://github.com/chgans/gr-ais|
329 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|
330 89 laforge
|gr-scan|Scanner|techmeology|http://www.techmeology.co.uk/gr-scan/|
331
|pocsag-mrt|Multichannel Realtime Decoder|iZsh|https://github.com/iZsh/pocsag-mrt|
332
|osmo-gmr-rtl|GMR1 RX|Dimitri Stolnikov|http://gmr.osmocom.org/trac/wiki/GettingStarted#RTLSDRdongles|
333
|simple_ra|Radio Astronomy App|Marcus Leech|https://cgran.org/wiki/simple_ra|
334
|FS20_decode|FS20 Decoder|Thomas Frisch|https://github.com/eT0M/rtl_sdr_FS20_decoder|
335
|OpenLTE *(NEW)*|LTE Toolkit|Ben Wojtowicz|http://sourceforge.net/p/openlte/home/Home/|
336
|sdrangelove *(NEW)*|SDR GUI|Christian Daniel|http://sdrangelove.org|
337
|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|
338 87 horiz0n
339 1 horiz0n
340 87 horiz0n
h2. Credits
341
342
343 1 horiz0n
gr-osmosdr is developed by Dimitri Stolnikov with contributions from Hoernchen, Steve Markgraf, Sylvain Munaut and Nuand LLC folks.
344 89 laforge
{{>toc}}
Add picture from clipboard (Maximum size: 48.8 MB)