How-to Read / Set Gain from SkyView and Gmap

(1) Gain Reading/Setting added in dump1090-fa’s SkyView Map

.

(1) Gain Reading/Setting added in dump1090-mutability’s gmap

.

Click the link which matches your install:

1. Piaware SD Card image

2. Raspbian Jessie/Stretch image with dump1090-fa package install

3. Raspbian Jessie/Stretch image with dump1090-mutability v1.15~dev install

.
.

REFERENCE:
The requirement to have gain setting embedded in SkyView / gmap was originated by user @evangelyul.

To achieve this objective, the author @abcd567 developed the method presented in this thread. User @evangelyul has actively participated during the development stage.

Please see following thread for development details:
https://discussions.flightaware.com/t/set-gain-from-browser/36278

3 Likes

Piaware%20SD%20Card%20Image%20Jessie

Piaware%20SD%20Card%20Image%20Stretch

Only Step-1 is different for Jessie and Stretch, rest is same.

STEP-1 (JESSIE): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php5-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

STEP-1 (STRETCH): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php7.0-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

.

STEP-2: Set up existing user www-data

2.1 - Assign strong password to existing user www-data, and add it to sudoer’s group

sudo passwd www-data
sudo adduser www-data sudo
groups www-data

.
2.2 - REBOOT for sudo permission of user www-data to be implemented.

sudo reboot

STEP-3: Create new directory and files

3.1 - Create new directory

sudo mkdir /var/www/html/setgain

3.2 - Move inside the new directory

cd /var/www/html/setgain/

3.3 - Inside directory /var/www/html/setgain, create a new blank file setgain.sh, make it executable

sudo touch setgain.sh
sudo chmod +x setgain.sh

3.4 - Open newly created file in nano editor

sudo nano setgain.sh

3.5 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

#!/bin/bash
echo 'xxxxxxxxxxx' | sudo -S piaware-config rtlsdr-gain "$1"

echo 'xxxxxxxxxxx' | sudo -S systemctl restart dump1090-fa

Save (Ctrl+o) and Close (Ctrl+x) the file.
.

3.6 - Inside directory /var/www/html/setgain, create a new blank file findgain.sh, make it executable

sudo touch findgain.sh
sudo chmod +x findgain.sh

3.7 - Open newly created file in nano editor

sudo nano findgain.sh

3.8 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

#!/bin/bash
echo 'xxxxxxxxxxx' | sudo -S piaware-config -show rtlsdr-gain

Save (Ctrl+o) and Close (Ctrl+x) the file.
.

STEP-4

4.1 - Create a new file gain.php in folder /usr/share/dump1090-fa/html

cd /usr/share/dump1090-fa/html/
sudo nano gain.php   

4.2 - Copy-paste following code in newly created blank file gain.php

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

<html>
 <form id="myform" action="gain.php" method="post" />
  <input type="text" name="gain" id="gain" maxlength="5" size="4" value="<?php system('/var/www/html/setgain/findgain.sh');?>" />
  <input type="submit" value="Set Gain" style="color:#ffffff;background-color:#00A0E2;border-color:#00B0F0;" />
 </form>
</html>

<?php
function setgain(){
$gain="{$_POST['gain']}";
system("/var/www/html/setgain/setgain.sh $gain  >> /tmp/gain.log 2>&1");
header("Refresh:0");
}

if ("{$_POST['gain']}"){
setgain();
}
?>


Save (Ctrl+o) and Close (Ctrl+x)

STEP-5

5.1 - Next step is to edit file index.html in folder `/usr/share/dump1090-fa/html.
BEFORE EDITING, make its backup copy. This will enable you to revert in case something goes wrong.

cd /usr/share/dump1090-fa/html/
sudo cp index.html index.bak.html

#Check to ensure back-up copy has been created by giving ls command

ls

#The output should contain both index.html and index.bak.html
config.js    formatter.js    layers.js         script.js
db           images          markers.js        spinny.gif
dbloader.js  index.bak.html  ol                style.css
flags.js     index.html      planeObject.js    test
flags-tiny   jquery          registrations.js  upintheair.json

.

5.2 - Open the file `index.html for editing

cd /usr/share/dump1090-fa/html/  
sudo nano index.html  

5.3 - Press Ctrl+w then type buttonContainer then press Enter key.
The cursor will jump to line containg word buttonContainer, as shown below

			<div class="logoContainer">
				<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/fa_logo_color@2x.png 2x, images/fa_logo_color@3x.png 3x"></a>
				<img src="images/pa-sv-logo.png" alt="PiAware SkyView" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/pa-sv-logo@2x.png 2x, images/pa-sv-logo@3x.png 3x">
				<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyView" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/ff-sv-logo@2x.png 2x, images/ff-sv-logo@3x.png 3x" style="display: none;">
			</div>

			<div class="buttonContainer">
				<div class="dateTime" id="clock_div"></div>
				<div class="button buttonHeader" onclick="resetMap();"><span class="buttonText">Reset Map</span></div>

.

5.4 - Just above line <div class="buttonContainer">, insert following 3 lines

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   

.
After insertion of 3 lines, the code will be like shown below:

			<div class="logoContainer">
				<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/fa_logo_color@2x.png 2x, images/fa_logo_color@3x.png 3x"></a>
				<img src="images/pa-sv-logo.png" alt="PiAware SkyView" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/pa-sv-logo@2x.png 2x, images/pa-sv-logo@3x.png 3x">
				<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyView" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/ff-sv-logo@2x.png 2x, images/ff-sv-logo@3x.png 3x" style="display: none;">
			</div>

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   

			<div class="buttonContainer">
				<div class="dateTime" id="clock_div"></div>
				<div class="button buttonHeader" onclick="resetMap();"><span class="buttonText">Reset Map</span></div>

.

5.5 - Go to page IP-of-PI/dump1090-fa/ and check gain setting add-on appears as shown in screenshot below.

The value show at browser load or re-load is your current gain value.

If you want to change it, replace the value displaced by value desired and click “Set Gain” button. The value in gain box will briefly show your previous setting, then show your current (changed) setting.

Check the gain value by following command. The last line of output of this command will show the actual value of gain used.

sudo systemctl status dump1090-fa -l    

.

1 Like

Jessie%20and%20Stretch%20FA

For Raspbian Jessie/Stretch + dump1090-fa package install

Only Step-1 is different for Jessie and Stretch, rest is same.

STEP-1 (JESSIE): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php5-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

STEP-1 (STRETCH): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php7.0-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

.

STEP-2: Set up existing user www-data

2.1 - Assign strong password to existing user www-data, and add it to sudoer’s group

sudo passwd www-data   
sudo adduser www-data sudo   
groups www-data   

.
2.2 - REBOOT to enable permissions for www-data

sudo reboot

.

STEP-3: Create new directory and files

3.1 - Create new directory

sudo mkdir /var/www/html/setgain   

.
3.2 - Move inside the new directory

cd /var/www/html/setgain/   

.
3.3 - Inside directory /var/www/html/setgain, create a new blank file setgain.sh, make it executable

sudo touch setgain.sh   
sudo chmod +x setgain.sh   

.
3.4 - Open newly created file in nano editor

sudo nano setgain.sh   

.
3.5 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

#!/bin/bash
echo 'xxxxxxxxxx' | sudo -S sed -i '/RECEIVER_OPTIONS=.*/c\RECEIVER_OPTIONS="--device-index 0 --gain '$1' --ppm 0 --net-bo-port 30005"' /etc/default/dump1090-fa   

echo 'xxxxxxxxxx' | sudo -S systemctl restart dump1090-fa   

Save (Ctrl+o) and Close (Ctrl+x) the file.

.
3.6 - Inside directory /var/www/html/setgain, create a new blank file findgain.sh, make it executable

sudo touch findgain.sh   
sudo chmod +x findgain.sh   

.
3.7 - Open newly created file in nano editor

sudo nano findgain.sh   

.
3.8 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

#!/bin/bash   
echo 'xxxxxxxxxx' | sudo -S awk '{for(i=1;i<=NF;i++) if ($i=="--gain") print $(i+1)}' /etc/default/dump1090-fa  

Save (Ctrl+o) and Close (Ctrl+x) the file.

.

STEP-4

4.1 - Create a new file gain.php in folder /usr/share/dump1090-fa/html

cd /usr/share/dump1090-fa/html/
sudo nano gain.php   

4.2 - Copy-paste following code in newly created blank file gain.php

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

<html>
 <form id="myform" action="gain.php" method="post" />
  <input type="text" name="gain" id="gain" maxlength="5" size="4" value="<?php system('/var/www/html/setgain/findgain.sh');?>" />
  <input type="submit" value="Set Gain" style="color:#ffffff;background-color:#00A0E2;border-color:#00B0F0;" />
 </form>
</html>

<?php
function setgain(){
$gain="{$_POST['gain']}";
system("/var/www/html/setgain/setgain.sh $gain  >> /tmp/gain.log 2>&1");
header("Refresh:0");
}

if ("{$_POST['gain']}"){
setgain();
}
?>


.
Save (Ctrl+o) and Close (Ctrl+x)
.

STEP-5

5.1 - Next step is to edit file index.html in folder /usr/share/dump1090-fa/html.
BEFORE EDITING, make its backup copy. This will enable you to revert in case something goes wrong.

cd /usr/share/dump1090-fa/html/
sudo cp index.html index.bak.html

#Check to ensure back-up copy has been created by giving ls command

ls

#The output should contain both index.html and index.bak.html
config.js    formatter.js    layers.js         script.js
db           images          markers.js        spinny.gif
dbloader.js  index.bak.html  ol                style.css
flags.js     index.html      planeObject.js    test
flags-tiny   jquery          registrations.js  upintheair.json

.

5.2 - Open the file index.html for editing

cd /usr/share/dump1090-fa/html/  
sudo nano index.html  

5.3 - Press Ctrl+w then type buttonContainer then press Enter key.
The cursor will jump to line containg word buttonContainer, as shown below

			<div class="logoContainer">
				<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/fa_logo_color@2x.png 2x, images/fa_logo_color@3x.png 3x"></a>
				<img src="images/pa-sv-logo.png" alt="PiAware SkyView" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/pa-sv-logo@2x.png 2x, images/pa-sv-logo@3x.png 3x">
				<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyView" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/ff-sv-logo@2x.png 2x, images/ff-sv-logo@3x.png 3x" style="display: none;">
			</div>

			<div class="buttonContainer">
				<div class="dateTime" id="clock_div"></div>
				<div class="button buttonHeader" onclick="resetMap();"><span class="buttonText">Reset Map</span></div>

.

5.4 - Just above line <div class="buttonContainer">, insert following 3 lines

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   

.
After insertion of 3 lines, the code will be like shown below:

			<div class="logoContainer">
				<a href="http://flightaware.com/" target="_blank"><img src="images/fa_logo_color.png" alt="FlightAware" class="flightawareLogo" srcset="images/fa_logo_color.png 1x, images/fa_logo_color@2x.png 2x, images/fa_logo_color@3x.png 3x"></a>
				<img src="images/pa-sv-logo.png" alt="PiAware SkyView" class="adsbLogo piAwareLogo" srcset="images/pa-sv-logo.png 1x, images/pa-sv-logo@2x.png 2x, images/pa-sv-logo@3x.png 3x">
				<img src="images/ff-sv-logo.png" alt="FlightFeeder SkyView" class="adsbLogo flightfeederLogo" srcset="images/ff-sv-logo.png 1x, images/ff-sv-logo@2x.png 2x, images/ff-sv-logo@3x.png 3x" style="display: none;">
			</div>

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   

			<div class="buttonContainer">
				<div class="dateTime" id="clock_div"></div>
				<div class="button buttonHeader" onclick="resetMap();"><span class="buttonText">Reset Map</span></div>

.
Save (Ctrl+o) and Close (Ctrl+x)
.

5.5 - Go to page IP-of-PI/dump1090-fa/ and check gain setting add-on appears as shown in screenshot below.

The value show at browser load or re-load is your current gain value.

If you want to change it, replace the value displaced by value desired and click “Set Gain” button. The value in gain box will briefly show your previous setting, then show your current (changed) setting.

Check the gain value by following command. The last line of output of this command will show the actual value of gain used.

sudo systemctl status dump1090-fa -l    

.

2 Likes

Jessie%20and%20Stretch%20Mutab

For Raspbian Jessie/Stretch + dump1090-mutability v1.15~dev install

Only Step-1 is different for Jessie and Stretch, rest is same.

STEP-1 (JESSIE): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php5-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

.

STEP-1 (STRETCH): Install necessary php packages and enable module

sudo apt-get update   
sudo apt-get install php7.0-cgi   
sudo lighty-enable-mod fastcgi-php   
sudo /etc/init.d/lighttpd force-reload   

STEP-2: Set up existing user www-data

2.1 - Assign strong password to existing user www-data, and add it to sudoer’s group

sudo passwd www-data   
sudo adduser www-data sudo   
groups www-data   
  

2.2 - REBOOT for sudo permission of user www-data to be implemented.

sudo reboot

.

STEP-3: Create new directory and files

3.1 - Create new directory

sudo mkdir /var/www/html/setgain   

.
3.2 - Move inside the new directory

cd /var/www/html/setgain/   

.
3.3 - Inside directory /var/www/html/setgain, create a new blank file setgain.sh, make it executable

sudo touch setgain.sh   
sudo chmod +x setgain.sh   

.
3.4 - Open newly created file in nano editor

sudo nano setgain.sh   

.
3.5 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

#!/bin/bash   
echo 'xxxxxxxxxx' | sudo -S sed -i '/GAIN=.*/c\GAIN='$1 /etc/default/dump1090-mutability  

echo 'xxxxxxxxxx' | sudo -S systemctl restart dump1090-mutability  

Save (Ctrl+o) and Close (Ctrl+x) the file.

.
3.6 - Inside directory /var/www/html/setgain, create a new blank file findgain.sh, make it executable

sudo touch findgain.sh   
sudo chmod +x findgain.sh   

.
3.7 - Open newly created file in nano editor

sudo nano findgain.sh   

.
3.8 - Add code to the new file
(In code below, replace xxxxxxxxx by the actual password you have set for user www-data)

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

#!/bin/bash
echo 'xxxxxxxxxx' | sudo -S sed -n 's/\GAIN=//p' /etc/default/dump1090-mutability  

Save (Ctrl+o) and Close (Ctrl+x) the file.

.

STEP-4

4.1 - Create a new file gain.php in folder /usr/share/dump1090-mutability/html

cd /usr/share/dump1090-mutability/html/
sudo nano gain.php   

.
4.2 - Copy-paste following code in newly created blank file gain.php

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

<html>
 <form id="myform" action="gain.php" method="post" />
  <input type="text" name="gain" id="gain" maxlength="5" size="4" value="<?php system('/var/www/html/setgain/findgain.sh');?>" />
  <input type="submit" value="Set Gain" style="color:#ffffff;background-color:#00A0E2;border-color:#00B0F0;" />
 </form>
</html>

<?php
function setgain(){
$gain="{$_POST['gain']}";
system("/var/www/html/setgain/setgain.sh $gain  >> /tmp/gain.log 2>&1");
header("Refresh:0");
}

if ("{$_POST['gain']}"){
setgain();
}
?>


Save (Ctrl+o) and Close (Ctrl+x)

STEP-5

5.1 - Next step is to edit file gmap.html in folder `/usr/share/dump1090-mutability/html.
BEFORE EDITING, make its backup copy. This will enable you to revert in case something goes wrong.

cd /usr/share/dump1090-mutability/html/
sudo cp gmap.html gmap.bak.html

#Check to ensure back-up copy has been created by giving ls command

ls

#The output should contain both gmap.html and gmap.bak.html

config.js    formatter.js   markers.js        style.css
coolclock    gain.php       ol3               test
db           gmap.bak.html  planeObject.js    upintheair.json
dbloader.js  gmap.html      registrations.js
flags.js     jquery         script.js
flags-tiny   layers.js      spinny.gif

.
5.2 - Open the file gmap.html for editing

cd /usr/share/dump1090-mutability/html/  
sudo nano gmap.html  

.
5.3 - Press Ctrl+w then type sudo_buttons then press Enter key.
The cursor will jump to line <div id="sudo_buttons">, as shown below

                                </div> <!-- timestamps -->

                                <div id="sudo_buttons">
                                        <table style="width: 100%">
                                                <tr>
                                                        <td style="width: 150px; text-align: center;" class="pointer">
                                                                [ <span onclick="resetMap();">Reset Map</span> ]
                                                        </td>
                                                </tr>
                                        </table>

                                </div> <!-- sudo_buttons -->

.
5.4 - Just above line <div id="sudo_buttons">, insert following 3 lines

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   

.

After insertion of 3 lines, the code will be like shown below:

                                </div> <!-- timestamps -->

<div id="GAIN" style="text-align:center;width:175px;height:65px;">   
<iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
</div> <!----- GAIN --->   


                                <div id="sudo_buttons">
                                        <table style="width: 100%">
                                                <tr>
                                                        <td style="width: 150px; text-align: center;" class="pointer">
                                                                [ <span onclick="resetMap();">Reset Map</span> ]
                                                        </td>
                                                </tr>
                                        </table>

                                </div> <!-- sudo_buttons -->

Save (Ctrl+o) and Close (Ctrl+x)
.

5.5 - Go to page IP-of-PI/dump1090/ and check gain setting add-on appears as shown in screenshot below.

The value shown at browser load or re-load is your current gain value.

If you want to change it, replace the value displayed by value desired and click “Set Gain” button. The value in gain box will briefly show your previous setting, then show your current (changed) setting.

Check the gain value by following command.

sudo systemctl status dump1090-mutability -l    

.
Following line of output of this command will show the actual value of gain used.

NOTE: Some of code lines are very long. Scroll Right to see these in full
.

CGroup: /system.slice/dump1090-mutability.service
           └─6531 /usr/bin/dump1090-mutability --net --gain 36 --ppm 0 --fix --lat xx.xx --lon yy.yy --max-range 300 --net-ri-port 30001

4 Likes

Feedback requested.
Did gain setting in the map works ok for you?
Did you face any problems adding or using gain setting in the map?

Installed on both my 1.15-dev map and on 3.5.3 map
both working and changing gain no problems

1 Like

@suffolk3000

Thanks for the feed-back.

Hello
added in dump1090-fa’s SkyView Map
no problem
thanks

@LFBDBORDEAUX
Thanks for the feedback.

@abcd567 tried this this morning with an existing Raspian Jessie/Stretch package install- seems to work fine- thank you and @evangelyul for this work and great idea !

Notes on install:
I think in the Raspian Jessie/Stretch Dump1090-fa package install instructions at the end of step 5.4 the “Save (Ctrl+o) and Close (Ctrl+x) the file” step is missing, probably just trimmed off in edit.

There was one other place I cannot recall where directory navigation in the step left me in one place and the next step required a directory change that wasn’t outlined ( depending on how verbose you want to make the instructions, etc)

2 Likes

.
Thanks for pointingt out.
Fixed now by adding “Save (Ctrl+o) and Close (Ctrl+x) the file” at the end of Step 5.4.

.

Tried, but could not find missing directory location. Was it in Raspbian Jessie/Stretch and dump1090-fa ?

Yes - Sorry for not being more clear- It wasnt so much missing as I seemed to be unable to move directly to cd /usr/share/dump1090-fa/html/ at the start of Step 4 from where I was at end of Step 3.8 … but may have just been a finger-check on my part. Probably disregard.

Updated How-to for Piaware SD Card image (Jessie) to include newly released Piaware SD Card image version 3.6.2 (Stretch)

Installed on Piaware 3.6.2
Nice feature.

On Raspbian Stretch with Dump1090-fa installed, i needed to do one addtitional thing to get the CGI scripts to work.

For step 2, i needed to add:

sudo sudovi

Then at the bottom of the file add:

www-data ALL=(ALL) NOPASSWD:ALL

Then either reboot or run

sudo service sudo restart

If i didn’t do that, then when i tried to run the script it would output:

[sudo] password for www-data: Sorry, try again.
[sudo] password for www-data:
sudo: 1 incorrect password attempt

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for www-data: Sorry, try again.
[sudo] password for www-data:
sudo: 1 incorrect password attempt

My, my. The users are adding features that should have been added by staff. Great Job BTW.
Only have a few questions from an admitted newbie:
1: When will this get built into an image or will you all build an image because so far this is beyond me.
2: What are versions Jessie and Stretch and how do I tell the difference (required knowledge for step one.)
edited to add: Why not add this to the gear menu if it is extensable? Could have saved a little desktop space.
Bob.

Give following command. First line of output will show if Jessie or Stretch:

 cat /etc/os-release

The first line of output
Jessie: PRETTY_NAME=“Debian GNU/Linux 8 (jessie)”
Stretch: PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”

@abcd567
Nice work :+1: , implemented it.
Question : what I understood when I tested gain settings , only certain values are valid (I have no “radio” knowledge) like :
“20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6”
When I type in a value I presume it will take that ? Or will the “dump1090” software use a the nearest valid value ?
If that is not the case a dropdown list would be nice when setting the gain :smiley:
.

if you stop the receiver and do a rtl_test -t it will display all the valid gain settings.
if you used eg instead of 37.2 (valid) 37.6 it will use the nearest value.

“a dropdown list”
if you clear the text field and just type 3 it will show a drop down with all valid gain settings
starting with 3, same for 1, 2, 4 etc.

The dump1090-fa will set gain to the valid value nearest to what value you have type in the text box.

For example:
if you typed 30 or 29, the dump1090-fa will adjust to 29.7

If you typed 43, it will adjust to 43.4