2014-11-29 00:07:10 +00:00
# -*- coding: utf-8 -*-
"""
config_webrx : configuration options for OpenWebRX
2015-08-17 18:32:58 +00:00
This file is part of OpenWebRX ,
an open - source SDR receiver software with a web UI .
Copyright ( c ) 2013 - 2015 by Andras Retzler < randras @sdr.hu >
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
License , or ( at your option ) any later version .
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
This program is distributed in the hope that it will be useful ,
2014-11-29 00:07:10 +00:00
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
2015-08-17 18:32:58 +00:00
GNU Affero General Public License for more details .
You should have received a copy of the GNU Affero General Public License
along with this program . If not , see < http : / / www . gnu . org / licenses / > .
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
In addition , as a special exception , the copyright holders
state that config_rtl . py and config_webrx . py are not part of the
Corresponding Source defined in GNU AGPL version 3 section 1.
( It means that you do not have to redistribute config_rtl . py and
config_webrx . py if you make any changes to these two configuration files ,
and use them for running your web service with OpenWebRX . )
2014-11-29 00:07:10 +00:00
"""
2015-08-17 18:32:58 +00:00
# ==== Server settings ====
2014-11-29 00:07:10 +00:00
web_port = 8073
server_hostname = " localhost " # If this contains an incorrect value, the web UI may freeze on load (it can't open websocket)
2015-08-17 18:32:58 +00:00
max_clients = 20
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
# ==== Web GUI configuration ====
2014-11-29 00:07:10 +00:00
receiver_name = " [Callsign] "
receiver_location = " Budapest, Hungary "
receiver_qra = " JN97ML "
2015-08-17 18:32:58 +00:00
receiver_asl = 200
2014-11-29 00:07:10 +00:00
receiver_ant = " Longwire "
receiver_device = " RTL-SDR "
2015-08-17 18:32:58 +00:00
receiver_admin = " example@example.com "
2014-11-29 00:07:10 +00:00
receiver_gps = ( 47.000000 , 19.000000 )
photo_height = 350
photo_title = " Panorama of Budapest from Schönherz Zoltán Dormitory "
photo_desc = """
You can add your own background photo and receiver information . < br / >
Receiver is operated by : < a href = " mailto: % [RX_ADMIN] " > % [ RX_ADMIN ] < / a > < br / >
Device : % [ RX_DEVICE ] < br / >
Antenna : % [ RX_ANT ] < br / >
Website : < a href = " http://localhost " target = " _blank " > http : / / localhost < / a >
"""
2015-08-17 18:32:58 +00:00
# ==== sdr.hu listing ====
# If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
# 1. Register at: http://sdr.hu/register
# 2. You will get an unique key by email. Copy it and paste here:
sdrhu_key = " "
# 3. Set this setting to True to enable listing:
sdrhu_public_listing = False
# ==== DSP/RX settings ====
2014-11-29 00:07:10 +00:00
dsp_plugin = " csdr "
fft_fps = 9
fft_size = 4096
samp_rate = 250000
2015-08-17 18:32:58 +00:00
2014-11-29 00:07:10 +00:00
center_freq = 145525000
rf_gain = 5
2015-08-17 18:32:58 +00:00
ppm = 0
audio_compression = " adpcm " #valid values: "adpcm", "none"
fft_compression = " adpcm " #valid values: "adpcm", "none"
start_rtl_thread = True
# ==== I/Q sources (uncomment the appropriate) ====
# >> RTL-SDR via rtl_sdr
2016-01-23 23:03:08 +00:00
start_rtl_command = " rtl_sdr -s {samp_rate} -f {center_freq} -p {ppm} -g {rf_gain} - " . format ( rf_gain = rf_gain , center_freq = center_freq , samp_rate = samp_rate , ppm = ppm )
2015-08-17 18:32:58 +00:00
format_conversion = " csdr convert_u8_f "
2015-10-10 23:26:49 +00:00
#start_rtl_command="hackrf_transfer -s {samp_rate} -f {center_freq} -g {rf_gain} -l16 -a0 -r hackrf_pipe & cat hackrf_pipe | nc -vvl 127.0.0.1 8888".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
#format_conversion="csdr convert_i8_f"
## To use a HackRF, first run "mkfifo hackrf_pipe" in the OpenWebRX directory.
## You should also use the csdr git repo from here:
## git clone https://github.com/sgentle/csdr
## git checkout origin/signed_char
2015-08-17 18:32:58 +00:00
# >> Sound card SDR (needs ALSA)
#I did not have the chance to properly test it.
#samp_rate = 96000
2016-01-23 23:03:08 +00:00
#start_rtl_command="arecord -f S16_LE -r {samp_rate} -c2 -".format(samp_rate=samp_rate)
2016-02-14 17:19:32 +00:00
#format_conversion="csdr convert_s16_f | csdr gain_ff 30"
2015-08-17 18:32:58 +00:00
# >> /dev/urandom test signal source
#samp_rate = 2400000
2016-01-23 23:03:08 +00:00
#start_rtl_command="cat /dev/urandom | (pv -qL `python -c 'print int({samp_rate} * 2.2)'` 2>&1)".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate)
2015-08-17 18:32:58 +00:00
#format_conversion="csdr convert_u8_f"
2016-02-14 23:58:58 +00:00
# >> gr-osmosdr signal source using GNU Radio (follow this guide: https://github.com/simonyiszk/openwebrx/wiki/Using-gr-osmosdr-as-signal-source)
start_rtl_command = " cat /tmp/osmocom_fifo "
format_conversion = " "
2015-08-17 18:32:58 +00:00
#You can use other SDR hardware as well, by giving your own command that outputs the I/Q samples...
2014-11-29 00:07:10 +00:00
2015-08-17 18:32:58 +00:00
shown_center_freq = center_freq #you can change this if you use an upconverter
2014-11-29 00:07:10 +00:00
2015-09-30 14:06:30 +00:00
client_audio_buffer_size = 5
2015-08-17 18:32:58 +00:00
#increasing client_audio_buffer_size will:
# - also increase the latency
# - decrease the chance of audio underruns
2015-09-30 14:06:30 +00:00
start_freq = center_freq
start_mod = " nfm " #nfm, am, lsb, usb, cw
2016-01-23 23:03:08 +00:00
iq_server_port = 4951 #TCP port for ncat to listen on. It will send I/Q data over its connections, for internal use in OpenWebRX. It is only accessible from the localhost by default.
2016-02-10 16:33:48 +00:00
#access_log = "~/openwebrx_access.log"
2016-02-10 21:25:04 +00:00
#Warning! The settings below are very experimental.
csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.
csdr_print_bufsizes = False # This prints the buffer sizes used for csdr processes.
csdr_through = False # Setting this True will print out how much data is going into the DSP chains.