[WORKING] New ADSBExchange base image v1.0

Discussion in 'Feeding' started by James, Dec 31, 2017.

Tags:
  1. James

    James Guest

    I talked with Chris (strangerwithadvice) a long time ago about this. Technically it is possible, the biggest thing to solves is stratux uses the Wifi to create an access point and most of the cases don't expose the Ethernet jacks. The Pi 3B+ even thought it has 2.4 and 5 GHz can only use one at time. <sad face>

    Now you could, have the stratux running and if it puts out beast/avr on port 30005, use something connected to the stratux wifi AP to route the 30005 beast output to ADSBx.

    Most of the newer images use NGINX or lighttpd to serve the web pages. Because they are efficient and fast and bug free versus some internal web server.

    A) Base layers are tough due to the size or storage, but technically possible. Especially if we didn't need a lot of detail OR could use some vector maps like openaip.net
    B) This is straight forward. Use python to initialize GPS, get a lock, check the lat, lon, alt, set some variables and reboot dump1090 and MLAT. I just haven't scripted it due to demand.

    I wonder if we can run stratux img in a docker container and somehow expose the dump1090 30005 data stream to it. Doesn't solve the Wifi access point issue tho ...

    James
    ADSBx
     
  2. C130Jeff

    C130Jeff New Member

    James

    Trying to skin the cat another way.... Can I configure your image to be an access point and look for a wired connection for internet access? My main need is really unrelated to feeding ADSB, but I really like your offline map capability (my main goal is to have this capability off of current position) , and I would like to access it either through an established wifi network, or through its own network. I don't know what I would break in your image if I went to change the settings. I am new at this, and I know how to make an access point through web tutorials - so that means I can follow directions, but know all the implications of changing things.

    The Stratux lets me do some of this if I have an EFB app set up. The webserver on your image means I don't need the EFB package.

    Thanks for the earlier response.

    Jeff
     
  3. James

    James Guest

    Short answer is yes.

    Long answer is - "I haven't done it."

    I really like my Stratux when I fly the Comanche. I put a Stratus ESG for 1090 out last year, and I still use the Stratux, my biggest issues is I would would like to hook the Stratux into my MX-20. It's going to die eventually, probably replace it with something of the "experimental" variety under NORSEE.

    And then dump the Garmin 150XL for a 625 or 650.

    If you are looking for an EFB, I like Airmate and iFly. Airmate and Avare are free.

    http://www.airmate.aero/?lang=en

    The ForeFlight cult is real.
     
    Last edited by a moderator: Jan 15, 2019
  4. stormadsb

    stormadsb New Member

    Is this image available to build from source or as a debian image? I'd like to give it a go but I would be using a Vm rather than a rpi
     
  5. James

    James Guest

    Not but in theory I used all opensource software and bash scripts. So many have it working on debian et all.

    Raspbian is Debian based .. so should work ... just need to enable rc.local using systemd on latest debian.

    prometheus (https://github.com/prometheus/prometheus)
    grafana (https://grafana.com/)

    https://github.com/prometheus/node_exporter/releases
    https://github.com/ADSBexchange/dump1090-exporter


    dump1090 (whatever flavor)
    https://github.com/ADSBexchange/mlat-client

    lightttpd


    bash scripts to feed from dump1090
    https://github.com/adsbxchange/adsb-exchange
     
    Last edited by a moderator: Jan 22, 2019
  6. davlinds

    davlinds Member

    I have found this script called Dump1090 MySQL Database Script with Alert and Filter and I want to take a "feed" so that I can populate the SQL database. I also found James' reply to someone else's similar query. However, the syntax appears to be incorrect for the Piaware image on the Raspi 3B+ that I am using
    Could I have some pointers please
     
  7. James

    James Guest

    ummm. .. the easiest way without messing about in a lot of bash or python ...

    Basically what you should do is parse the dump1090 json web output and save it in MySQL.
     
  8. Endo

    Endo New Member

    I have an embarrassingly basic question: if I want to setup a custom feed, do I change ADSBXCUSTOMPORT in /boot/adsb-config.txt?

    It is currently 30005 and I'd change it to 5XXXX, correct?

    Thanks
     
  9. James

    James Guest

    Correct, find an open port with no data on it on one of the custom feed servers.

    Or email me a name to call it, lat, lon, at [email protected] and I'll assign one to you.
     
  10. Endo

    Endo New Member

    I am having trouble getting a custom feed to work, which makes me wonder if I'm feeding correct information when using the default port.

    As James says above, I changed ADSBXCUSTOMPORT to an open port (53057). When I go to that specific receiver on the virtual radar, I get very strange results. Because I'm in the DC area, I am usually tracking between 40 -80 planes. The virtual radar only shows four planes and they are all off the coast of Western Africa. The data is garbled too, as you can see in the below picture. While it would be cool to track a plane at 6,000,000 feet, pretty sure it is wrong!

    Any suggestions?
     

    Attached Files:

  11. MDA

    MDA Administrator Staff Member

    53xxx range is for VRS feeds. You should find free port in range 51000-51499 (custom feed from Pi).
     
  12. Endo

    Endo New Member

    Victory! Now working- thanks for the assistance.
     
  13. James

    James Guest

    Are you feeding direct from the Pi?


    53,xxx ports are for VRS COMPRESSED VRS data, which we are phasing out due to issues like this.

    51,xxx ports are for BEAST / AVR direct from a Pi / dump1090./
     
  14. James

    James Guest

    if [ -z "$WIFI_PASSWORD" ]
    then
    echo 'empty PSK'
    echo -e 'THIS IS THE WIFI CONFIG: \n\n ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n\nnetwork={\n scan_ssid=1\n ssid="'${WIFI_SSID}'"\n key_mgmt=NONE\n }'
    echo -e 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n\nnetwork={\n scan_ssid=1\n ssid="'${WIFI_SSID}'"\n key_mgmt=NONE\n }' >> /etc/wpa_supplicant/wpa_supplicant.conf

    else
    echo 'NOT EMPTY PSK'
    echo -e 'THIS IS THE WIFI CONFIG: \n\n ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n\nnetwork={\n scan_ssid=1\n ssid="'${WIFI_SSID}'"\n psk="'${WIFI_PASSWORD}'"\n }'
    echo -e 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n\nnetwork={\n scan_ssid=1\n ssid="'${WIFI_SSID}'"\n psk="'${WIFI_PASSWORD}'"\n }' >> /etc/wpa_supplicant/wpa_supplicant.conf

    fi
     
  15. Endo

    Endo New Member

    Hi,
    My raspberry pi stops feeding data every couple hours. Rebooting it previously fixed the problem, but now even rebooting doesn't fix it.

    It is definitely tracking planes which I can see in Grafana, however nothing shows up on the Custom Feed with my port selected (51067). The Custom Feed page does say "Tracking 0 out of XX aircraft". The XX is similar to the number of aircraft I can see in Grafana.

    I have the vanilla ADSBExchange Base Image with the Flight Aware Plus dongle. I'd appreciate any troubleshoots assistance.
     
  16. MDA

    MDA Administrator Staff Member

    I can see your feed:
    upload_2019-2-15_18-2-25.png
     
  17. Endo

    Endo New Member

    Ahhh... when I originally selected that port about a week ago, it was empty. Someone else must have selected it so I was double-feeding. I changed ports and it is now showing. I'll have to keep monitoring to see if it stops feeding.
     
  18. MDA

    MDA Administrator Staff Member

    Claim this port using contact form.
    zCons-5xxxx are not assigned so when there is no traffic somebody else can start feeding.
     
  19. James

    James Guest

    I need to figure out a better solution.

    Right now, if the custom port server has more than one person feeding to single port, or the server goes down then it will redirect your feed and/or anyone double feeding to 30005.

    Previously, we would lose the data from anyone double feeding. However, due to VRS coding the port doesn't close so I can't make it always put the feed back to the custom port.

    I'll look at it when I have time. I've reported the VRS not closing ports in a timely manager to the VRS dev. The developers stance is since ADSBx is using VRS beyond what he intends it to be used and it needs to be VRS behind a proxy server, he feels that it's not a vanilla install and therefor not a VRS problem to fix.
     
  20. Endo

    Endo New Member

    Now that I got the duplicate port feeding figured out, I am still having issues where my Pi stops feeding every couple of hours. It is still tracking planes which I can see via Grafana, but I don't see the plans on the Virtual Radar custom feed. When I reboot my Pi, the planes reappear on the Virtual Radar custom feed (port 51081). Per suggestions from others on the forum, I have my Pi reboot every night via crontab, but it still stops feeding- sometimes several times a day, sometimes it is good all day. Rebooting always fixes the issue.

    I'm not sure where to start troubleshooting. Not sure if it helps, but I've included the last hour (before I rebooted) of /var/log/daemon.log below:

    Feb 20 06:25:02 adsbx-custom systemd[1]: Created slice User Slice of www-data.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Starting User Manager for UID 33...
    Feb 20 06:25:02 adsbx-custom systemd[1]: Started Session c8 of user www-data.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Timers.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Paths.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Listening on GnuPG cryptographic agent and passphrase cache.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Listening on GnuPG cryptographic agent (access for web browsers).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Sockets.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Basic System.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Default.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Startup finished in 44ms.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Started User Manager for UID 33.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Stopping User Manager for UID 33...
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Stopped target Default.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Stopped target Basic System.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Stopped target Sockets.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Closed GnuPG cryptographic agent (ssh-agent emulation).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Closed GnuPG cryptographic agent (access for web browsers).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Closed GnuPG cryptographic agent and passphrase cache.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Stopped target Paths.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Stopped target Timers.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Reached target Shutdown.
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Starting Exit the Session...
    Feb 20 06:25:02 adsbx-custom systemd[12870]: Received SIGRTMIN+24 from PID 12886 (kill).
    Feb 20 06:25:02 adsbx-custom systemd[1]: Stopped User Manager for UID 33.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Started Session c9 of user www-data.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Starting User Manager for UID 33...
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Listening on GnuPG cryptographic agent and passphrase cache.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Paths.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Listening on GnuPG cryptographic agent (access for web browsers).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Timers.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Sockets.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Basic System.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Default.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Startup finished in 48ms.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Started User Manager for UID 33.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Stopping User Manager for UID 33...
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Stopped target Default.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Stopped target Basic System.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Stopped target Paths.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Stopped target Timers.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Stopped target Sockets.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Closed GnuPG cryptographic agent (ssh-agent emulation).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Closed GnuPG cryptographic agent and passphrase cache.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Closed GnuPG cryptographic agent (access for web browsers).
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Reached target Shutdown.
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Starting Exit the Session...
    Feb 20 06:25:02 adsbx-custom systemd[12893]: Received SIGRTMIN+24 from PID 12909 (kill).
    Feb 20 06:25:02 adsbx-custom systemd[1]: Stopped User Manager for UID 33.
    Feb 20 06:25:02 adsbx-custom systemd[1]: Removed slice User Slice of www-data.
    Feb 20 06:29:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format
    Feb 20 06:30:44 adsbx-custom systemd[1]: Starting Daily apt upgrade and clean activities...
    Feb 20 06:30:45 adsbx-custom systemd[1]: Started Daily apt upgrade and clean activities.
    Feb 20 06:30:45 adsbx-custom systemd[1]: apt-daily-upgrade.timer: Adding 44min 12.621727s random time.
    Feb 20 06:30:45 adsbx-custom systemd[1]: apt-daily-upgrade.timer: Adding 21min 46.808867s random time.
    Feb 20 06:30:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format
    Feb 20 06:31:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Receiver status: connected
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Server status: ready
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Receiver: 96.5 msg/s received 46.6 msg/s processed (48%)
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Server: 0.0 kB/s from server 0.5kB/s TCP to server 0.0kB/s UDP to server
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Results: 16.2 positions/minute
    Feb 20 06:32:13 adsbx-custom rc.local[596]: Wed Feb 20 06:32:13 2019 Aircraft: 15 of 17 Mode S, 13 of 13 ADS-B used
    Feb 20 06:32:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format


    Feb 20 06:46:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Receiver status: connected
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Server status: ready
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Receiver: 191.8 msg/s received 92.5 msg/s processed (48%)
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Server: 0.1 kB/s from server 1.1kB/s TCP to server 0.0kB/s UDP to server
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Results: 55.0 positions/minute
    Feb 20 06:47:14 adsbx-custom rc.local[596]: Wed Feb 20 06:47:14 2019 Aircraft: 20 of 20 Mode S, 26 of 27 ADS-B used
    Feb 20 06:47:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format


    Feb 20 07:01:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Receiver status: connected
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Server status: ready
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Receiver: 237.2 msg/s received 104.1 msg/s processed (44%)
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Server: 0.1 kB/s from server 1.2kB/s TCP to server 0.0kB/s UDP to server
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Results: 49.8 positions/minute
    Feb 20 07:02:14 adsbx-custom rc.local[596]: Wed Feb 20 07:02:14 2019 Aircraft: 26 of 27 Mode S, 30 of 30 ADS-B used
    Feb 20 07:02:57 adsbx-custom rc.local[596]: No binary formatter available, falling back to text format


     
    Last edited: Feb 20, 2019