Yes, it is possible to change gain (and also other configurations) without console command (SUDO method as you have said), but only if you have burned your microSD card with Piaware SD card image. Even in this case, it is more difficult than console command.
Shut down your PI
Slip out microSD card and slip into card reader of your Desktop / Laptop
Double click on the drive letter of microSD card to open it
In the folder opened you will find a file named piaware-config.txt
Open this file, scroll down till you see this text
# 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
#
In line starting with rtlsdr-gain, change -10 to the value you want to set for gain.
If any configuration is not already available in file piaware-config.txt, scroll down the file and add a line with required config entry at the bottom of file.
Looks like I got some bad code somewhere. That one works well. Checked back to command history and I did use sudo …
Seems to be running now with the one you just posted.
some gain optimization scripts delete - inadvertently - the dump1090-mutability in /etc/default, happened to me in the past
what is the output from sudo cat /etc/default/dump1090-mutability ?
should be a file with many lines.
After 5 runs we get the totals and I would expect the cumulative sum for messages, positions and airplanes.
It seems that the airplanes are calculated differently because they don’t add up as they should, why?
I get “Cannot write to ‘optimize-gain-piaware3.py’ (Permission denied).”
I’m a real newb when it comes to all this - can someone help point me in the right direction so I can try to determining the optimum gain for my setup?
you are in a folder where you don’t have write permission.
use
cd
to get back to the home directory you should have write permissions there.
then run the wget command again and follow the instructions.
i don’t particularly like the gain script.
i would use the tabular display of your local map
Sort the planes by RSSI by clicking on the column head (twice or until it’s sorted with values closer to 0 at the top)
The closer to 0 a value is the stronger the signal.
Make sure not too many have a value > -3
If you have no planes > -6 or so just go ahead and increase the gain.
Now if you have sometimes low traffic coming close by (general aviation for example)
their signal might become too strong.
So if on the map you use the button “show all track” and some low level tracks are interrupted near the receiver that’s a good hint that your gain was too high to receive them.
(assuming they didn’t duck behind a hill or something)
you are close to an airport. that’s always complicated.
also it could be that weaker signals from further away are being drowned in cell phone noise.
anyways what’s your current gain and why don’t you make a screenshot of the table i mentioned?
what also is a consideration are there hills around you that are higher than your position?
or buildings?
i mean in all directions most people will have hills in some directions