Need to adjust the Gain


#1

So I’m trying to reduce the gain a bit on my flightaware tracker. I’m 7 miles from the airport.

I’m logged in an PI but the piaware.conf is owned by piaware, yet I can’t change to piaware username, and root is not available. either. ‘permission denied’

What the heck. :open_mouth:


#2

Did you try:

sudo piaware-config rtlsdr-gain 30 (replace 30 by the gain value you want to set)
sudo piaware-config -show rtlsdr-gain
sudo systemctrl restart dump1090-fa (must restart dump1090-fa to implement the new gain value)
sudo systemctrl status dump1090-fa -l

EXAMPLE BELOW

pi@piaware:~$ sudo piaware-config -show rtlsdr-gain
30

pi@piaware:~$ sudo piaware-config rtlsdr-gain 40
Set rtlsdr-gain to 40 in /boot/piaware-config.txt:60

pi@piaware:~$ sudo systemctl restart dump1090-fa

pi@piaware:~$ sudo systemctl status dump1090-fa -l
● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded ( / lib / systemd / system / dump1090-fa.service; enabled)
Active: active (running) since Sat 2017-07-01 14:29:08 EDT; 9s ago
Docs: flightaware.com/adsb/piaware/
Main PID: 14537 (dump1090-fa)
CGroup: / system.slice / dump1090-fa.service
└─14537 / usr / bin / dump1090-fa --net-bo-port 30005 --fix --device-index 0 --gain 40 --ppm 0 --max-range 360 --net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-http-port 0 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --json-location-accuracy 2 --lat 43.5xxxx --lon -79.6xxxx --write-json /run/dump1090-fa --quiet

Jul 01 14:29:08 piaware systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jul 01 14:29:08 piaware dump1090-fa[14537]: Sat Jul 1 14:29:08 2017 EDT dump1090-fa 3.5.0 starting up.
Jul 01 14:29:08 piaware dump1090-fa[14537]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001000)
Jul 01 14:29:08 piaware dump1090-fa[14537]: Found Rafael Micro R820T tuner
Jul 01 14:29:09 piaware dump1090-fa[14537]: rtlsdr: tuner gain set to 40.2 dB


#3

I missed those commands in the online reading.

however systemctrl does not work. Says command not found error… though the config command did work, I changed it from -10 to -5 and rebooted the PI.


#4

Any negative gain values (except -10) will set the gain to ZERO. Use positive numbers.
-10 is a special number which sets the gain to AGC (automatic gain control). The possible range is 0 to 49.6

however systemctrl does not work. Says command not found error

The right command is systemctl without r


#5

Ohyeah…I made sure I spelled it right too. I’m confused as you are.


#6

What I typed before “EXAMPLE”, and then you copied it, has an extra r (systemctrl instead of systemctl), It was originally my mistake, which you repeated.

Better copy-paste commands from below EXAMPLE, which were copy-pated ftom SSH console


#7

[quote=“abcd567”]

AH ok yeah now it works =)


#8

As “test” text goes, when I type my entire text I got an error message. Why?

Forbidden

You don’t have permission to access /posting.php on this server.

sudo piaware-config rtlsdr-gain 40

dump1090-fa --device-index 0 --gain -10 –


#9

When I do the changes as indicated above, it never accepts it in the system, either. It says it changes it, but when you do the long display of the information, it still says its -10.

I haven’t messed with it since.


#10

you have to add spaces before and after all slashes / in the text like I have done in two lines below, else it will say “Forbidden”.

#! / bin / bash

/ lib / systemd / system / dump1090-fa.service

Make a test post and copy-paste above two lines and and hit “Preview” button, it will show ok.
Now remove spaces before and after the slashes / and again hit “Preview” button, and see what happens.


#11

(1) Which image you have written to your microSD Card?
Piaware 3.5 image (SD Card)
OR
Raspbian Jessie image, then installed dump1090-fa and Piaware data feeder (add-on)

(2) After the command
sudo piaware-config rtlsdr-gain 40

did it say?
Set rtlsdr-gain to 40 in /boot/piaware-config.txt:xx


#12

pi@raspberrypi:~ $ sudo piaware-config rtlsdr-gain 40
Set rtlsdr-gain to 40 in / etc / piaware.conf:11

pi@raspberrypi:~ $ sudo systemctl restart dump1090-fa

pi@raspberrypi:~ $ sudo systemctl status dump1090-fa -l

● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
Loaded: loaded ( / lib / systemd / system / dump1090-fa.service; enabled)
Active: active (running) since Sun 2017-07-09 18:18:33 CEST; 8s ago
Docs: https: / / flightaware.com/adsb/piaware/
Main PID: 2142 (dump1090-fa)
CGroup: / system.slice / dump1090-fa.service
└─2142 / usr/bin / dump1090-fa --device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --max-range 360 --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-location-accuracy 1 --write-json / run / dump1090-fa --quiet

Jul 09 18:18:33 raspberrypi systemd[1]: Started dump1090 ADS-B receiver (FlightAware customization).
Jul 09 18:18:33 raspberrypi dump1090-fa[2142]: Sun Jul 9 18:18:33 2017 CEST dump1090-fa 3.5.0 starting up.
Jul 09 18:18:33 raspberrypi dump1090-fa[2142]: rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832U, SN 00001000)
Jul 09 18:18:33 raspberrypi dump1090-fa[2142]: Found Rafael Micro R820T tuner
Jul 09 18:18:33 raspberrypi dump1090-fa[2142]: rtlsdr: enabling tuner AGC

3.5 SD Card, Piaware image


#13

You got it wrong.
If it was Piaware 3.5 SD Card image, it will be “pi@piaware” , not "pi@raspberrypi"
Your install is Raspbian Jessie image with Piaware and dump1090-fa add-on
In this case sudo piaware-config command will be saved in piaware.conf file, but will NOT be transferred to dump1090-fa settings.

You have to edit file “dump1090-fa” and change gain setting.
(1) Give following command to open file dump1090-fa in editor nano



pi@raspberrypi:~ $ sudo nano/etc/default/dump1090-fa


(2) In the file opened in nano, change gain -10 to 40 (Caution: do NOT use negative value **-**40).
RECEIVER_OPTIONS="–device-index 0 --gain 40 --ppm 0 --net-bo-port 30005"

(3) Save file and close editor

(4) Now restart dump1090-fa:


sudo systemctl restart dump1090-fa

(5) Check status:


sudo systemctl status dump1090-fa -l

Last line of output will show gain actually set:

raspberrypi dump1090-fa[32553]: rtlsdr: tuner gain set to 40.2 dB