ADS-B Receiver Project Setup Scripts

They should be, that is a fairly popular WiFi dongle for Raspberry Pi devices. The image uses and unmodified version of Raspbian downloaded from the Raspberry Pi web site. Only changes made pertain to locale, time zone, keyboard layout, and the addition of the dump10990-mutability package and the files making up the project.

Run the following command to make sure the device sees the dongle. You should see the USB dongle listed here.


lsusb

@Anyone encountering a blank screen or 500 error stillā€¦

I got a portion of the error message from antonov124ā€™s /var/log/lighttpd/error.log.
PHP Fatal error:  Uncaught exception ā€˜PDOExceptionā€™ with message 'SQLSTATE[HY000] [2005] Unknown My$

The error message appears to be:
SQLSTATE[HY000] [2005] Unknown MySQL server host ā€¦

Check that the database settings varaiables are set properly in the file /var/www/html/data/settings.class.php.
Check that MySQL is running using the following command: mysqladmin -u root -p status
Check that the host name assigned to the ā€œdb_hostā€ variable resolves using the command ā€œnslookup REPLACE_WITH_HOSTNAMEā€.
If for some reason the host name is not resolving try replacing the host name with the IP address to the server. 127.0.0.1 or if hosted remotely whatever that address is.

Check the file /var/log/lighttpd/error.log and report back any errors you may see in case you may be facing a different problem.

Ok, Have my wifi working now. Have a strange thing happening. When I have an wired ethernet to the PI. The web pages work fine. When I access them by the Wifi IP; there are just text and broken links and images. all pages of the web site. Any ideas what is going on.

Iā€™m new to ADS-B and Raspberry Pi.

I had PiAware installed and successfully feeding FlightAware.
Wanted to try dump1090-mutability so followed the instructions below, with the exception of instead of using Rasbian-Jessie-lite I used Rasbian Jessie as I already had a working image.

Did not install the ā€˜advancedā€™ features, turned off the ā€˜listen on all IP addressesā€™ function and enabled auto startup after boot.

Ran into trouble when asked for FlightRadar24 and PlaneFinder feeding details when completing the install through the web install page.
Iā€™m sure I entered the wrong details, usernames, share key when askedā€¦ :blush:

At the moment Iā€™m able to feed to FlightAware, but not to FlightRadar24 and PlaneFinder, also not sure if the feed to ADS-B exchange is working.
I have my FlightRadar24 and PlaneFinder sharekeys and was able to feed data to them before the new install of dump1090-mutability.

Where do I start to check the feed settings configured for FlightRadar24, PlaneFinder and ADS-B exchange?
Or how do I go about setting the feeds up?

@ylinen

Power issue?
Is the red light on the RPi staying on solid?
Is there a powered hub in the mix somewhere or is everything connected directly to the RPi?

@MikeMathee

To configure the Planfinder ADS-B Client goto YOUR_IP_ADDRESS:30053 then click on setting and enter the sharecode you set the client up with. If I remember right you may need to go to their site and log into your account and activate it. It has been awhileā€¦

I honestly have not paid to much attention to fr24feed since I installed on my receiver. It works but I generally donā€™t pay attention to the process or their site. However there appears to be a configuration file located at /etc/fr24feed.ini where you may be able to make changes.

As far as ADS-B Exchange I guess you could check for your receiver in this graph adsbexchange.com/sync/. That or ask them on their forums. Not sure if there is a way to check otherwise.

Not a power issue. Pi worked fine with the flightaware PiAware image in wifi. Problem is with the image from ADSBReceiver and wifi. It is working fine with wired Ethernet.

I am thinking driver issue with that image, but donā€™t know why. The wifi is a KanaKit version.

You got me at a loss hereā€¦

The v2.3.0 image is based on Raspbian Jessie Lite version May 2016 with all available updates installed which were available at the time it was released. The only things added to the image are a clone ADS-B Receiver Project repository downloaded to the /home/pi directory and dump1090-mutability is preinstalled as well. Nothing the scripts do effect anything pertaining to the kernel except the dump978 setup script which removes the dvb_usb_rtl28xxu module and creates the file /etc/modprobe.d/rtlsdr-blacklist.conf which disables the following modules.

dvb_usb_rtl28xxu
dvb_usb_v2
rtl_2830
rtl_2832
r820t

The Canakit WiFi adapter is one of the more popular ones out there and should be supported out of the box by Raspbian Jessie.

Just curious as to what all you have installed? I know installing everything will put a strain on even an RPi3 deviceā€¦
Maybe there is to heavy a load on the device causing things to choke?
What do your system performance graphs look like?

Try checking for OS updates as well see if something new has been released which may have fixed an issue.


sudo apt-get update
sudo apt-get dist-upgrade

Tried that. No new upgrades.

The PiAware images works fine on wifi. Trying to figure out what is different in the two images to not let wifi work right.

If I could post a graphic I would, but no way to attach.

I appear to not have a settings.class.php file in /var/www/html/data/. I imagine this is a problem.

Actually that appears to be exactly my problem. Hereā€™s the lighted error from the error .log file:


2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  require_once(/var/www/html/classes/settings.class.php): failed to open stream: No such file or directory in /$
2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/html/classes/settings.class.php' (include_path='.:/usr/$
2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  require_once(/var/www/html/classes/settings.class.php): failed to open stream: No such file or directory in /$
2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/html/classes/settings.class.php' (include_path='.:/usr/$
2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning:  require_once(/var/www/html/classes/settings.class.php): failed to open stream: No such file or directory in /$
2016-09-22 22:54:51: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/html/classes/settings.class.php' (include_path='.:/usr/$


@rhodenr

I either the directory /var/ww/html/classes/ or ~/adsb-receiver/build/portal/html/classes/ there is a file named settings.class.sample.php. Copy this to the directory /var/www/html/data/ with the file name settings.class.php.


sudo cp /var/www/html/classes/settings.class.sample.php /var/www/html/classes/settings.class.php

Next open the file in your favorite editor and set the proper constants.


sudo nano  /var/www/html/classes/settings.class.php

An example of a lite install would be:


        const db_driver = 'xml';
        const db_database = '';
        const db_username = '';
        const db_password = '';
        const db_host = '';
        const db_prefix = 'adsb_';

MySQL would be:


        const db_driver = 'mysql';
        const db_database = 'YOUR_DATABASE_NAME';
        const db_username = 'YOUR_DATABASE_USER_NAME';
        const db_password = 'YOUR_DATABASE_USER_PASSWORD';
        const db_host = 'localhost';
        const db_prefix = 'adsb_';

SQLite would look like:


        const db_driver = 'sqlite';
        const db_database = '';
        const db_username = '';
        const db_password = '';
        const db_host = '/var/www/html/data/portal.sqlite';
        const db_prefix = 'adsb_';

If after recreating this file the problem still exists let me know.

I am looking to make the web stats available behind an nginx reverse proxy. Having some issues that appear to be related to the document root since the links donā€™t apply correctly behind the proxy. I tried using a top level tld rather than a subdirectory and still had issues with the dump1090 map page.

Would you mind either point me toward what pages I should modify or if at all possible, adding a document root setting to the admin page?

Thanks

Iā€™m running with the site behind a reverse proxy on my Synology NAS, iā€™ll check to see if i can find the configuration files this evening and post the relevant information here.
However, i am only able to use http, with https it doesnā€™t seem to work correctly.

UPDATE:

This is the relevant code nginx uses on my NAS:


server {
    listen 80;
    listen ::]:80;

    server_name sdr.xxxxxx.com;

    location / {
        proxy_set_header        Host                $host;
        proxy_set_header        X-Real-IP           $remote_addr;
        proxy_set_header        X-Forwarded-For     $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto   $scheme;
        proxy_intercept_errors  on;
        proxy_http_version      1.1;

        proxy_pass http://192.168.xx.xx:80;

    }
}


(FQDN and local ip are obfuscated)

In the screenshot below, did you notice that the interface is that of Piaware 3.1.0 / dump1090-fa, but the version number (top-right) is not 3.1.0, it is v1.15~dev?

Also the page URL is http://xxx.xxx.xx.xx/dump1090/gmap.html, and NOT http://xxx.xxx.xx.xx/dump1090-fa/

See the post (link below) on how to replace the skin of dump1090-mutability v1.15~dev by the skin of Piaware/dump1090-fa ver 3.1.0

http://discussions.flightaware.com/post198757.html#p198757

https://c5.staticflickr.com/9/8319/29894955676_132c6d827a_b.jpg

This is essentially what dump1090-fa is: dump1090-mutability with an updated UI (and a few things to improve integration with piaware)
The core demodulators etc are essentially the same.
I will be backporting some of the UI changes to dump1090-mutability when I have some spare time.

The v2.4.0 updates and additions containing the option to install dump1090-fa as well as changes which automatically update the adsb-receiver repository whenever install.sh is ran has been merged into the master branch. Both a dump1090-mutability and dump1090-fa image have been created but still need shrunk, archived, and uploaded to GitHub. It is getting late and I need to get a few hours of sleep before work. The images along with an official announcement should be available sometime in the morning or afternoon.

Dump1090-fa support was slapped together quite quickly today and testing was limited due to time.
I would love to hear any feedback from anyone choosing to go the dump1090-fa route over dump1090-mutability.

INSTALLED THE V2.4.0 WITH DUMP1090-FA

  1. Formatted microSD card and burned Jessie-Lt image
  2. Inserted microSD card in Pi, Powered up, SSH
  3. Configuration sudo raspi-config expanded file system, changed passwd, set time zone, and language us utf8, reboot
  4. SSH and ran following commands


sudo apt-get update
sudo apt-get install git
git clone https://github.com/jprochazka/adsb-receiver.git
cd ~/adsb-receiver
chmod +x install.sh
./install.sh


ALL WENT SMOOTH, EXCEPT ONE ISSUE.

ISSUE:
Dump1090 graphs not created, not even blank ones.
System graphs in place.
Tried to create dump1090 graphs



pi@raspberrypi:~ $ sudo ~/adsb-receiver/build/portal/graphs/make-collectd-graphs.sh 24h
1415 (process ID) old priority 0, new priority 5
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_aircraft-recent.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_aircraft-recent.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-demod.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_tracks-all.rrd': No such file or directory
1107x284
577x298
577x298
577x298
577x298
577x298
577x298
577x298
ERROR: opening '/var/lib/collectd/rrd/localhost/interface-wlan0/if_octets.rrd':No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-local_accepted.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-local_accepted.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_range.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_range.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_range.rrd': No such file or directory
ERROR: opening '/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_dbfs-signal.rrd': No such file or directory


DEBUGGED

pi@raspberrypi:~ $ sudo nano /etc/collectd/collectd.conf
#Press ctrl+w and type ā€œmodule dump1090ā€ (without " "), then press Enter key, the cursor will jump to code:


URL ā€œhttp://localhost/dump1090ā€

#Add -fa after dump1090 as shown in red below

URL "http://localhost/dump1090-fa"

#Save the file, exit and restart collectd module

pi@raspberrypi:~ $ sudo service collectd restart
pi@raspberrypi:~ $ sudo ~/adsb-receiver/build/portal/graphs/make-collectd-graphs.sh 24h
2210 (process ID) old priority 0, new priority 5
577x298
577x298
577x298
577x298
1107x284
577x298
577x298
577x298
577x298
577x298
577x298
577x298
ERROR: opening ā€˜/var/lib/collectd/rrd/localhost/interface-wlan0/if_octets.rrdā€™: No such file or directory
577x298
1107x284
577x298
577x298
577x298
577x298
pi@raspberrypi:~ $

https://c7.staticflickr.com/6/5330/29333178614_02b3502d8c_c.jpg

https://c2.staticflickr.com/9/8357/29960256865_2d17c05662_c.jpg

Thank you for the reply! I tried your exact configuration with corrected FQDN and local ip for my domain. It works for everything except the dump1090 map page. This is the same problem I have had in the past. Are you have any issues with the dump1090 map page?

No, everything is working fine (although slow, but that is due to my limited upstream)

@abcd567

Thanks for pointing this out. Was kind of in a rush last night and didnā€™t notice dump1090-faā€™s Lighttpd configuration sets up the alias to itā€™s HTML directory as /dump1090-fa instead of /dump1090 as dump1090-mutability does. Then again I should have known this being I added the dump1090-fa map link last release. This also opens up another can of worms when it comes to flight logging. I might just add another alias for /dump1090 mimicking the /dump1090-fa alias. Anyways these fixes should not take long to apply.

I just thought of thisā€¦
Out of curiosity how does your signal graph look? I am concerned that there may not be any signal data being sent from dump1090-fa due to the fact I cannot find an actual permanent configuration file for dump1090-fa where I could add the ā€œā€“measure-noiseā€ argument when it starts upā€¦

Thanks again for giving the scripts a good going over!

(1) I have replaced the dump1090-fa microSD card by regular one after successful finish of the install process. I have now put it back and from a short duration plot, it seems noise is being plotted. I will leave it running for some time to see how the signal graphs come up.

(2) Have a look at this post http://discussions.flightaware.com/post198829.html#p198829

https://c2.staticflickr.com/6/5203/29852832652_99bcaa1be8_o.png