Bake a Pi

**OPTION-1: **
Piaware 3.5 image with integral dump1090-fa and 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 Piaware 3.5 image (zip) on your Desktop/Laptop and unzip downloaded file

  4. Write the unzipped Piaware 3.5 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/piaware/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. Open file “piaware-config.txt” using a text editor like Notepad.

Mac: Open the Finder program. Select the Micro SD card device labeled piaware. Open the file “piaware-config.txt”. The file will open in TextEdit.

In the opened file “piaware-config.txt”, scroll down till you see this text:

wireless-ssid MyWifiNetwork
wireless-password s3cr3t99

Replace MyWifiNetwork by your router’s wifi ssid, and s3cr3t99 by your router’s wifi password

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

First find and note down existing 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 Site Identifier, use any of the following 2 methods:
Method 1: While the microSD Card is still in Desktop/Laptop’s card reader, open file /boot/piaware-config.txt by a text editor like Notepad, and add following line at the end of file:

feeder-id 12345678-1234-1234-1234-123456789abc

(replace “12345678-1234-1234-1234-123456789abc” by Unique Identifier of your existing station)

Method 2: After booting and SSH,



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

#assign 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

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

(a) 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

2 Likes