1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
|
# This is RTLSDR_Airband complete configuration file.
# It lists all supported parameters and options, so it shall be treated
# as a reference rather than an example config to be copied and tweaked
# for any particular real-life scenario. More realistic examples can be
# found in other *.conf files in this directory. basic_multichannel.conf
# file is a recommended starting point.
#
# General libconfig format description can be found in libconfig manual
# (http://www.hyperrealm.com/libconfig/libconfig_manual.html)
# Each parameter is specified as:
#
# key = value;
#
# or
#
# key : value;
#
# Remember about the semicolon at the end.
#
# Keys can be scalars:
#
# myinteger = 5;
# myfloat = -3.5;
# mystring = "This is a string";
#
# or lists (ordered):
#
# mylist = (5, 8, 3, "string");
#
# Parameters can be grouped, like this:
#
# mygroup = {
# param1 = 3;
# param2 = -5;
# param3 = "some text";
# };
#
# Parameter names inside the group must be unique.
# Lists and groups can contain scalars as well as groups or lists.
#
# Three types of comments are allowed within a configuration:
#
# - Script-style comments (beginning with a '#' character)
# - C-style comments, /* like so */
# - C++-style comments (beginning with // sequence)
# global parameters
# log messages via syslog? Default: 1 (yes)
# if disabled, log messages are written to stdout (but only when run in foreground)
# syslog = 1;
# PID file path (default: /run/rtl_airband.pid)
# pidfile = "/run/rtl_airband.pid";
# De-emphasis filter time constant
# The filter suppresses high-frequency noise in NFM channels.
# Larger values cause more noise suppression.
# Set it to 0 if you don't want filtering.
# Default value: 200 (microseconds).
# You can also set this parameter per dongle and / or per channel.
# tau = 200;
# Number of USB read buffers to be used per dongle
# The default value is 10. If you use four or more dongles simultaneously
# or you get error messages like "Failed to submit transfer 12!"
# you may need to lower this value
# rtlsdr_buffers = 10;
# Delay (seconds) which should be applied to Icecast metadata updates
# This is only used in scan mode to keep tag updates in sync with the audio.
# Refer to "send_scan_freq_tags" output setting for details.
# Default value: 3 seconds
# shout_metadata_delay = 3;
# Use local timezone for output filenames
# By default the time used for the output filenames will use UTC time.
# Setting localtime to true will use the system's local timezone
# localtime = false;
# devices section contains all settings related to the RTLSDR receivers.
#
# It's a list of groups - each group contains settings for a single receiver,
# ie.: devices = ( {dongle1 params}, {dongle2 params}, {dongle3 params} );
devices = (
{
# Device index (as identified by librtlsdr library)
index = 0;
# Device indices may change when devices are replugged in different order or
# into different USB ports. To avoid this, specify devices with their serial
# numbers instead (launch rtl_test program to list them). If both index and
# serial are given, serial takes priority.
serial = "777711111537";
# A quick way to ignore this device temporarily. Default: false
disable = false;
# Gain (integer, in decibels). There is no default value.
gain = 28;
# Dongle mode. Can be one of the following:
# - "multichannel" - this is the default. Dongle is set to the configured
# center frequency. Multiple channels are received simultaneously. Every
# channel is a separate Icecast stream.
# - "scan" - turns the dongle into a frequency scanner. All scanned frequencies
# are sent to a common Icecast stream.
mode = "multichannel";
# Center frequency (in hertz). Valid only in multichannel mode.
centerfreq = 120100000;
# Tuning error (in parts per million). Default is 0.
correction = 80;
# List of channels which should be received and streamed from this dongle.
# It's a list of groups - each group contains settings for a single channel.
# Maximum number of channels per dongle is 8 in multichannel mode or 1 in scan
# mode.
channels = (
{
# Channel frequency (in hertz)
# The channel must fit in the dongle bandwidth, which is approximately 2.5 MHz
# (ie. +- 1.25 MHz around center frequency)
# This setting is valid in multichannel mode only.
freq = 118925000;
# Channel frequency list (in hertz) to be scanned in round-robin fashion
# They can be arbitralily spaced (there is no 2.5 MHz band restriction like
# in multichannel mode).
# This setting is valid in scan mode only
# freqs = ( 126300000, 121500000, 128225000, 131375000 );
# Optional: descriptive labels for scanned frequencies
# They are sent to Icecast server as song titles, when metadata updating
# is enabled. See the comment for send_scan_freq_tags option for more info.
# labels = ( "Radar", "Emergency", "Tower", "Ground" );
# A quick way to ignore this channel temporarily. Default: false
disable = false;
# Modulation - "am" or "nfm". Default is "am".
modulation = "am";
# Squelch level (integer greater or equal 0 or list of integers with length equal
# to that of list freqs). Default is auto. When a list, squelch for each
# frequency is set according to corresponding position. A value of -1 sets
# the corresponding frequency to automatic squelch. A value of 0 forces the
# squelch to be open all the time.
# Set this parameter only when auto squelch does not work correctly
# (this is common with channels which transmit continuously, like ATIS/AWOS,
# when auto squelch is unable to figure out the correct noise floor level)
# squelch = 100;
# or
# squelch = ( 75, -1, 100, 87 );
# Automatic Frequency Control (AFC) level (optional value)
# 0 - disabled (by default)
# value from range 1...10 - AFC enabled, larger value means more aggressive AFC.
afc = 0;
# Multiple outputs per channel are supported. For example, a single channel
# can be sent to multiple Icecast servers.
outputs = (
{
# A quick way to ignore this output temporarily. Default: false
disable = false;
# Output type. Supported types are: icecast, file, pulse and mixer.
type = "icecast";
# Host name or IP address of Icecast/Icecast server
server = "www.example.com";
# Icecast port number
port = 8000;
# Icecast mountpoint path (without leading slash)
mountpoint = "118925.mp3";
# Username and password for the mountpoint
username = "source";
password = "password";
# optional: name of the stream (default: none)
name = "Example ATC feed";
# optional: description of the stream (default: none)
description = "Here is my feed description";
# optional: genre (default: none)
genre = "ATC";
# optional: when the squelch opens on a different frequency in scan mode,
# rtl_airband will put the current frequency (in MHz) in the song title.
# Listeners will be able to see which channel they are listening to in
# a particular point in time. Alternatively, you may define textual
# descriptions for scanned frequencies - see "labels" option above.
# Caveats:
# - it is not possible to achieve perfect sync between the audio and
# Icecast metadata changes. You can tweak the shout_metadata_delay
# global setting to correct the offset, however there is no "one size
# fits all" value. The offset depends mainly on the buffer size in the
# player.
# - Icecast server, by default, writes each metadata change request to the
# log file. By using this feature, you may clog the server's logs
# pretty quickly, so if you are feeding to a server which is not owned
# by you, ask the owner for permission before enabling this.
# This setting has no effect when the dongle is set to multichannel mode.
# Default: false
send_scan_freq_tags = true;
}
);
},
# Subsequent channels
{
freq = 119100000;
# You can use both AM and NFM modulations for different channels on the same dongle.
# Probably not very useful in multichannel mode, but it's possible.
modulation = "nfm";
# This channel is streamed to two destinations
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "119100.mp3";
username = "source";
password = "password";
},
{
type = "icecast";
server = "www.otherserver.com";
port = 8010;
mountpoint = "119100.mp3";
username = "someuser";
password = "somepassword";
}
);
},
{
freq = 119500000;
modulation = "am";
# This channel is streamed to Icecast and saved to local files
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "119500.mp3";
username = "source";
password = "password";
},
{
type = "file";
# Directory where output MP3 files are written. Must be created before running rtl_airband.
directory = "/home/pi";
# File name prefix. rtl_airband automatically appends the date and UTC hour in YYYYmmdd_HH format
# and creates new file every hour.
filename_template = "119500";
# Set this to true if you want to record continuously.
# Set this to false if you want to skip silence (record only when squelch is open).
# Default is false.
continuous = true;
# Set this to true if you want to append to file if its exists with demarkation of missing fragment.
# Set this to false if you want to overwrite existing files.
# Default is true.
append = false;
}
);
},
{
freq = 120600000;
# Manual squelch setting for this channel
squelch = 250;
modulation = "am";
# This channel is not streamed to Icecast.
# It is saved to local files into two destinations - one of them records continuously, the other one
# skips silence periods.
outputs = (
{
type = "file";
directory = "/home/pi/streams";
filename_template = "TWR";
continuous = false;
},
{
type = "file";
directory = "/home/pi/streams_full";
filename_template = "TWR";
continuous = true;
},
# Output to PulseAudio server
{
type = "pulse";
# Server name or IP address. See https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/ServerStrings/
# for full syntax description of server strings.
# If this setting is omitted, rtl_airband will connect to a default server, which is most often, localhost.
# If it's a remote machine, you need to configure PulseAudio daemon there to accept remote connections from the network.
# See here for details: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/
server = "my.desktop.computer.net";
# Textual name for the stream. Will default to channel frequency if omitted. This setting is mandatory for pulse
# outputs of mixers.
stream_name = "TWR";
# Pulseaudio sink name to connect to. It's best to leave this out, the server will pick the sink automatically then.
sink = "alsa_output.pci-0000_00_1f.3.analog-stereo";
# When set to true, rtl_airband sends audio data to the server continuously, when false - sends only when the squelch
# is open. The latter setting gives significant bandwidth reduction and is therefore the default.
continuous = false;
}
);
},
{
# This channel will be ignored.
# This way you can quickly disable a channel without commenting out or deleting
# large sections of config file
disable = true;
freq = 121300000;
modulation = "am";
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "121300.mp3";
username = "source";
password = "password";
}
);
}
);
},
# Receiver 1 - multichannel mode, 4 NFM channels
{
index = 1;
gain = 28;
mode = "multichannel";
centerfreq = 123000000;
correction = 80;
# De-emphasis filter time constant
# This setting overrides the global tau setting for all channels on this dongle
tau = 0;
channels = (
{
freq = 152000000;
modulation = "nfm";
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "152000.mp3";
username = "source";
password = "password";
}
);
},
{
freq = 152100000;
modulation = "nfm";
# De-emphasis filter time constant
# Applies to this channel only
tau = 500;
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "152100.mp3";
username = "source";
password = "password";
}
);
},
{
freq = 152200000;
modulation = "nfm";
outputs = (
# This channel is connected as an input to a mixer named "mixer1".
# Mixers allow mixing of several audio streams together.
# The mixer named "mixer1" must be defined in the "mixers" section
# (see below).
{
type = "mixer";
name = "mixer1";
}
);
},
{
freq = 152300000;
modulation = "nfm";
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "152300.mp3";
username = "source";
password = "password";
},
{
type = "mixer";
name = "mixer1";
# When sending the channel to a mixer, it is possible to boost/reduce its
# volume or set the stereo balance to left, right, center or somewhere in between.
#
# ampfactor - sets the volume.
# 1.0 (default) - default volume
# < 0.0-1.0 - decrease the volume
# > 1.0 - increase the volume
ampfactor = 2.0;
# balance - set the stereo balance of the channel. Accepted values: between -1.0 and 1.0.
# -1.0 - full left
# 0.0 - center (default)
# 1.0 - full right
# 0.85 - 85% right
# ... etc.
balance = -1.0;
},
{
# This output will be ignored.
# This way you can quickly disable an output without deleting or commenting it out
disabled = true;
type = "file";
directory = "/home/pi/streams";
filename_template = "152300";
}
);
}
);
},
# Receiver 2 - scan mode, AM modulation (default)
{
index = 2;
gain = 28;
mode = "scan";
correction = 80;
channels = (
{
freqs = ( 126300000, 121500000, 128225000, 131375000 );
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "variouschannels.mp3";
username = "source";
password = "password";
name = "Example scan mode feed";
genre = "ATC";
}
);
}
);
},
{
# This device will be ignored.
# This way you can quickly disable a device without deleting or commenting it out
index = 3;
gain = 28;
mode = "scan";
correction = 80;
channels = (
{
freqs = ( 126300000, 121500000 );
outputs = (
{
type = "icecast";
server = "www.example.com";
port = 8000;
mountpoint = "test.mp3";
username = "source";
password = "password";
}
);
}
);
}
);
# Mixer configuration
#
# Each mixer has several inputs (max 32) and produces a single channel with
# mixed audio taken from all inputs. Mixed stream may be sent to multiple
# outputs, just like an ordinary channel.
mixers: {
# The name of this mixer is "mixer1"
mixer1: {
outputs: (
# Here are the definitions of outputs where mixed audio gets sent.
# Syntax is the same as for ordinary channel outputs (see above).
{
type = "icecast";
server = "my.icecast.server.org";
port = 8080;
mountpoint = "mixer1.mp3";
name = "VOLMET + Approach + Director"
genre = "ATC";
username = "source";
password = "mypassword";
},
{
type = "file";
directory = "/home/pi/recordings";
filename_template = "mixer1";
}
);
},
# Here is another mixer definition:
my_fancy_mixer: {
outputs: (
{
type = "file";
directory = "/home/pi/recordings/my_fancy_mixer";
filename_template = "audio";
}
);
}
};
|