How to Change / Set the Gain
The method of changing gain depends on the installed software, as detailed below.
(1) Piaware SD Card image with integral dump1090-fa
Do NOT change gain in file /etc/default/dump1090-fa
. It will be overwritten at piaware restart and Pi reboot
-
Set the gain by command:
sudo piaware-config rtlsdr-gain xx.x
OR
-
Set the gain by editing file
piaware-config.txt
:
Open file for editing by following command
sudo nano /boot/piaware-config.txt
In above file scroll down till you find a line starting with rtlsdr-gain
. Change value of gain there.
If the line does not exist, add a new line at bottom of page as shown below:
rtlsdr-gain xx.x
(replace xx.x
by actual value of gain you want to use)
.
# RECEIVER CONFIGURATION
#
# For a complete list of receiver types and their associated settings,
# see the Advanced Configuration page linked at the top of this file.
# For a receiver type of 'rtlsdr', this setting controls the dongle gain.
# -10 means AGC / maximum gain; other values mean a gain value in dB.
rtlsdr-gain -10 # updated by fa_piaware_config
#
.
(2) Raspbian + dump1090-fa (add-on)
Set the gain by editing file dump1090-fa
:
Open file for editing by following command
sudo nano /etc/default/dump1090-fa
Change the value of gain in line starting with RECEIVER_OPTIONS=
.
(replace xx.x
by actual value of gain you want to use)
# If you are using a PiAware sdcard image, this config file is regenerated
# on boot based on the contents of piaware-config.txt; any changes made to this
# file will be lost.
RECEIVER_OPTIONS="--device-index 0 --gain xx.x --lat aa.aaaa --lon bb.bbbb --ppm 0 --net-bo-port 30005"
DECODER_OPTIONS="--max-range 360"
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
JSON_OPTIONS="--json-location-accuracy 1"
.
(3) Raspbian + dump1090-mutability
Set the gain by editing file dump1090-mutability
:
Open file for editing by following command
sudo nano /etc/default/dump1090-mutability
In above file scroll down to line starting with GAIN="xx.x"
.
Change gain value in this line
(replace xx.x
by actual value of gain you want to use)
# Receiver options
#
# RTLSDR device index or serial number to use
# If set to "none", dump1090 will be started in --net-only mode
DEVICE=""
# RTLSDR gain in dB.
# If set to "max" (the default) the maximum supported gain is used.
# If set to "agc", the tuner AGC is used to set the gain.
GAIN="xx.x"