All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 1:10 pm 
Offline
JTTX - FlightAware user avatar

Joined: Fri Oct 28, 2016 3:30 pm
Posts: 17
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. :shock:


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 1:34 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
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: https://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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 1:45 pm 
Offline
JTTX - FlightAware user avatar

Joined: Fri Oct 28, 2016 3:30 pm
Posts: 17
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.






abcd567 wrote:
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: https://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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 2:48 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
JTTX wrote:
I changed it from -10 to -5 and rebooted the PI.

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

Quote:
however systemctrl does not work. Says command not found error

The right command is systemctl without r


Last edited by abcd567 on Sat Jul 01, 2017 2:51 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 2:51 pm 
Offline
JTTX - FlightAware user avatar

Joined: Fri Oct 28, 2016 3:30 pm
Posts: 17
abcd567 wrote:
JTTX wrote:
I changed it from -10 to -5 and rebooted the PI.

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

Quote:
however systemctrl does not work. Says command not found error

Did you use sudo with systemctl?



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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 2:56 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
JTTX wrote:
however systemctrl does not work. Says command not found error


JTTX wrote:
Ohyeah...I made sure I spelled it right too. I'm confused as you are.


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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sat Jul 01, 2017 3:11 pm 
Offline
JTTX - FlightAware user avatar

Joined: Fri Oct 28, 2016 3:30 pm
Posts: 17
abcd567 wrote:
JTTX wrote:
however systemctrl does not work. Says command not found error


JTTX wrote:
Ohyeah...I made sure I spelled it right too. I'm confused as you are.


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



AH ok yeah now it works =)


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 11:59 am 
Offline
EmilK - FlightAware user avatar

Joined: Sun Nov 06, 2016 9:46 am
Posts: 35
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 --


Last edited by EmilK on Sun Jul 09, 2017 12:03 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 12:03 pm 
Offline
JTTX - FlightAware user avatar

Joined: Fri Oct 28, 2016 3:30 pm
Posts: 17
EmilK wrote:
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.



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.


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 12:11 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
EmilK wrote:
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 --


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.


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 12:31 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
EmilK wrote:
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 --

(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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 12:44 pm 
Offline
EmilK - FlightAware user avatar

Joined: Sun Nov 06, 2016 9:46 am
Posts: 35
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


Top
 Profile  
 
 Post subject: Re: Need to adjust the Gain
PostPosted: Sun Jul 09, 2017 1:52 pm 
Offline
FlightAware Member
abcd567 - FlightAware user avatar

Joined: Sat Feb 15, 2014 3:08 am
Posts: 2119
Location: Toronto CYYZ
EmilK wrote:
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
...........
...........
3.5 SD Card, Piaware image

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
Code:
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:
Code:
sudo systemctl restart dump1090-fa


(5) Check status:
Code:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: domefin, Google [Bot], spotterssol and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: