Custom feed from Pi

Discussion in 'Tutorials' started by MDA, Feb 28, 2018.

  1. NigelR

    NigelR Member

    I've tried both ways but still nothing showing. When I rerun setup it didn't ask me for a port number, so I edited 30005 to 51303 again using the second method. There are two instances of 30005 when I edited adsbexchange-netcat_maint.sh, I changed the second one on the line, is that correct?

    Many thanks
     
  2. MDA

    MDA Administrator Staff Member

    Correct, source port should be 30005, destination 51303.
     
  3. NigelR

    NigelR Member

    Yes that's what I have done.When I did the reinstall I used the same username as I had previously setup. Would that cause a problem? I notice that username has now disappeared from the Feeder Stats
     
  4. MDA

    MDA Administrator Staff Member

    After reboot you'll disappear from mlat sync matrix, it needs some time to resync.
    Use netstat to check if your netcat feed is connected to adsbx port 51303.
     
  5. MDA

    MDA Administrator Staff Member

    Try to run this in terminal:
    Code:
    socat -u TCP:localhost:30005,nodelay TCP:feed.adsbexchange.com:51358,nodelay
    
    Just tested, port 51358 should be free.
    If you'll see your traffic we can continue...
     
  6. NigelR

    NigelR Member

    There doesn't seem to be any connection assuming that i have checked it correctly
     
  7. MDA

    MDA Administrator Staff Member

    I see traffic on this port now, please confirm that this is your traffic.
     
  8. NigelR

    NigelR Member

    Many thanks. I've tried 51358 and that seems to be fine. So do I go ahead and submit a form to claim the feed?
     
  9. MDA

    MDA Administrator Staff Member

    Press ctrl+c, edit netcat script again (put port 51358 in second part). Save and reboot.
    If your traffic will be visible after reboot then you can claim it. If not then you'll need to install rc.local service on your Pi and reinstall mlat-client.
     
  10. NigelR

    NigelR Member

    I've edited the script but there is no traffic visible for 51358. Does that mean I have to go back to the beginning an install everything?

    Thanks
     
  11. MDA

    MDA Administrator Staff Member

  12. NigelR

    NigelR Member

    It seems to be and is Active (running)
     
  13. MDA

    MDA Administrator Staff Member

    Please post content of netcat script and /etc/rc.local
    If connection called directly from terminal was OK and from scripts doesn't work then error is in one of them.
     
  14. MDA

    MDA Administrator Staff Member

    End of /etc/rc.local should look like:
    upload_2018-10-21_17-47-45.png
     
  15. NigelR

    NigelR Member

    Here are the necat script and /etc/rc.local

    netact script.png rc-local.png
     
  16. MDA

    MDA Administrator Staff Member

    Now is clear, your netcat script is wrong :D
    Exchange content with:
    Code:
    #!/bin/sh
    while true
      do
        sleep 30
        socat -u TCP:localhost:30005,nodelay TCP:feed.adsbexchange.com:51358,nodelay
    
      done
    Save, reboot and it should work.
     
  17. MDA

    MDA Administrator Staff Member

    rc.local content:
    Code:
    sudo nano /etc/rc.local
    If end of file is different then I posted please modify it too.
     
  18. NigelR

    NigelR Member

    Excellent, that seems to be working now. Many thanks for your help and patience guiding me (an amateur!) through this.
     
  19. MDA

    MDA Administrator Staff Member

    Nothing to thanks! Enjoy!
    Thanks for feeding
     
  20. MDA

    MDA Administrator Staff Member

    BTW please post mlat script content, maybe there are some bugs in it (mask your location).