Adding a 978 Mhz Receiver

Discussion in 'Feeding' started by Doug Du Plessis, Mar 26, 2020.

  1. Doug Du Plessis

    Doug Du Plessis New Member

    I have successfully added and configured my 978 radio and am able to pick up UAT signals using:

    rtl_sdr -f 978000000 -s 2083334 -d 1 -g 48 - | /home/pi/dump978/dump978 | /home/pi/dump978/uat2text

    I'm attempting to merge into my readsb feed and have followed all directions in this post:

    "how-to-feed/adding-978-mhz-ads-b-capability-to-your-pipi2"

    My readsb config is set up to accept from the same device data on 30001 using 127.0.0.1

    Any ideas why I might not be seeing the traffic on the radar website for the UAT traffic? I'm testing this at the airport with my UAT plane transponder on. I can see the plane in my Stratux device as well, so I have a stationary target for testing. Any help would be appreciated. Thanks!

    Doug
     
  2. wiedehopf

    wiedehopf Administrator Staff Member

    Use uat2esnt instead of uat2text.
    Don't think the text format is AVR, thus readsb won't understand it.
     
  3. Doug Du Plessis

    Doug Du Plessis New Member

    Right. I am using the following method per the original post instructions:

    /usr/bin/rtl_sdr -f 978000000 -s 2083334 -d 1 -g 48 - | /home/pi/dump978/dump978 | /home/pi/dump978/uat2esnt | /bin/nc -q1 127.0.0.1 30001

    I was only using the ua2text for screen output.

    I also changed net-ri-port to 30001 in the /default/readsb config file from it's original value of 0
     
  4. wiedehopf

    wiedehopf Administrator Staff Member

    "website for the UAT traffic"

    could you explain.

    The UAT planes will be marked ADS-R and be in the same map as the 1090 received planes.

    Also the line above probably likes to crash and i'm not sure if it then exits correctly ...
    Depending on the SDR a lower gain will probably provide better reception.
     
  5. Doug Du Plessis

    Doug Du Plessis New Member

    Sorry, I was referring to the readsb radar local map output when I said website. Are there any log files that would contain the ADS-R plane data? What gain setting would you recommend? Again, I was able to see the UAT data on the console, just no evidence that the data was being properly passed through ua2esent to the readsb radar.
     
  6. wiedehopf

    wiedehopf Administrator Staff Member

    Depends on your antenna and SDR.

    For the yellow ProStick, usually a gain of 30 or lower for UAT.
    Unamplified SDRs, i'd try 44.

    Which antenna are you using?

    I normally prefer to use dump978-fa and then have an extra socat to redirect it.
    But i don't think it should work any better than what you are doing.

    You could add tee to your pipe:

    uat2esnt | tee /tmp/978 | socat -u STDIN TCP:127.0.0.1:30001

    then you can use this command to check for messages:
    tail -f /tmp/978

    Also be aware that it might crash and require a restart.
     
  7. Doug Du Plessis

    Doug Du Plessis New Member

    For my UAT setup, I'm using:

    AirNav RadarBox Flightstick UAT 978 MHz with a Nooelect 978 antenna that came an SDR I use with my Stratux setup. It's attached directly to the SDR. I'll try a lower gain setting as suggested.

    Are you suggesting the following for a pipe setup?

    /usr/bin/rtl_sdr -f 978000000 -s 2083334 -d 1 -g 48 - | /home/pi/dump978/dump978 | /home/pi/dump978/uat2esnt | tee /tmp/978 | socat -u STDIN TCP:127.0.0.1:30001

    I presume I'd have to create folder "/tmp/987" and install "tee" or is that already part of raspbian?
     
  8. James

    James Guest

    You are better off using dump978-fa

    then create a bash script

    convert.sh

    where 30978 is raw output of dump978-fa
    and 30001 is raw input of readsb or dump1090 decoder that is running
    obv locations of uat2esnt -- will need to be changed to your setup

    Code:
    #!/bin/sh
    
    trap "exit" INT TERM
    trap "kill 0" EXIT
    
    while sleep 1
    do
        sleep 5 &
        socat -u TCP:localhost:30978,keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=10,forever,interval=15 STDOUT | /usr/local/share/uat2esnt | socat -u STDIN TCP4:localhost:30001,keepalive,keepidle=30,keepintvl=30,keepcnt=2,connect-timeout=10,forever,interval=15
        wait
    done &
    
    The pipe method isn't reliable as the pipe won't always collapse properly on error.
     
  9. Doug Du Plessis

    Doug Du Plessis New Member

    I'll give that a go when I'm able and report back. Thanks.
     
  10. James

    James Guest

    dump978-fa requires soapysdr

    You can install old piaware on stretch then just

    sudo apt install dump978-fa

    don't use newest piware as they require libraries that stretch does not have

    FA really made it hard to use as well

    I believe it will work on buster without issue

    you only need to install dump978-fa .. you do not need to install piaware if you don't want to feed FA
     
  11. Doug Du Plessis

    Doug Du Plessis New Member

    I was hoping to do this w/out pi-aware. I have a pi-aware feeder system which also feeds adsbexchange at my home installation. The new setup I wanted to simplify and only use readsb. I'm using it as a data collector for my airport and sending results to a mysql database. Everything runs smoothly, so I was hoping to just "drop in" the UAT traffic. Should I test and see if the pipe method above will work out before I re-write this whole thing?
     
  12. James

    James Guest

    If you already have dump978 compiled then run it and use the convert.sh pipe method above

    most people don't have dump978 installed yet :D
     
  13. wiedehopf

    wiedehopf Administrator Staff Member

    That's a very poor antenna.
    Putting a paperclip of appropriate length, around 7.7 cm sticking out of the connector will probably be MUCH better reception.
    I have no clue what Nooelec is doing with those small antennas but they are really horrible.

    You don't need piaware for dump978-fa.

    tee should be installed by default.
    the directory /tmp is always present.
    978 is the file that will be create by tee.

    tee /tmp/978 is just for you to check if messages come in, not for permanent use.
     
  14. James

    James Guest

    I can confirm. I bought a few of those nooelec ones ... not sure they actually tuned them
     
  15. Doug Du Plessis

    Doug Du Plessis New Member

    I use these antennas with my Stratux boxes. They are more than adequate for that function. Up in the plane, I get > 50nm with 978 UAT traffic and TISB weather. Even on the ground with a window view, the distance is pretty good. For THIS application, I might end up with pole mounted antennas outside our FBO, but I'm really only interested in the traffic w/in 5nm and < 5000 agl.
     
  16. James

    James Guest

  17. Doug Du Plessis

    Doug Du Plessis New Member

    I'd be willing to set this up feeding ADSBx at the airport. I only have a test pi device there right now. Are you also talking about the pi and radios or just the antenna(s). Do I need two antennas or do you split the feed for the local radios?

    Another question about the bash script above. (I'm pretty good at this stuff, but am relatively new to pi and raspbian). Where does the convert.sh file get placed and how is it invoked on reboot?
     
  18. James

    James Guest

    We developed a single antenna. FA made 2 separate antenna so they can sell 2 antenna. :D

    The 978 is kinda of hard to implement because FA made it difficult.

    Basically after dump978 is running.
    That convert script needs to start.

    We used systemd in the ADSBx image.

    https://www.adsbexchange.com/how-to-feed/adsbx-custom-pi-image/
     
  19. Doug Du Plessis

    Doug Du Plessis New Member

    I'm still testing with dump978 (not dump978-fa) ...

    Tonight I was able to send the dump978 sample data through dump978 and to readsb via uat2esnt as follows:

    zcat sample-data.txt.gz | /home/pi/dump978/uat2esnt | socat -u STDIN TCP:127.0.0.1:30001

    ...and view it on the readsb radar.

    Since I was able to view UAT from the plane using the following, I think the above pipe with socat should work!

    rtl_sdr -f 978000000 -s 2083334 -d 1 -g 48 - | /home/pi/dump978/uat2text

    Found 2 device(s):
    0: Realtek, RTL2838UHIDIR, SN: 00001090
    1: Realtek, RTL2838UHIDIR, SN: 00000978

    Using device 1: Generic RTL2832U OEM
    Found Rafael Micro R820T tuner
    Exact sample rate is: 2083334.141630 Hz
    [R82XX] PLL not locked!
    Sampling at 2083334 S/s.
    Tuned to 978000000 Hz.
    Tuner gain set to 48.00 dB.
    Reading samples in async mode...
    Allocating 15 zero-copy buffers
    Failed to allocate zero-copy buffer for transfer 7
    Falling back to buffers in userspace
    HDR:
    MDB Type: 2
    Address: A8ED5E (ICAO address via ADS-B)
    SV:
    NIC: 0
    Altitude: 1200 ft (barometric)
    Dimensions: 25.0m L x 23.0m W
    UTC coupling: no
    TIS-B site ID: 0
    AUXSV:
    Sec. altitude: unavailable
    ....
    I'll test this again as soon as I can get to the airport (darn COVID-19) or have the FBO mgr get in the plane for me and turn on the transponder while I monitor the pi remotely...
     
  20. James

    James Guest

    Yup that looks like what we used to do. The problem is the pipe | doesn't work reliably as a feeder long term.