Sydney Airport Message Board Sydney Airport Message Board  

Go Back   Sydney Airport Message Board > Spotting and Movements > Radar Spotting
Register FAQ Calendar Today's Posts Search


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th June 2017, 12:21 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default Quick ADSB for Newbies

TL;DR (Too long, didn't read)

* Making it easy to setup Raspberry Pi from the amateur, to the expert
* A couple of basics required
* Each new site takes a few minutes
* Apart from having to generate an ssh key, no technical skill required
* Using a new method to make all the hard work done for you

This post is very, very long - mainly because I want it to be very, very comprehensive.
Once you have all your details to configure your devices, and have basic tools - setting up each new device takes a very short amount of time.



----

Hi All,

It's been a long time since I posted. I've also been a long time sender to the three main crowdsourced public ADSB sharing services:

http://flightaware.com
http://planefinder.com
http://flightradar24.com

Most of us have used these services on either our desktops or mobile phones to track flights. But there are advantages to submitting to one (or all) of these services. Generally it allows you to use the services on their highest paid plans completely free of charge. At a minimum it clears annoying advertisements from services.

My background is a Unix Systems Administrator, and currently look after thousands of systems as a Site Reliability Engineer.

So setting up a device to submit ADSB should have been a walk in the park. It has improved significantly, but I still think it's out of reach for some.

This post is for a couple of reasons:

1. I have found a very easy method for setting up devices with minimal technical skills required.
2. This method allows setting up of many devices quickly.
3. It also allows quick upgrades and remote management.
4. You don't need to follow website instructions.
5. You get all three services in one go.

More to follow....

Last edited by Glenn Stewart; 18th June 2017 at 12:09 AM.
Reply With Quote
  #2  
Old 17th June 2017, 07:09 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

First things first. What do I need?

Obviously you cannot get around the hardware requirements. The list of hardware is short and cheap. Almost no technical skill required. If you can plug a modern TV into a wall, you can get a Raspberry Pi connected.

A fair list of requirements is available here:
https://flightaware.com/adsb/piaware/build

How much time is required?

Using the old method this depended on a few things. How familiar are you with Linux? How many sites do you want to configure for? Are you configuring from scratch? Do you want more than one device configured?
It could take anywhere from an hour to several hours. The uninitiated could spend even a couple of days.
With my method the initial setup might take a little while. But once the basics are done, the first site could be up and running in 5 minutes. Converting a pre-existing Raspberry Pi (once the image has been downloaded), can take as little as 2 minutes.

Last edited by Glenn Stewart; 17th June 2017 at 07:55 PM. Reason: spacing
Reply With Quote
  #3  
Old 17th June 2017, 08:19 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

The Shopping List
  • A Raspberry Pi (2 or 3) - You can order from anywhere but maybe try Element14
  • A blank micro SD card (16GB preferred, class 10 preferred) - can pick up almost anywhere.
  • RTL-SDR Dongle. I'd suggest rtl-sdr.com. The basic one comes with a basic antenna that will get your started. You can upgrade to a bigger antenna later (if you want better range).

What else is required?
  • A small amount of time.
  • Access to a command line with git (could be Windows, Linux, Mac OS). More on this shortly.
  • One or all of the following accounts: Flightradar24, Flightaware, Planefinder.

ADSB Websites

Using my method, you can sign up to either one or more of these accounts. The rest of the process (i.e. their install page), is done mostly for you.

Join using the following links. If you see plans, don't join anything. The advantage of submitting data is that you immediately get full, top of the range access for free as payment for submitting.
https://flightaware.com/account/join/
https://planefinder.net/sharing/register
https://www.flightradar24.com/premium

Now for the small amount of tech...

The secret sauce to my method is website called Resin.io. What the heck is Resin.io?

Ummmm a couple of videos might help explain this:
https://www.youtube.com/watch?v=-fi8FLHduL0
https://www.youtube.com/watch?v=zQVnHCcwzrE

A document could help a little more:
https://resin.io/how-it-works/

But put simply, Resin.io takes all the hard work out worrying about your device, the installs, configuration or even monitoring. I've written the code, so you don't have to worry. Just like the last video.... get a martini and it's a few minutes.

Last edited by Glenn Stewart; 17th June 2017 at 08:22 PM. Reason: formatting
Reply With Quote
  #4  
Old 17th June 2017, 08:54 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Okay.... time for the hard prerequisites

There are two basic tools you will require that not every computer user has out there:
  1. an ssh client
  2. a git client

What the heck are they?

Okay, if you don't know that's fine. I'll explain.
If you've studied ahead, and you know exactly what these are, skip ahead.

Worth noting, if you have a Mac or Linux, both ssh and git are already pre-installed. Skip ahead if you like. If you have Windows, unfortunately there is a bit of work to do. Continue reading.

GIT

Git? No, it's not your best mate. It's a program that is used to send text, code or whatever you like to a git repository. Yep, that hasn't convinced you has it. Its traditional use is for software developers to track changes to code. Honestly, it's a tool I can't live without. But for our purpose, it has a very short and sweet use. To get my code, and to send it to your Resin. That's it!!! Then your devices are running pretty, and you haven't had to do much work at all.

To install git, follow this guide nicely written by someone in my company far more neatly than I could have:
https://www.atlassian.com/git/tutorials/install-git
The windows guide is here:
https://www.atlassian.com/git/tutori...ll-git#windows

For the sake of Resin and SSH, it makes life easy if you signup for Github.com.
Click here to signup for Github to save time later on

SSH

An ssh client is a program that can securely connect to an ssh server. Awesome right? It's the method that most will use to connect to their Raspberry Pi and once connected, you can type awesome commands.
Thankfully though, I am taking you out of the loop. It's going to be used to allow you to send information to Resin.io and get the ball rolling on your devices.

I think best guide to installing this on Windows is this simple video.
https://www.youtube.com/watch?v=Vi-WqFKYpnw

When you have ssh and git working, continue on....
Reply With Quote
  #5  
Old 17th June 2017, 09:07 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Signing up to and setting up Resin.io

This is where the bulk of your device control will come from. But you have to set up an account and the basics before you can start cooking with gas.
  • Head over to Resin.io to sign up: https://dashboard.resin.io/signup
  • Once you have created an account, login.
  • Create an application. Call it anything you like - maybe "ADSB" or something along those lines.
  • Click on your new, empty application and click the button on the left "Download resinOS". You will need your WiFi password, or otherwise a network connection to your device. Remember where you save this file.
  • Head over to Resin.io's burning tool Etcher - download it, run it from here: https://etcher.io/
  • Insert the micro SD you have from your shopping list and insert it in a reader that's connected to your computer.
  • Run Etcher. Choose the image you downloaded and the source, the micro SD as your drive. Click. Done. Easy!
  • Once your image is complete, stick it in your Raspberry Pi, power it own and wait for your device to appear in your Resin.io account.
Reply With Quote
  #6  
Old 17th June 2017, 09:29 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Let's look at Resin.io screens....

The way Resin.io works is that it needs two ingredients:
  1. Some code - which I'll give you
  2. Some variables - which only you know

We'll get to the code. But let's first talk about these variables.

Variables are in two forms:
  1. Per application
  2. Per device

If you only have one Raspberry Pi, this really doesn't make much difference. But the secondary goal of Resin.io is that it makes running one device as easy as running a thousand. I have five Raspberry Pi's and want to run them in many locations, so I have variables per device. But I digress....
  • Click on your application. You will see a list of the single device (or many devices) here. Everything in this window is for all devices, including "Environmental Variables".


  • Click your device. Here is where you will eventually see the output from your device.


  • Click "Environmental Variables"


  • This is the main window that you will use to set major variables. Keep this link front of mind ready for the next step.
Reply With Quote
  #7  
Old 17th June 2017, 09:50 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

What are these variables you speak of?

Remember earlier when you signed up for Planefinder, Flightradar24 and Flightaware? To run a device sending to these services, they provide you with information (such as a special device ID), and you provide them with information (such as your GPS co-ordinates).

These fall into variables.
The basics ones are easy!!!

GPS Variables

If you have all your devices in one location, save yourself some time by setting these as application specific variables. There is no hard and fast rule though.
  1. Head to this site https://mycurrentlocation.net/
  2. Copy your Latitude and Longitude onto a notepad
  3. Click on your application
  4. Click on "Environment Variables" directly under "Devices". It should read "Application Environment Variables" (i.e. the ones that are shared among all devices)


  5. Enter your first Resin.io variables as follows in form "Name" (the variable name) and "Value" (the value):
  6. LAT = <whatever yours is>, click "Add"


  7. LONG = <whatever yours is>, click "Add"


If you have all your devices in one location, you can save some time and make these the same across all devices. In the above screenshots, to save time I have made these "Application Environment Variables".

Optional Variables

The following variables are optional. If you're not familiar with them, you can leave them and my code will assign defaults.
  • PPM = <value for PPM>
  • GAIN = <value for gain>
Reply With Quote
  #8  
Old 17th June 2017, 10:12 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Site Variables

The following variables are site specific. You might already have Flightaware, or Planefinder or Flightradar24 working. If so, these variables will be familar. You can simply plug in your existing variables and you're done.

If you've never sent data to any of these before, just leave everything blank and we'll come back to them.

These should be set per device. Sites often require new ID's on a per device basis. Worth noting, none of these variables should be shared with other individuals. These are uniquely yours, and yours alone. Resin.io sends these to your device securely.

Per Device Variable Setting
  1. Click on your application in Resin.io
  2. Click on the specific device you want to configure
  3. Click on "Environmental Variables" directly below "Device Summary"

[*] Set only the variables below that you know. Otherwise come back later to set once you know.

Flightaware Variables

If you have a pre-existing Flightaware device you can find these variable on you "My ADSB" on your Flightaware page once you login.
  • PIAWARE_MAC = <Your "MAC" address> - This is now deprecated and should only be used if you want to carry over old statistics.
  • PIAWARE_ID = <Your feeder id> - This is a new ID found on all new Flightaware installs.

Planefinder Variables

If you have a pre-existing Planefinder feeder, go to https://planefinder.net/sharing/account to view your receivers. Take note of these addresses. These become your variable values.
  • PF_SHARECODE = <The unique sharecode of your device starting with 5>

Flightradar24

If you have a pre-existing Flightradar24 feeder, go to https://www.flightradar24.com/account/data-sharing and take note of your sharing key. These become your variable values.
  • FR24_KEY = <Your Flightradar sharing key>

If any of these are unknown due to never submitting before, or you want to start feeding for the first time - leave the variables blank for the moment.
Reply With Quote
  #9  
Old 17th June 2017, 10:30 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Getting my code....

Okay, here comes the crux. Getting a copy of my code. Get your ssh and git ready.

You needed to have:
  1. ssh client with ssh public key created (as per video) ready
  2. git client ready

Clone my repo, push to your Resin
  1. Go to your Resin.io page.
  2. Click on Application.
  3. In top right, there is a command starting with "git remote add....". Copy this command for later.
  4. Open up a terminal window or command prompt.
  5. Optionally change to a directory you want to store the code in. Wherever it is.... remember this location!
  6. Type the following git clone command:


  7. Which would sort of look like this:

  8. Change into that directory using:
    cd resin-docker-rtlsdr

  9. Copy and paste the command you copied back in step 3 above. Press enter.
    Example:
    git remote add resin something@git.resin.io:somethingelse/yourproject.git
  10. Type the following git command:
    git push resin master
  11. If you have issues you can force it by instead typing
    git push --force resin master
  12. Wait for stuff to happen. A lot of stuff. Actually what you see happening is a complete install of everything!! The first time takes a long time, every time after that is a cinch.
  13. When you see the pretty unicorn - it's done.

What's happened?

Basically....
  1. You have copied my scripts and code to your computer
  2. You have pushed this code to your Resin
  3. Your Resin has pushed this code to your Raspberry Pi. Actually..... shortly, it will already be running Planefinder, Flightaware and Flightradar24 - with maybe some variables required.

Last edited by Glenn Stewart; 17th June 2017 at 10:53 PM.
Reply With Quote
  #10  
Old 17th June 2017, 11:17 PM
Glenn Stewart Glenn Stewart is offline
Member
 
Join Date: Apr 2008
Posts: 20
Default

Check your Device Output
  1. Go to your Resin page
  2. Click on your application
  3. Note the device and the column "IP Address" - write down this "IP Address" - we'll use it later.
  4. Click on you device
  5. Wait for status to go from "Downloading" to "Online"
  6. Continue on with the feeders as follows.


Setting up Flightaware for First time
  • Open a browser on the same network as your device (this is a requirement for the very first time only)
  • Go to https://flightaware.com/adsb/piaware/claim (requires you to login)
  • On the list, find your new, now active device. It will be obvious from the date and time and the IP Address should match what you copied above.
  • Claim the new device, although it might also be listed under "Linked PiAware Receivers". Copy the very long text id like abcdefg-1234-6789-a467-879238479283. That's your PIAWARE_ID.
  • As per instructions above insert this into your device variables as PIAWARE_ID = <the gibberish you see on your claim page as above>
  • Resin will automatically reboot your device and it will start using this ID.
  • Click on "My ADSB" and the top of Flightaware.
  • You should see a new "Site". Click on this listing.
  • Click on the cog on the right side of this window. Like this:
  • Change your "Nearest Airport"
  • Configure your "Location" using the GPS co-ordinates recorded a while ago (you can find them in Resin)
  • Configure your "Height"
  • Your done! You won't need to touch this again.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright © Sydney Airport Message Board 1997-2022
Use of this web site constitutes acceptance of the Conditions of Use and Privacy Statement