Bake a Pi

OPTION-2:
Jessie Lite image + dump1090-fa + Piaware data feeder

  1. Insert microSD Card in your Desktop/Laptop’s card slot (or use a card reader plugged into USB Port).

  2. Format microSD Card

  3. Download Jessie Lite image (zip) on your Desktop/Laptop and unzip downloaded file

  4. Write the unzipped Jessie Lite image to microSD Card.

  5. After image is written, and microSD card is still in card reader of Desktop/Laptop, (a) Enable ssh (b) Configure WiFi

(a) To enable SSH:

Windows:
In File Explorer, double click the drive letter of microSD card. This will open the folder /boot and show lots of files and some folders. Right click in /boot folder, and create a new blank file named ssh or ssh.txt

Mac: Open terminal and give following command
$ touch /Volumes/boot/ssh

(b) To enable Wifi on first boot (if required):

Windows:
In File Explorer, double click the drive letter of microSD card. This will open the folder /boot and show lots of files and some folders. Right click in /boot folder and create a new blank file named wpa_supplicant.conf. If your Desktop/Laptop does not show file extensions, configure Windows File explorer to show file extensions. If the file has a hidden extension .txt, it will not enable wifi.

Alternatively you can create this file by giving following command in Windows command prompt console, which will create file with correct extension:
C:\Windows\System32>echo > M:\wpa_supplicant.conf
(Replace letter M by drive letter of your microSD Card in Windows)

Mac: Open terminal and give following command
$ touch /Volumes/boot/wpa_supplicant.conf
Open the Finder program. Select the Micro SD card device labeled piaware. Open the file “wpa_supplicant.conf” in TextEdit.

Windows & Mac: In the opened blank file wpa_supplicant.conf, copy paste following text:



network={
    ssid="YOUR_SSID"
    psk="YOUR_PASSWORD"
}


Replace YOUR_SSID by your router’s wifi ssid, and YOUR_PASSWORD by your router’s wifi password.
Save file. On boot, wifi login info will be automatically copied into file /etc/wpa_supplicant/wpa_supplicant.conf, enabling wifi on first boot.

  1. Remove microSD card from card reader, insert into Pi, and power up.

  2. Install Piaware 3.5.1 data feeder (add-on package install)



wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.5.1_all.deb
sudo dpkg -i piaware-repository_3.5.1_all.deb
sudo apt-get update
sudo apt-get install piaware
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes


8 ) Install dump1090-fa (add-on package install)



sudo apt-get install dump1090-fa
sudo reboot


(9) For retaining existing station number and it’s stats

First find and note down exixting station’s “Unique Identifier” which is in the format “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”. You can find it from any of these three places:

Easiest method, from your stats page: flightaware.com/adsb/stats/user/yourusername
Before re-imaging, from Pi: cat /var/log/piaware.log
Before re-imaging, from Pi: cat /var/cache/piaware/feeder_id

Once you have “Unique Identifier”, give following command after booting and SSH,



#delete the Unique Identifier in cache (which was assigned automatically at boot)
sudo rm /var/cache/piaware/feeder_id

#assign existing "Unique Identifier" by piaware-config command below
# replace “12345678-1234-1234-1234-123456789abc” by Unique Identifier of your existing station

sudo piaware-config feeder-id 12345678-1234-1234-1234-123456789abc 

#Restart piaware 
sudo systemctl restart piaware


  1. For a new station, claim your Pi by logging in to your account and go to page:
    flightaware.com/adsb/piaware/claim

11):** ADD TERRAIN LIMIT RINGS (OPTIONAL)**
Dump1090-fa can display terrain limit rings using data obtained from the website http://www.heywhatsthat.com.

list First you have to generate a panorama for your location. To do this, follow the steps in first post of the following thread:
What is the Maximum Range I can Get?

(b) Once your panorama is generated, look near the top left of your newly created panorama page. You will see URL of your panorama there. The URL will be http: // www . heywhatsthat . com/?view=XXXXXXXX where XXXXXXXX is the ID for your panorama.

See screenshot below.

(c) Use following command to download the generated panorama’s JSON file “upintheair.json” to your RPi, and save it in the folder “/usr/share/dump1090-fa/html” (replace XXXXXXXX in the command below by your panorama’s ID).



sudo wget -O /usr/share/dump1090-fa/html/upintheair.json "http://www.heywhatsthat.com/api/upintheair.json?id=XXXXXXXX&refraction=0.25&alts=3048,12192"


You can create as many rings as you want by adding elevations (in meters) at the end of URL given in the wget command above after “&alts=”, separated by commas.

10,000 ft = 3048 m
20,000 ft = 6096 m
25,000 ft = 7620 m
30,000 ft = 9144 m
40,000 ft = 12192 m

Hence if you want to add all the 5 elevation rings noted above, the string at the end of wget URL will become “&alts=3048,6096,7620,9144,12192”

To keep map un-cluttered, I have used only 2 rings in the wget command above. i.e. the 10,000 feet (3048 meters), and 40,000 feet (12192 meters).
Important:
Use altitude in meters in the wget URL above.
Do NOT use feet.

(d) Reload your browser. Clear browser cache if necessary

[/list:u]

1 Like