No announcement yet.

Gain Optimization Script

  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    sudo crontab -e will edit roots crontab. In there you don't need sudo but it doesn't hurt either. Just checking.

    A little confused how -36.4 could end up in there.

    But if you want the changed gain to be displayed correctly maybe just use another method to change the gain (that only works because you already have that map changing gain):

    echo "36.4" > /usr/local/sbin/gain/newgain
    With the script you already installed that should work just fine, also the map should correctly show the new gain.
    (Otherwise the map doesn't even know which gain is the gain now, still have no idea why it would display -36.4)


    • #32
      Originally posted by Oblivian View Post
      Gains should be entered in +, dump1090 default amounts passed are positive. -10 is the only one that should appear -. So you are probably triggering that somewhere with an invalid value?

      Which makes too many chars to display on the line with "s

      Sent from my EML-L09 using Tapatalk
      I am using valid positive values and the config file shows that it is updating as expected. I think I need to also update a map setting but not sure how, possible something like:-

      sudo sed -n 's/\GAIN=//p' /etc/default/dump1090-mutability > /usr/local/sbin/gain/currentgain

      but when I run that I get "Permission denied"


      • #33
        Also note that using

        echo "36.4" > /usr/local/sbin/gain/newgain

        in the crontab to change gain, you don't even need a separate line for restarting dump1090 because the setgain script already takes care of that.

        After thinking about it.... the only valid reason for the gain to be -36.4 is if you somehow got an minus into the crontab, probably after the = sign. (which is an easy typo as those two keys are close to each other.)
        Last edited by wiedehopf; 2019-03-09, 22:47.


        • #34
          0 0 * * * echo "36.4" > /usr/local/sbin/gain/newgain
          0 6 * * * echo "33" > /usr/local/sbin/gain/newgain
          Use this as your crontab and it should just work in my opinion


          • #35
            echo "36.4" > /usr/local/sbin/gain/newgain works perfectly!



            • #36
              I am getting this error, could you suggest pls. 10x
              Attached Files


              • #37
                I've been testing a new antenna and been running the gain optimizing script "sudo ./" as I have many times in the past but now I get this error, either at the end or sometimes a few tests in:-

                [ ok ] Restarting dump1090-mutability (via systemctl): dump1090-mutability.service.
                Traceback (most recent call last):
                File "./", line 28, in <module>
                File "/usr/lib/python2.7/", line 228, in meth
                return getattr(self._sock,name)(*args)
                socket.error: [Errno 111] Connection refused

                The odd thing is that it sometimes completes normally - the error seems totally random.

                Any thoughts