Feed adsbexchange with an operational Pi feeder now feeding AirNav?

Discussion in 'Feeding' started by vantage, Jul 1, 2020.

  1. vantage

    vantage New Member

    I've got my Pi feeder feeding radarboxDOTcom. I want to also feed adsbexchange.

    Is it possible to feed adsbexchange with a Pi feeder that feeds AirN av?
    OS: Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
    SDR : AirNav RadarBox FlightStick - ADS-B USB Receiver with Integrated Filter, Amplifier and ESD Protection
    software: Airnav's rbfeeder and mlat-client

    Any help is appreciated. I tried typing in all the commands I used but the forum SW thinks I'm entering SPAM/etc so I've had to edit them out.
    TIA
     
  2. wiedehopf

    wiedehopf Administrator Staff Member

  3. vantage

    vantage New Member

    Thanks. Do you know with the SW you described above will my Pi then feed both adsbexchange & AirNav simultaneously or just adsbexchange?
     
  4. vantage

    vantage New Member

    Looks like the answer is yes:

    https:// www . radarbox . com / raspberry-pi / guide

    If I leave out the spaces in the URL, the forum SW thinks I'm trying to post SPAM and the "unlink" button didn't work.
     
  5. wiedehopf

    wiedehopf Administrator Staff Member

    Should be feeding both.

    The readsb install script reconfigures the rbfeeder if necessary to point it at the new decoder.
    Such shenanigans would not be necessary if they would just offer data on port 30005 by default, which is what most installs do.

    If data is already offered on 30005, you only need the feed scripts which don't modify the decoder or anything like that.
    But for FR24 and RB you need to use that extra script that sets up a decoder which offers data on 30005 and then configures RB / FR24 to use that data as well.
     
  6. vantage

    vantage New Member

    After reading your posts, this forum, RadarBox documentation and looking at my /etc/rbfeeder.ini this may be easier than we thought. Here's my /etc/rbfeeder.ini with my specific info x'd out. Is there a script/commands I can run on the Pi to feed adbsexchange? If so, just this one?
    https://github.com/adsbxchange/adsb-exchange#obtaining-and-using-the-scripts



    [email protected]:/etc $ cat rbfeeder.ini
    [client]
    network_mode=false
    log_file=/var/log/rbfeeder.log

    key=xxxxxxxxxxxxx

    sn=xxxxxxxxxxxx

    lat=xxxxxxxxxxxxx

    lon=xxxxxxxxxxxxxx

    alt=xxxxxxx

    sat_used=0

    sat_visible=0

    [network]
    mode=beast
    external_port=30005
    external_host=127.0.0.1

    [mlat]
    autostart_mlat=true
    #mlat_cmd=/usr/bin/python3.5 /usr/bin/mlat-client

    [dump978]
    #dump978_enabled=true
     
  7. wiedehopf

    wiedehopf Administrator Staff Member

    I'm not sure what you are asking?

    I assume you ran my readsb install script?
    That changes exactly that configuration file ....

    And yes your current configuration implies you can just use the feed scripts.
     
  8. vantage

    vantage New Member

  9. wiedehopf

    wiedehopf Administrator Staff Member

  10. vantage

    vantage New Member

    I ran the script :

    sudo bash -c "$(wget -nv -O - https://raw.githubusercontent.com/adsbxchange/adsb-exchange/master/install.sh)"


    entered all the data it asked for and got this.

    ---------------------
    No data available on port 30005!
    ---------------------

    If you have connected an SDR but not yet installed an ADS-B decoder for it,
    we recommend this script:

    https://github.com/wiedehopf/adsb-scripts/wiki/readsb-script




    Here's the file and log dump the webpage suggests. I've x'd out the specifics.

    cat /etc/default/adsbexchange
    INPUT="127.0.0.1:30005"
    REDUCE_INTERVAL="0.5"

    # feed name for checking MLAT sync (adsbx.org/sync)
    USER="xxxxxxxxxxxxx"

    LATITUDE="xxxxxxxxxxxx"
    LONGITUDE="xxxxxxxxxx"

    ALTITUDE="xxxx"

    RESULTS="--results beast,connect,localhost:30104"
    RESULTS2="--results basestation,listen,31003"
    RESULTS3="--results beast,listen,30157"
    RESULTS4=""
    # add --privacy between the quotes below to disable having the feed name shown on the mlat map
    # (position is never shown accurately no matter the settings)
    PRIVACY=""
    INPUT_TYPE="dump1090"

    MLATSERVER="feed.adsbexchange.com:31090"
    TARGET="--net-connector feed.adsbexchange.com,30005,beast_reduce_out"
    NET_OPTIONS="--net-heartbeat 60 --net-ro-size 1280 --net-ro-interval 0.2 --net-ro-port 0 --net-sbs-port 0 --net-bi-port 0 --net-bo-port 0 --net-ri-port 0"




    Jul 03 21:42:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:43:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:43:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:44:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:44:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:45:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:45:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:46:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:46:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:47:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:47:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:48:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:48:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:49:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:49:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:50:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:50:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:51:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:51:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:52:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:52:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:53:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:53:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:54:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:54:54 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:55:24 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:55:55 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:56:25 raspberrypi adsbexchange-feed[460]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.




    Jul 03 21:45:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:45:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:46:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:46:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:47:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:47:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:48:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:48:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:49:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:49:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:50:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:50:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:51:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:51:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:52:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:52:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:53:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:53:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:54:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:54:54 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:55:24 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:55:55 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:56:25 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
    Jul 03 21:56:55 raspberrypi adsbexchange-mlat[462]: Could not connect to 127.0.0.1:30005, retry in 30 seconds.
     
    Last edited: Jul 4, 2020
  11. wiedehopf

    wiedehopf Administrator Staff Member

    It said this:


    If you have connected an SDR but not yet installed an ADS-B decoder for it,
    we recommend this script:

    https://github.com/wiedehopf/adsb-scripts/wiki/readsb-script




    network_mode=false

    See, you only have the rbfeeder internal decoder working.
    Thus you need the mentioned script.

    Please just run what is suggested.

    I already said it should't be an issue and the rbfeeder should continue feeding.
    If you don't believe me, can't help you.

    Didn't look at the complete rbfeeder config before.
    That's because i looked at it in detail when i adapted my script to work with that configuration ......
     
  12. vantage

    vantage New Member

    I removed all adsbexchange SW from my SD card and ran the ONLY the first script specified on https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-readsb which is:

    sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/adsb-scripts/master/readsb-install.sh)"


    Here's what came out. Note the failures in the output from journalctl.
    Is that normal?
    If so, do I run the script(s) in https://github.com/adsbxchange/adsb-exchange#obtaining-and-using-the-scripts
    If not, what's the next step?

    dpkg-deb: building package 'readsb-dbgsym' in '../readsb-dbgsym_3.8.4~dev_armhf.deb'.
    dpkg-genbuildinfo --build=binary
    dpkg-genchanges --build=binary >../readsb_3.8.4~dev_armhf.changes
    dpkg-genchanges: info: binary-only upload (no source code included)
    dpkg-source --after-build .
    dpkg-buildpackage: info: binary-only upload (no source included)
    Selecting previously unselected package readsb.
    (Reading database ... 95429 files and directories currently installed.)
    Preparing to unpack ../readsb_3.8.4~dev_armhf.deb ...
    Unpacking readsb (3.8.4~dev) ...
    Setting up readsb (3.8.4~dev) ...
    Adding user `readsb' to group `plugdev' ...
    Adding user readsb to group plugdev
    Done.
    Adding user `readsb' to group `dialout' ...
    Adding user readsb to group dialout
    Done.
    Enabling lighttpd integration..
    Enabling readsb: ok
    Run "service lighttpd force-reload" to enable changes
    Enabling lighttpd integration (stat cache)..
    Enabling readsb-statcache: ok
    Run "service lighttpd force-reload" to enable changes
    Restarting lighttpd..
    Created symlink /etc/systemd/system/default.target.wants/readsb.service → /lib/systemd/system/readsb.service.
    Processing triggers for man-db (2.8.5-2) ...
    No fr24feed configuration found, if you are using fr24feed run sudo fr24feed --signup or use the fr24feed install script
    If you intend to use fr24feed, use beast TCP with port 127.0.0.1 on port 30005. Or rerun this script later to fix the fr24feed configuration.
    already enabled
    Run "service lighttpd force-reload" to enable changes
    already enabled
    Run "service lighttpd force-reload" to enable changes
    --------------
    All done! Webinterface available at http://10.0.0.145/radar
    [email protected]:~ $ sudo readsb-set-location xxxxxx yyyyyyyyyyyyy

    setting Latitude: xxxxxxxxxx
    setting Longitude: yyyyyyyyyyyyy

    [email protected]:~ $ sudo journalctl --no-pager -u readsb
    -- Logs begin at Fri 2020-07-03 19:17:01 MST, end at Mon 2020-07-06 12:43:24 MST. --
    Jul 06 12:42:47 raspberrypi systemd[1]: Started readsb ADS-B receiver.
    Jul 06 12:42:47 raspberrypi readsb[27607]: Mon Jul 6 20:42:47 2020 BST Mictronics v3.8.4 starting up.
    Jul 06 12:42:47 raspberrypi readsb[27607]: rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00000001)
    Jul 06 12:42:47 raspberrypi readsb[27607]: usb_claim_interface error -6
    Jul 06 12:42:47 raspberrypi readsb[27607]: rtlsdr: error opening the RTLSDR device: Device or resource busy
    Jul 06 12:42:47 raspberrypi systemd[1]: readsb.service: Main process exited, code=exited, status=1/FAILURE
    Jul 06 12:42:47 raspberrypi systemd[1]: readsb.service: Failed with result 'exit-code'.
    Jul 06 12:42:58 raspberrypi systemd[1]: Stopped readsb ADS-B receiver.
    Jul 06 12:42:58 raspberrypi systemd[1]: Started readsb ADS-B receiver.
    Jul 06 12:42:58 raspberrypi readsb[27818]: Mon Jul 6 20:42:58 2020 BST Mictronics v3.8.4 starting up.
    Jul 06 12:42:58 raspberrypi readsb[27818]: rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00000001)
    Jul 06 12:42:58 raspberrypi readsb[27818]: usb_claim_interface error -6
    Jul 06 12:42:58 raspberrypi readsb[27818]: rtlsdr: error opening the RTLSDR device: Device or resource busy
    Jul 06 12:42:58 raspberrypi systemd[1]: readsb.service: Main process exited, code=exited, status=1/FAILURE
    Jul 06 12:42:58 raspberrypi systemd[1]: readsb.service: Failed with result 'exit-code'.
    Jul 06 12:43:16 raspberrypi systemd[1]: Stopped readsb ADS-B receiver.
    Jul 06 12:43:16 raspberrypi systemd[1]: Started readsb ADS-B receiver.
    Jul 06 12:43:16 raspberrypi readsb[27955]: Mon Jul 6 20:43:16 2020 BST Mictronics v3.8.4 starting up.
    Jul 06 12:43:16 raspberrypi readsb[27955]: rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00000001)
    Jul 06 12:43:16 raspberrypi readsb[27955]: usb_claim_interface error -6
    Jul 06 12:43:16 raspberrypi readsb[27955]: rtlsdr: error opening the RTLSDR device: Device or resource busy
    Jul 06 12:43:16 raspberrypi systemd[1]: readsb.service: Main process exited, code=exited, status=1/FAILURE
    Jul 06 12:43:16 raspberrypi systemd[1]: readsb.service: Failed with result 'exit-code'.
    [email protected]:~ $
     
  13. wiedehopf

    wiedehopf Administrator Staff Member

    sudo systemctl restart rbfeeder

    Does that help?
    Might have gotten the service name wrong for rbfeeder.

    also let's check
    cat /etc/rbfeeder.ini

    Thought you didn't want to run that readsb script for some reason..... probably some miscommunication ....
     
  14. wiedehopf

    wiedehopf Administrator Staff Member

    Checked my script and fixed the name for the rbfeeder service.
     
  15. vantage

    vantage New Member

    Ran sudo systemctl restart rbfeeder and things look much better. See below.

    If this all looks good, what's the next step? Run the
    sudo bash -c "$(wget -nv -O - https://raw.githubusercontent.com/adsbxchange/adsb-exchange/master/install.sh)"
    ?


    sudo journalctl --no-pager -u readsb
    -- Logs begin at Mon 2020-07-06 14:33:46 MST, end at Mon 2020-07-06 14:38:40 MST. --
    Jul 06 14:33:50 raspberrypi systemd[1]: Started readsb ADS-B receiver.
    Jul 06 14:33:50 raspberrypi readsb[467]: Mon Jul 6 22:33:50 2020 BST Mictronics v3.8.4 starting up.
    Jul 06 14:33:50 raspberrypi readsb[467]: rtlsdr: using device #0: Generic RTL2832U OEM (Realtek, RTL2838UHIDIR, SN 00000001)
    Jul 06 14:33:51 raspberrypi readsb[467]: Detached kernel driver
    Jul 06 14:33:51 raspberrypi readsb[467]: Found Rafael Micro R820T tuner
    Jul 06 14:33:51 raspberrypi readsb[467]: rtlsdr: enabling tuner AGC
    Jul 06 14:33:51 raspberrypi readsb[467]: Allocating 16 zero-copy buffers


    [email protected]:~ $ cat /etc/rbfeeder.ini
    [client]
    network_mode=true
    log_file=/var/log/rbfeeder.log

    key=xxxxxxxxxxxxxx

    sn=yyyyyyyyyyyyyyyyyy

    lat=aaaaaaaaaaaaaaaa

    lon=bbbbbbbbbbbbbbbb

    alt=ccccccccccccccccc

    sat_used=0

    sat_visible=0


    [network]
    mode=beast
    external_port=30005
    external_host=127.0.0.1

    [mlat]
    autostart_mlat=true
    #mlat_cmd=/usr/bin/python3.5 /usr/bin/mlat-client

    [dump978]
    dump978_enabled=false


     
  16. wiedehopf

    wiedehopf Administrator Staff Member

    Yep, run the feed scripts.

    Would have never needed to remove those ;)

    network_mode=true
    As you can see rbfeeder is now working "network" mode as in using the readsb decoder you installed.

    If you want an additional interface, you can also install: https://github.com/wiedehopf/tar1090#tar1090
     
  17. vantage

    vantage New Member

    Looks like it's all working feeding both radarbox.com and adsbexchange.com. I let it run for a while and if it's stays stable, I'll install the additional interface you mentioned above.

    Thank you for all your help !
     
  18. vantage

    vantage New Member

    Just an FYI: "sudo systemctl restart rbfeeder" did not restart the mlat-client. I did "sudo reboot" and all is running again.
     
  19. wiedehopf

    wiedehopf Administrator Staff Member

    I see ....

    I'm kinda annoyed that they don't just install dump1090-mutability or readsb and connect to port 30005.
    After all they seem to have no issue installing mlat-client ....

    Because they use a non-standard version of mlat-client but then still use the same package name, there were compatibility issues.
    That's why the feed scripts now use a python virtualenv .... so there are no mlat-client conflicts.

    Anyhow i suppose i can add a restart for that.