Announcement

Collapse
No announcement yet.

How do you config frequency correction (PPM) on Raspberry Pi ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do you config frequency correction (PPM) on Raspberry Pi ?

    i know that each SDR usb dongle is slightly off the real frequency.
    mine is +56 ppm.
    where do i enter this information on my raspberry pi ?

  • #2
    CASE 1: If using dump1090-mutability

    Code:
    sudo nano /etc/default/dump1090-mutability
    Above command will open the file below.
    Scroll down till you find the lines shown in red below.
    Enter desired value of PPM.
    Save file (Ctrl+o) and Close file (Ctrl+x).
    Reboot Pi.


    Code:
    # dump1090-mutability configuration file
    # This is a POSIX shell fragment.
    # You can edit this file directly, or use
    # "dpkg-reconfigure dump1090-mutability"
    
    # Set to "yes" to start dump1090 on boot.
    START_DUMP1090="yes"
    
    # User to run dump1090 as.
    DUMP1090_USER="dump1090"
    
    # Logfile to log to
    LOGFILE="/var/log/dump1090-mutability.log"
    #
    # Receiver options
    #
    # RTLSDR device index or serial number to use
    # If set to "none", dump1090 will be started in --net-only mode
    DEVICE=""
    
    # RTLSDR gain in dB.
    # If set to "max" (the default) the maximum supported gain is used.
    # If set to "agc", the tuner AGC is used to set the gain.
    GAIN=43
    
    # RTLSDR frequency correction in PPM
    PPM="0"
    
    #
    # Decoding options
    #
    
    # If yes, fixes messages with correctable CRC errors.
    FIX_CRC="yes"
    
    # If set, supplies a reference location for local position decoding.
    LAT="xx.xxxx"
    LON="yy.yyyy"
    
    # If set, provides the absolute maximum receiver range used to
    # filter bad position reports, and to determine when local position
    # decoding is safe to use. Specify this in nautical miles (NM).
    MAX_RANGE="360"
    
    #
    # Networking options
    #
    
    # Port to listen on for raw (AVR-format) input connections. 0 disables.
    RAW_INPUT_PORT="30001"
    
    # Port to listen on for raw (AVR-format) output connections. 0 disables.
    RAW_OUTPUT_PORT="30002"
    
    # Port to listen on for SBS-format output connections. 0 disables.
    SBS_OUTPUT_PORT="30003"
    
    # Port to listen on for Beast-format input connections. 0 disables.
    BEAST_INPUT_PORT="30004,30104"
    
    # Port to listen on for Beast-format output connections. 0 disables.
    BEAST_OUTPUT_PORT="30005"
    
    # TCP heartbeat interval in seconds. 0 disables.
    NET_HEARTBEAT="60"
    
    # Minimum output buffer size per write, in bytes.
    NET_OUTPUT_SIZE="500"
    
    # Maximum buffering time before writing, in seconds.
    NET_OUTPUT_INTERVAL="1"
    
    # TCP buffer size, in bytes
    NET_BUFFER="262144"
    
    # Bind ports on a particular address. If unset, binds to all interfaces.
    # This defaults to binding to localhost. If you need to allow remote
    # connections, change this.
    NET_BIND_ADDRESS=""
    
    #
    # Misc options
    #
    
    # Interval (in seconds) between logging stats to the logfile. 0 disables.
    STATS_INTERVAL="3600"
    
    # Path to write json state to (for use with an external webserver). Blank disables.
    JSON_DIR="/run/dump1090-mutability"
    
    # Interval between writing json state (in seconds). 0 disables.
    JSON_INTERVAL="1"
    
    # Accuracy of receiver location to write to json state, one of "exact" / "approximate" / "none"
    JSON_LOCATION_ACCURACY="approximate"
    
    # Set to yes to log all decoded messages
    # This can get large fast!
    LOG_DECODED_MESSAGES="no"
    
    # Additional options that are passed to the Daemon.
    EXTRA_ARGS=""



    CASE 2: If using dump1090-fa

    Code:
    pi@orangepipc:~$ sudo nano /etc/default/dump1090-fa
    Above command will open the file below.
    Scroll down till you find the lines shown in red below.
    Enter desired value of PPM.
    Save file (Ctrl+o) and Close file (Ctrl+x).
    Reboot Pi.

    Code:
    # dump1090-fa configuration
    # This is sourced by /usr/share/dump1090-fa/start-dump1090-fa as a
    # shellscript fragment.
    
    # If you are using a PiAware sdcard image, this config file is regenerated
    # on boot based on the contents of piaware-config.txt; any changes made to this
    # file will be lost.
    
    # dump1090-fa won't automatically start unless ENABLED=yes
    ENABLED=yes
    
    RECEIVER_OPTIONS="--device-index 0 --gain 38 --ppm 0 --net-bo-port 30005"
    DECODER_OPTIONS="--max-range 360"
    NET_OPTIONS="--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_OPTIONS="--json-location-accuracy 1"


    CASE 3: If using Piaware SD card image

    Give following command. Replace xx by actual value of PPM you desire
    Code:
    sudo piaware-config rtlsdr-ppm xx
    
    sudo systemctl restart piaware
    
    #Better reboot
    sudo reboot
    Last edited by abcd567; 2019-04-14, 22:30.

    Comment


    • #3
      Hi abcd567.

      Thank you very much for your help.

      Comment


      • #4
        An alternate method for Pi24 image (untested)

        Note: This method wont work if you are using Raspbian image with dump1090-mutability or dump1090-fa package install. It also wont work on Piaware SD card image. It will work only on Pi24 image.

        If you are using Pi24 image, then instead of editing file /etc/default/dump1090-mutabilty, the settings can be passed to dump1090-mutability by fr24feed when it starts the dump1090. There are two ways to do it:
        1. Open browser, go to following address

          ip-of-pi:8754/settings.html

          Add --ppm xx to the field "Process arguments"

          FR24 settings - Integral dump1090.png


        2. Edit file fr24feed.ini
          Code:
          sudo nano /etc/fr24feed.ini
          In the opened file check if there is following line
          procargs="--gain -10"

          To this line add your ppm to make it like this
          procargs="--gain -10 --ppm xx"
          (Replace xx by value you want)

          If procargs line does not exist, add a new line
          procargs=" --ppm xx "
        Last edited by abcd567; 2019-04-15, 06:27.

        Comment

        Working...
        X