Project

General

Profile

GrOsmoSDR » History » Version 88

zecke, 02/21/2016 09:53 AM

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