raspberrypi
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| raspberrypi [2018/12/06 21:05] – created 91.177.234.129 | raspberrypi [2020/04/04 17:11] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== RaspberryPi ====== | ||
| - | * [[https:// | + | * [[https:// |
| - | * [[https:// | + | * [[https:// |
| - | * [[http:// | + | * [[http:// |
| - | =====Install Raspbian using img file===== | + | * [[https:// |
| + | ==== Install Raspbian using img file ==== | ||
| On a Mac, use Etcher and point it at the downloaded image file, or ... | On a Mac, use Etcher and point it at the downloaded image file, or ... | ||
| - | * Format the SD card using SDCardFormatter | + | * Format the SD card using SDCardFormatter |
| - | * Check where the SD card is mounted | + | * Check where the SD card is mounted |
| - | < | + | < |
| + | mbpi7:.ssh stuart$ df -g | ||
| + | Filesystem | ||
| + | / | ||
| + | devfs 0 | ||
| + | / | ||
| + | map -hosts | ||
| + | map auto_home | ||
| + | / | ||
| + | </ | ||
| We see here it is mounted on / | We see here it is mounted on / | ||
| - | * Unmount the SD card using Disk Utility or | + | * Unmount the SD card using Disk Utility or |
| - | < | + | < |
| - | * Copy the image file to the SD card | + | sudo umount / |
| - | < | + | </ |
| + | * Copy the image file to the SD card | ||
| + | < | ||
| + | sudo dd if=../ | ||
| + | </ | ||
| - | =====Backup your Raspberry Pi SD card to an image file===== | + | ==== Backup your Raspberry Pi SD card to an image file ==== |
| - | After the OS is installed, up to date, upgraded and just how you want it, keep a copy to save time if it crashes<br /> | + | After the OS is installed, up to date, upgraded and just how you want it, keep a copy to save time if it crashes\\ |
| First find out the name of the Pi's disk | First find out the name of the Pi's disk | ||
| - | < | + | < |
| + | diskutil list | ||
| + | </ | ||
| Do the copy | Do the copy | ||
| - | < | + | < |
| - | For the geeks, kill -29 makes dd report its status to stderr<br /> | + | sudo dd bs=1m if=/ |
| + | </ | ||
| + | For the geeks, kill -29 makes dd report its status to stderr\\ | ||
| - | =====Enable remote SSH access===== | + | ==== Enable remote SSH access ==== |
| Either: | Either: | ||
| - | * mount the sd card on another computer and create an empty file named ' | + | * mount the sd card on another computer and create an empty file named ' |
| - | < | + | < |
| + | sudo systemctl enable ssh | ||
| + | sudo systemctl start ssh | ||
| + | </ | ||
| - | =====How to install a Raspberry Pi SMS Server===== | + | ==== How to install a Raspberry Pi SMS Server ==== |
| - | ====Send text messages via a 3G GSM modem from your applications==== | + | === Send text messages via a 3G GSM modem from your applications === |
| - | * [[https:// | + | * [[https:// |
| - | * [[https:// | + | * [[https:// |
| - | * [[http:// | + | * [[http:// |
| - | ====Use Pushbullet - no cost option==== | + | === Use Pushbullet - no cost option === |
| - | * [[https:// | + | * [[https:// |
| - | =====Autoboot the wlan0 wireless lan interface on Raspberry Pi===== | + | ==== Autoboot the wlan0 wireless lan interface on Raspberry Pi ==== |
| - | < | + | < |
| + | root@raspberrypi:/# | ||
| + | auto lo | ||
| + | |||
| + | iface lo inet loopback | ||
| + | iface eth0 inet dhcp | ||
| + | |||
| + | - allow-hotplug wlan0 | ||
| + | - iface wlan0 inet manual | ||
| + | - wpa-roam / | ||
| + | - iface default inet dhcp | ||
| + | |||
| + | |||
| + | auto wlan0 | ||
| + | allow-hotplug wlan0 | ||
| + | iface wlan0 inet dhcp | ||
| + | wpa-ssid "< | ||
| + | wpa-psk "< | ||
| + | |||
| + | |||
| + | iface default inet dhcp | ||
| + | </ | ||
| or, for later versions... | or, for later versions... | ||
| - | < | + | < |
| - | < | + | vi / |
| + | |||
| + | allow-hotplug wlan0 | ||
| + | iface wlan0 inet manual | ||
| + | wpa-conf / | ||
| + | </ | ||
| + | < | ||
| + | vi / | ||
| + | |||
| + | ctrl_interface=DIR=/ | ||
| + | network={ | ||
| + | ssid=" | ||
| + | psk=" | ||
| + | key_mgmt=WPA-PSK | ||
| + | } | ||
| + | </ | ||
| or on later versions of Raspbian, with the card in your computer, place a file named wpa_supplicant.conf on the boot filesystem containing the WiFi network and it's password and you are done! | or on later versions of Raspbian, with the card in your computer, place a file named wpa_supplicant.conf on the boot filesystem containing the WiFi network and it's password and you are done! | ||
| - | < | + | < |
| + | vi / | ||
| + | </ | ||
| and put this info in it (adjust as necessary) | and put this info in it (adjust as necessary) | ||
| - | < | + | < |
| - | This file then gets copied at boot time to <tt>/ | + | country=BE |
| - | or, if using RetroPie...<br /> | + | ctrl_interface=DIR=/ |
| + | update_config=1 | ||
| + | |||
| + | network={ | ||
| + | ssid="< | ||
| + | psk="< | ||
| + | key_mgmt=WPA-PSK | ||
| + | } | ||
| + | </ | ||
| + | This file then gets copied at boot time to '' | ||
| + | or, if using RetroPie...\\ | ||
| With the SD card in your computer, place a file named wifikeyfile.txt on the boot filesystem containing the WiFi network and it's password and you are done! | With the SD card in your computer, place a file named wifikeyfile.txt on the boot filesystem containing the WiFi network and it's password and you are done! | ||
| - | < | + | < |
| + | vi / | ||
| + | |||
| + | ssid=" | ||
| + | psk=" | ||
| + | </ | ||
| + | |||
| + | ==== Mount an NFS share ==== | ||
| + | * Ready made tutorial [[http:// | ||
| + | ==== What version of Raspbian do I have? ==== | ||
| + | < | ||
| + | lsb_release -a | ||
| + | </ | ||
| + | or | ||
| + | < | ||
| + | cat / | ||
| + | </ | ||
| + | ==== Assign a fixed IP address (Stretch) ==== | ||
| + | It is actually a lot simpler now to assign a fixed IP. As root, | ||
| + | < | ||
| + | vi / | ||
| + | </ | ||
| + | Add this to the bottom of the file | ||
| + | < | ||
| + | |||
| + | interface eth0 | ||
| + | static ip_address=192.168.1.13/ | ||
| + | static routers=192.168.1.1 | ||
| + | #static domain_name_servers=192.168.1.1 | ||
| + | |||
| + | </ | ||
| + | and restart.\\ | ||
| + | Uncomment the domain_name_servers line if you don't want to use the dns server supplied by the gateway (router) | ||
| - | =====Mount an NFS share===== | + | ==== Assign a fixed IP address (to the wireless adapter in the case) ==== |
| - | * Ready made tutorial [[http:// | + | |
| - | =====Assign a fixed IP address (to the wireless adapter in the case)===== | + | |
| Get the current IP address and other info | Get the current IP address and other info | ||
| - | < | + | < |
| + | ifconfig -a | ||
| + | </ | ||
| We're interested in these bits: | We're interested in these bits: | ||
| - | < | + | < |
| + | wlan0 | ||
| + | inet addr: | ||
| + | |||
| + | </ | ||
| Get the router/ | Get the router/ | ||
| - | < | + | < |
| + | netstat -rn | ||
| + | </ | ||
| We're interested in these bits: | We're interested in these bits: | ||
| - | < | + | < |
| + | Kernel IP routing table | ||
| + | Destination | ||
| + | 0.0.0.0 | ||
| + | </ | ||
| Now using the above data, edit / | Now using the above data, edit / | ||
| - | < | + | < |
| + | address 192.168.1.100 | ||
| + | netmask 255.255.255.0 | ||
| + | network 192.168.1.0 | ||
| + | broadcast 192.168.1.255 | ||
| + | gateway 192.168.1.1 | ||
| + | </ | ||
| It should end up looking something like this: | It should end up looking something like this: | ||
| - | < | + | < |
| - | ====Restart the networking daemon==== | + | auto wlan0 |
| + | allow-hotplug wlan0 | ||
| + | iface wlan0 inet static | ||
| + | address 192.168.1.100 | ||
| + | netmask 255.255.255.0 | ||
| + | network 192.168.1.0 | ||
| + | broadcast 192.168.1.255 | ||
| + | gateway 192.168.1.1 | ||
| + | wpa-ssid "< | ||
| + | wpa-psk "< | ||
| + | </ | ||
| + | === Restart the networking daemon === | ||
| (or reboot the Pi) | (or reboot the Pi) | ||
| - | < | + | < |
| + | / | ||
| + | </ | ||
| - | =====Install an OpenVPN server===== | + | ==== Install an OpenVPN server ==== |
| - | All operations as root<br /> | + | All operations as root\\ |
| - | ====Get the Pi up-to-date==== | + | === Get the Pi up-to-date === |
| - | < | + | < |
| - | ====Install the packages==== | + | apt-get update |
| - | < | + | apt-get upgrade |
| + | apt-get autoremove | ||
| + | raspi-config | ||
| + | </ | ||
| + | === Install the packages === | ||
| + | < | ||
| + | apt-get install openvpn openssl | ||
| + | </ | ||
| and optionally this to be able to reach the server from the internet using names instead of numbers | and optionally this to be able to reach the server from the internet using names instead of numbers | ||
| - | < | + | < |
| + | apt-get install ddclient | ||
| + | </ | ||
| and maybe other useful stuff | and maybe other useful stuff | ||
| - | < | + | < |
| + | apt-get install host shorewall telnet lighttpd | ||
| + | </ | ||
| - | ====Generate a copy of the easy-rsa structure==== | + | === Generate a copy of the easy-rsa structure === |
| - | < | + | < |
| - | ====Modify the easy-rsa location==== | + | cd / |
| - | < | + | cp -r / |
| - | ====Link correct binary==== | + | </ |
| - | < | + | === Modify the easy-rsa location === |
| - | ====Generate certificate authority files==== | + | < |
| - | < | + | cd easy-rsa |
| + | vi vars | ||
| + | Change | ||
| + | - export EASY_RSA=" | ||
| + | export EASY_RSA="/ | ||
| + | . ./vars | ||
| + | ./ | ||
| + | </ | ||
| + | === Link correct binary === | ||
| + | < | ||
| + | ln -s openssl-1.0.0.cnf openssl.cnf | ||
| + | </ | ||
| + | === Generate certificate authority files === | ||
| + | < | ||
| + | ./build-ca ca | ||
| + | </ | ||
| This creates 4 files in the keys subdirectory... | This creates 4 files in the keys subdirectory... | ||
| - | < | + | < |
| + | -rw-r--r-- 1 root root 1383 Feb 2 12:02 ca.crt | ||
| + | -rw------- 1 root root 916 Feb 2 12:02 ca.key | ||
| + | -rw-r--r-- 1 root root 0 Feb 2 12:02 index.txt | ||
| + | -rw-r--r-- 1 root root 3 Feb 2 12:02 serial | ||
| + | </ | ||
| - | ====Generate the server key files==== | + | === Generate the server key files === |
| just hit ENTER for the password but sign and commit the certificate when asked | just hit ENTER for the password but sign and commit the certificate when asked | ||
| - | < | + | < |
| + | ./ | ||
| + | </ | ||
| keys subdirectory now looks like this | keys subdirectory now looks like this | ||
| - | < | + | < |
| + | -rw-r--r-- 1 root root 4129 Feb 2 12:03 01.pem | ||
| + | -rw-r--r-- 1 root root 1383 Feb 2 12:02 ca.crt | ||
| + | -rw------- 1 root root 916 Feb 2 12:02 ca.key | ||
| + | -rw-r--r-- 1 root root 4129 Feb 2 12:03 home_server.crt | ||
| + | -rw-r--r-- 1 root root 737 Feb 2 12:03 home_server.csr | ||
| + | -rw------- 1 root root 916 Feb 2 12:03 home_server.key | ||
| + | -rw-r--r-- 1 root root 141 Feb 2 12:03 index.txt | ||
| + | -rw-r--r-- 1 root root 21 Feb 2 12:03 index.txt.attr | ||
| + | -rw-r--r-- 1 root root 0 Feb 2 12:02 index.txt.old | ||
| + | -rw-r--r-- 1 root root 3 Feb 2 12:03 serial | ||
| + | -rw-r--r-- 1 root root 3 Feb 2 12:02 serial.old | ||
| + | </ | ||
| - | ====Generate the client keys==== | + | === Generate the client keys === |
| just hit ENTER for the password but sign and commit the certificate when asked | just hit ENTER for the password but sign and commit the certificate when asked | ||
| - | < | + | < |
| + | ./build-key home_client1 | ||
| + | </ | ||
| keys subdirectory now looks like this | keys subdirectory now looks like this | ||
| - | < | + | < |
| + | -rw-r--r-- 1 root root 4129 Feb 2 12:03 01.pem | ||
| + | -rw-r--r-- 1 root root 4012 Feb 2 12:04 02.pem | ||
| + | -rw-r--r-- 1 root root 1383 Feb 2 12:02 ca.crt | ||
| + | -rw------- 1 root root 916 Feb 2 12:02 ca.key | ||
| + | -rw-r--r-- 1 root root 4012 Feb 2 12:04 home_client1.crt | ||
| + | -rw-r--r-- 1 root root 737 Feb 2 12:04 home_client1.csr | ||
| + | -rw------- 1 root root 916 Feb 2 12:04 home_client1.key | ||
| + | -rw-r--r-- 1 root root 4129 Feb 2 12:03 home_server.crt | ||
| + | -rw-r--r-- 1 root root 737 Feb 2 12:03 home_server.csr | ||
| + | -rw------- 1 root root 916 Feb 2 12:03 home_server.key | ||
| + | -rw-r--r-- 1 root root 283 Feb 2 12:04 index.txt | ||
| + | -rw-r--r-- 1 root root 21 Feb 2 12:04 index.txt.attr | ||
| + | -rw-r--r-- 1 root root 21 Feb 2 12:03 index.txt.attr.old | ||
| + | -rw-r--r-- 1 root root 141 Feb 2 12:03 index.txt.old | ||
| + | -rw-r--r-- 1 root root 3 Feb 2 12:04 serial | ||
| + | -rw-r--r-- 1 root root 3 Feb 2 12:03 serial.old | ||
| + | </ | ||
| - | ====Generate the Diffie-Hellman file==== | + | === Generate the Diffie-Hellman file === |
| - | < | + | < |
| + | ./ | ||
| + | </ | ||
| This gives us one extra file | This gives us one extra file | ||
| - | < | + | < |
| + | -rw-r--r-- 1 root root 245 Dec 24 13:40 dh1024.pem | ||
| + | </ | ||
| - | ====Build a server config file==== | + | === Build a server config file === |
| Copy from the examples directory... | Copy from the examples directory... | ||
| - | < | + | < |
| + | cp / | ||
| + | gunzip / | ||
| + | </ | ||
| … or | … or | ||
| - | < | + | < |
| + | cd .. | ||
| + | vi server.conf | ||
| + | </ | ||
| and paste this snippet: | and paste this snippet: | ||
| - | < | + | < |
| + | dev tun | ||
| + | proto udp | ||
| + | port 1194 | ||
| + | ca / | ||
| + | cert / | ||
| + | key / | ||
| + | dh / | ||
| + | server 10.8.0.0 255.255.255.0 | ||
| + | persist-key | ||
| + | persist-tun | ||
| + | status / | ||
| + | verb 3 | ||
| + | push " | ||
| + | push " | ||
| + | push " | ||
| + | log-append / | ||
| + | comp-lzo | ||
| + | </ | ||
| - | ====Enable IP forwarding==== | + | === Enable IP forwarding === |
| - | < | + | < |
| - | ====Allow IP forwarding across reboots==== | + | echo 1 >/ |
| - | < | + | </ |
| + | === Allow IP forwarding across reboots === | ||
| + | < | ||
| + | vi / | ||
| + | - Uncomment the next line to enable packet forwarding for IPv4 | ||
| + | net.ipv4.ip_forward=1 | ||
| + | </ | ||
| Activate the changes with | Activate the changes with | ||
| - | < | + | < |
| + | sysctl -p | ||
| + | </ | ||
| - | ====Generate and export an OpenVPN client config file==== | + | === Generate and export an OpenVPN client config file === |
| - | Use Tunnelblick (on a Mac) to generate a template client configuration file or copy/paste and modify this:<br /> | + | Use Tunnelblick (on a Mac) to generate a template client configuration file or copy/paste and modify this:\\ |
| - | If you use Viscosity, this is not necessary. You just need to fill in the blanks on its connection panel…<br /> | + | If you use Viscosity, this is not necessary. You just need to fill in the blanks on its connection panel…\\ |
| In either case you need to know where you stored the files (ca.crt, home_client1.crt and home_client1.key) generated earlier. | In either case you need to know where you stored the files (ca.crt, home_client1.crt and home_client1.key) generated earlier. | ||
| - | < | + | < |
| + | dev tun | ||
| + | client | ||
| + | proto udp | ||
| + | - remote 192.168.1.100 1194 # testing with lan address of Raspberry Pi | ||
| + | remote <public ip address> 1194 | ||
| + | resolv-retry infinite | ||
| + | nobind | ||
| + | persist-key | ||
| + | persist-tun | ||
| + | ca ca.crt | ||
| + | cert home_client1.crt | ||
| + | key homeclient1.key | ||
| + | comp-lzo | ||
| + | verb 3 | ||
| + | </ | ||
| - | ====Check IP address and interface name==== | + | === Check IP address and interface name === |
| - | < | + | < |
| - | ====Alter routing table to allow traffic to the server==== | + | ifconfig -a |
| + | </ | ||
| + | === Alter routing table to allow traffic to the server === | ||
| Copy/paste this snippet: | Copy/paste this snippet: | ||
| - | assuming wired interface and the ip address of our Pi is 192.168.1.100<br /> | + | assuming wired interface and the ip address of our Pi is 192.168.1.100\\ |
| - | Some info on iptables might come in handy at this point. See references below...<br /> | + | Some info on iptables might come in handy at this point. See references below...\\ |
| - | < | + | < |
| - | < | + | vi / |
| + | </ | ||
| + | < | ||
| + | - Generated by iptables-save v1.4.14 on Sun Feb 9 16:15:03 2014 | ||
| + | * filter | ||
| + | >INPUT ACCEPT [[121: | ||
| + | >FORWARD ACCEPT [[0:0]] | ||
| + | >OUTPUT ACCEPT [[261: | ||
| + | -A INPUT -m state --state RELATED, | ||
| + | -A INPUT -p udp -m udp --dport 1194 -j ACCEPT | ||
| + | -A INPUT -i eth0 -p udp -m udp --dport 1194 -j ACCEPT | ||
| + | -A FORWARD -o eth0 -m state --state NEW -j ACCEPT | ||
| + | -A FORWARD -m state --state RELATED, | ||
| + | -A OUTPUT -o eth0 -m state --state NEW -j ACCEPT | ||
| + | -A OUTPUT -o eth0 -p udp -m udp --dport 1194 -j ACCEPT | ||
| + | COMMIT | ||
| + | - Completed on Sun Feb 9 16:15:03 2014 | ||
| + | - Generated by iptables-save v1.4.14 on Sun Feb 9 16:15:03 2014 | ||
| + | * nat | ||
| + | > | ||
| + | >INPUT ACCEPT [[97: | ||
| + | >OUTPUT ACCEPT [[9:642]] | ||
| + | > | ||
| + | -A INPUT -i eth0 -p udp -m udp --dport 1194 -j ACCEPT | ||
| + | -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source 192.168.1.100 | ||
| + | COMMIT | ||
| + | - Completed on Sun Feb 9 16:15:03 2014 | ||
| + | </ | ||
| then edit / | then edit / | ||
| - | < | + | < |
| - | ====Start the server==== | + | pre-up iptables-restore < / |
| - | < | + | </ |
| - | Server is running, setup client.<br /> | + | === Start the server === |
| - | * Gotcha that caught me out several times…<br /> | + | < |
| + | / | ||
| + | </ | ||
| + | Server is running, setup client.\\ | ||
| + | * Gotcha that caught me out several times…\\ | ||
| If you change any of the iptables rules, you need to stop/start the OpenVPN server for it to take note of the new settings! | If you change any of the iptables rules, you need to stop/start the OpenVPN server for it to take note of the new settings! | ||
| - | < | + | < |
| + | / | ||
| + | </ | ||
| - | ====ddclient sample configuration file==== | + | === ddclient sample configuration file === |
| - | Put this in / | + | Put this in / |
| I use dnsdynamic. If you don't, you'll need to change more than is indicated below | I use dnsdynamic. If you don't, you'll need to change more than is indicated below | ||
| - | < | + | < |
| + | daemon=600 | ||
| + | syslog=yes | ||
| + | mail=root | ||
| + | mail-failure=root | ||
| + | pid=/ | ||
| + | ssl=yes | ||
| + | use=web, web=myip.dnsdynamic.com | ||
| + | server=www.dnsdynamic.org | ||
| + | login=[[your username here]] | ||
| + | password=[[your password here]] | ||
| + | server=www.dnsdynamic.org, | ||
| + | protocol=dyndns2 | ||
| + | [[your website here]] | ||
| + | </ | ||
| - | =====iptables===== | + | ==== iptables ==== |
| - | * man iptables! | + | * man iptables! |
| list open ports | list open ports | ||
| - | < | + | < |
| + | netstat -tulpn | ||
| + | </ | ||
| see if firewall is allowing access | see if firewall is allowing access | ||
| - | < | + | < |
| + | telnet <ip address> < | ||
| + | </ | ||
| list FILTER rules | list FILTER rules | ||
| - | < | + | < |
| + | iptables -L -n -v | ||
| + | </ | ||
| list NAT rules | list NAT rules | ||
| - | < | + | < |
| + | iptables -L -t nat -n -v | ||
| + | </ | ||
| list all rules in selected chain | list all rules in selected chain | ||
| - | < | + | < |
| + | iptables -S -t nat -v | ||
| + | </ | ||
| show all rules in a form to use for input | show all rules in a form to use for input | ||
| - | < | + | < |
| + | iptables-save | tee / | ||
| + | </ | ||
| bring in those rules previously saved (does not overwrite the table - just adds these rules) | bring in those rules previously saved (does not overwrite the table - just adds these rules) | ||
| - | < | + | < |
| + | iptables-restore < / | ||
| + | </ | ||
| show local routing table | show local routing table | ||
| - | < | + | < |
| + | ip route show table local | ||
| + | </ | ||
| - | ======Install both Flightradar24 and FlightAware feeders on a headless Raspberry Pi (Stretch)====== | + | ===== Install both Flightradar24 and FlightAware feeders on a headless Raspberry Pi (Stretch) ===== |
| - | Feed flight data up to flight services.<br /> | + | Feed flight data up to flight services.\\ |
| - | We can install both fr24feed and piaware and have them feeding at the same time.<br /> | + | We can install both fr24feed and piaware and have them feeding at the same time.\\ |
| At the time of writing, the Pi 3b+ is out but FlightAware does not have an image that works on it yet. So we will install its package manually. | At the time of writing, the Pi 3b+ is out but FlightAware does not have an image that works on it yet. So we will install its package manually. | ||
| - | =====Steps===== | + | ==== Steps ==== |
| - | ====Install Raspbian==== | + | === Install Raspbian === |
| - | * Very well documented already (I like [[https:// | + | * Very well documented already (I like [[https:// |
| - | ====Prepare for initial boot==== | + | === Prepare for initial boot === |
| Before installing the microsd card in the Pi | Before installing the microsd card in the Pi | ||
| - | * Enable the ssh server | + | * Enable the ssh server |
| - | < | + | < |
| - | * Assign static (wired) IP address for initial boot | + | touch /boot/ssh |
| - | < | + | </ |
| + | * Assign static (wired) IP address for initial boot | ||
| + | < | ||
| + | vi / | ||
| + | </ | ||
| Append this to the end of the line already there (modifying for your local network)... | Append this to the end of the line already there (modifying for your local network)... | ||
| - | < | + | < |
| + | | ||
| + | </ | ||
| - | ====Initial boot==== | + | === Initial boot === |
| Put the microsd card in the Pi, plug in an ethernet cable and power it up. Give it 20 seconds and login using the IP address above. | Put the microsd card in the Pi, plug in an ethernet cable and power it up. Give it 20 seconds and login using the IP address above. | ||
| - | * Login as pi/ | + | * Login as pi/ |
| - | < | + | < |
| - | * Assign static IP address in correct place | + | sudo su - |
| + | raspi-config | ||
| + | </ | ||
| + | * Assign static IP address in correct place | ||
| On Stretch, / | On Stretch, / | ||
| - | < | + | < |
| + | vi / | ||
| + | |||
| + | - Example static IP configuration: | ||
| + | interface eth0 | ||
| + | static ip_address=192.168.1.12/ | ||
| + | - static ip6_address=fd51: | ||
| + | static routers=192.168.1.1 | ||
| + | static domain_name_servers=192.168.1.13 8.8.8.8 | ||
| + | </ | ||
| Remove the IP address added to < | Remove the IP address added to < | ||
| - | < | + | < |
| - | * Install useful stuff | + | vi / |
| - | < | + | </ |
| + | * Install useful stuff | ||
| + | < | ||
| + | apt-get install -y dnsutils | ||
| + | </ | ||
| - | * Turn IPV6 off | + | * Turn IPV6 off |
| - | < | + | < |
| - | ====Install the feeder packages==== | + | sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 |
| - | < | + | </ |
| - | The web server of choice of both of these tools is lighttpd (good choice in my opinion) and it will be installed by whichever package is run first.<br /> | + | === Install the feeder packages === |
| + | < | ||
| + | apt-get update | ||
| + | apt-get upgrade | ||
| + | </ | ||
| + | The web server of choice of both of these tools is lighttpd (good choice in my opinion) and it will be installed by whichever package is run first.\\ | ||
| In order to get the local skyview website up on < | In order to get the local skyview website up on < | ||
| - | * [[https:// | + | * [[https:// |
| - | At this point, PiAware is installed, dump1090-fa is installed and lighttpd is installed. Now the DVB-T dongle needs to be connected otherwise the dump1090 software won't startup successfully.<br /> | + | At this point, PiAware is installed, dump1090-fa is installed and lighttpd is installed. Now the DVB-T dongle needs to be connected otherwise the dump1090 software won't startup successfully.\\ |
| - | If this is a reinstall of the software, you will have lost your feeder identification and you will be uploading as a guest user.<br /> | + | If this is a reinstall of the software, you will have lost your feeder identification and you will be uploading as a guest user.\\ |
| Get your feeder id from your login page on FlightAware. eg. [[https:// | Get your feeder id from your login page on FlightAware. eg. [[https:// | ||
| - | < | + | < |
| - | * Reboot to initialise everything. | + | piaware-config feeder-id 12345678-1234-1234-1234-123456789abc |
| - | * Log back in as root ( as pi, then < | + | </ |
| - | < | + | * Reboot to initialise everything. |
| + | * Log back in as root ( as pi, then < | ||
| + | < | ||
| + | systemctl status piaware | ||
| + | </ | ||
| or | or | ||
| - | < | + | < |
| + | piaware-status | ||
| + | </ | ||
| If all is running ok, install FlightRadar24. This will detect that lighttpd and a version of dump1090 are already installed and will not overwrite them. | If all is running ok, install FlightRadar24. This will detect that lighttpd and a version of dump1090 are already installed and will not overwrite them. | ||
| - | * [[https:// | + | * [[https:// |
| If you want to look at the script, download it using | If you want to look at the script, download it using | ||
| - | < | + | < |
| - | If choosing to use MLAT, [[https:// | + | wget -O install_fr24_rpi.sh http:// |
| + | </ | ||
| + | If choosing to use MLAT, [[https:// | ||
| You will need these when the < | You will need these when the < | ||
| Check the status of the components with | Check the status of the components with | ||
| - | < | + | < |
| - | or < | + | systemctl status fr24feed |
| + | </ | ||
| + | or < | ||
| + | fr24feed-status | ||
| + | </ | ||
| All done? Check out the aircraft you're capturing. Start a browser and go to port 8080 on the Raspberry Pi for snazzy PiAware stats | All done? Check out the aircraft you're capturing. Start a browser and go to port 8080 on the Raspberry Pi for snazzy PiAware stats | ||
| - | < | + | < |
| + | http:// | ||
| + | </ | ||
| or port 8754 for less snazzy but equally informative stats for FlightRadar24 | or port 8754 for less snazzy but equally informative stats for FlightRadar24 | ||
| - | < | + | < |
| + | http:// | ||
| + | </ | ||
| Next step? Maybe interrogate the ACARS message system on board? | Next step? Maybe interrogate the ACARS message system on board? | ||
| - | * [[http:// | + | * [[http:// |
| + | ==== GUIDE TO INSTALL RASPBERRY PI RADARBOX FEEDER ==== | ||
| + | * [[https:// | ||
| + | ===== References ===== | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| - | ======References====== | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[https:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | * [[http:// | ||
| - | * [[http:// | ||
raspberrypi.1544130327.txt.gz · Last modified: 2018/12/06 21:05 by 91.177.234.129
