Difference between revisions of "Raspberry Pi"

From SatNOGS Wiki
(Created page with "The Raspberry Pi 3 is the reference platform for SatNOGs. As of September 2017, there are two methods of installing the SatNOGS client on a Raspberry Pi: * Using Fedora for...")
 
(Pi4 Workaround)
(81 intermediate revisions by 18 users not shown)
Line 1: Line 1:
The Raspberry Pi 3 is the reference platform for SatNOGs.  As of September 2017, there are two methods of installing the SatNOGS client on a Raspberry Pi:
+
[[File:B3342fcc865731d69e0c9d7a8b1abb887185bc13 1 531x500.jpg|alt=Libre Space Foundation Raspberry Pi Case|thumb|Libre Space Foundation Raspberry Pi Case, [https://www.thingiverse.com/thing:3233687 on thingiverse]]]
  
* Using Fedora for ARM, and following the instructions at [http://satnogs.readthedocs.io/en/stable/satnogs-client/doc/raspi-install.html satnogs.readthedocs.io]
+
==Introduction==
* Installing the custom-built SatNOGS Raspian image
 
  
== Fedora ==
+
The Raspberry Pi (version 3 and 4) is the reference platform for SatNOGS (see our [[SatNOGS Client Ansible|Ansible guide]] to install SatNOGS on other Linux machines). You can try using various distributions for this (eg. Debian/Armbian, Arch, Fedora), but the one we suggest is our custom image based on latest Raspbian.
  
Start by downloading the "Server" or "Minimal" image from the [https://arm.fedoraproject.org/ the Fedora ARM project page]. After that, follow the instructions at [http://satnogs.readthedocs.io/en/stable/satnogs-client/doc/raspi-install.html satnogs.readthedocs.io].
+
{{Message|This page assumes you have an account and a ground station registered on either network.satnogs.org or network-dev.satnogs.org. Make note of your station ID and API Key.}}
  
* If you run into anything in the instructions that is unclear, please submit an issue against [https://gitlab.com/librespacefoundation/satnogs/satnogs-docs the documentation repository].
+
==Download==
 +
'''<big>Raspbian SatNOGS Image:</big> <big>[https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs/artifacts/2020122700/download?job=release artifacts.zip]</big> '''  (Release: 2020122700)
  
== Raspian ==
+
Download the latest Raspbian SatNOGS Image from above (or via the "Download" icon on the right side of the [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/tags latest tag page on GitLab]). This image has the SatNOGS setup script installed, the SSH server enabled ( 2021-11-15 edit by PE2BZ there is no ssh file in the boot partition, this has to be added else the Pi will not be accessible by SSH)  and all required packages preinstalled. You will get an <code>artifacts.zip</code> file with the following content:
  
The latest Raspian image can be downloaded from [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs Gitlab.com].  On that page, look for the Download icon for the latest job (listed first on the page).
+
*A Zipped image file
 
+
*An Image info file
* [https://community.libre.space/t/raspbian-satnogs-client-images-available/1291 As of September 2017], the latest Raspian image can be downloaded [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs/31916682/artifacts/download here]. 
+
*A SHA256 checksum file
** This may change; if the link no longer works, check the [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs jobs page and look for a more recent image].
 
  
You will download a file named "artifacts.zip".  Unzip this to a convenient place.
+
===Data integrity verification===
  
You should verify the contents of that file by checking the SHA256 checksum. On Linux, run "sha256sum -c sha256sums" like so:
+
You should verify the data integrity of the artifacts by comparing the SHA256 checksums. On Linux, run <code>sha256sum -c sha256sums</code> in the directory where the artifacts are downloaded and unzipped.
  
 +
Example:
 
<pre>
 
<pre>
/tmp $ cp ~/Downloads/artifacts.zip .
+
$ sha256sum -c sha256sums  
/tmp $ unzip artifacts.zip
+
2020-12-27-Raspbian-SatNOGS-master-lite.info: OK
Archive:  artifacts.zip
+
image_2020-12-27-Raspbian-SatNOGS-master-lite.zip: OK
  inflating: deploy/2017-09-10-Raspbian-SatNOGS-master-lite.info 
 
  inflating: deploy/image_2017-09-10-Raspbian-SatNOGS-master-lite.zip 
 
  inflating: deploy/sha256sums     
 
/tmp $ cd deploy/
 
/tmp/deploy $ ls -l
 
total 637892
 
-rw-r--r--. 1 aardvark aardvark    116696 Sep 10 00:59 2017-09-10-Raspbian-SatNOGS-master-lite.info
 
-rw-r--r--. 1 aardvark aardvark 653075512 Sep 10 00:59 image_2017-09-10-Raspbian-SatNOGS-master-lite.zip
 
-rw-r--r--. 1 aardvark aardvark      227 Sep 10 01:06 sha256sums
 
/tmp/deploy $ sha256sum -c sha256sums  
 
2017-09-10-Raspbian-SatNOGS-master-lite.info: OK
 
image_2017-09-10-Raspbian-SatNOGS-master-lite.zip: OK
 
 
</pre>
 
</pre>
  
Unzip the image zipfile that was contained in the artifacts zipfile. (In the example above, it is named "image_2017-09-10-Raspbian-SatNOGS-master-lite.zip".)  Within that, you'll find the image file that needs to be installed to an SD card:
+
===Pi4 Workaround===
 +
 
 +
With newer Pi4 models there where missing firmware files in the image, for now we have created a temporary solution.
 +
The updated image can be downloaded via the following [https://cloud.libre.space/s/4cfcK6H4joCdyCm link]
 +
 
 +
Data integrity information:
  
 
<pre>
 
<pre>
/tmp/deploy $ unzip image_2017-09-10-Raspbian-SatNOGS-master-lite.zip
+
md5: 5128e134554ef32aa7eb31267305b302
Archive: image_2017-09-10-Raspbian-SatNOGS-master-lite.zip
+
sha256: c769ead89686f6b232a79f23637dedec018aa73982ec31e387e61d4d60029d52
  inflating: 2017-09-10-Raspbian-SatNOGS-master-lite.img 
 
 
</pre>
 
</pre>
  
[https://www.raspberrypi.org/documentation/installation/installing-images/README.md Follow the usual Raspian flashing instructions], and boot your Raspberry Pi.
 
  
SSH to the Raspberry Pi with user "pi" and password "raspberry" (no quotes).  Run "sudo satnogs-setup" to set basic configuration. When it's done, the Raspberry Pi will reconfigure itself; this may take some time.
+
==Flashing==
 +
[https://www.raspberrypi.org/documentation/installation/installing-images/README.md Follow the usual Raspbian flashing instructions], and boot your Raspberry Pi.
 +
 
 +
==Getting console access==
 +
You can log in the Raspberry Pi by connecting it to a keyboard and monitor or through network via an SSH connection.
 +
 
 +
===Keyboard and monitor===
 +
Once your Raspberry Pi is booted, log in with username "'''pi'''" password "'''raspberry'''".
 +
 
 +
===Ethernet===
 +
If you are using wired Ethernet you should get connectivity right away. You just need to find the IP address of Raspberry Pi (e.g. in your router management interface). Log in with SSH using username "'''pi'''" password "'''raspberry'''", for example:
 +
$ ssh pi@192.168.1.2
 +
If your network supports [[wikipedia:Zero-configuration_networking|<code>zeroconf</code>]], then you can use the hostname of your Pi:
 +
$ ssh pi@raspberrypi.local
 +
 
 +
===Pre-boot wireless configuration===
 +
If neither keyboard/monitor, nor a wired Ethernet are available, you can set up a WiFi connection before boot by mounting the boot partition of the flashed SD card and editing files directly. Note your OS may mount boot partition in a different location. [https://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi#comment98121_57023 Windows users have line ending problems]. Suggested actions:
 +
 
 +
$ $EDITOR /media/Raspbian_SatNOGS-boot/wpa_supplicant.conf
 +
 
 +
contents: (note key_mgmt options include NONE, WPA-PSK, WPA-EAP)
 +
 
 +
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 +
    update_config=1
 +
    country=US
 +
   
 +
    network={
 +
        ssid="NETWORK_NAME"
 +
        psk="password"
 +
        key_mgmt=WPA-PSK
 +
    }
 +
 
 +
==Configuration==
 +
 
 +
===Raspberry Pi Setup===
 +
Once your Raspberry Pi is booted, log in with username "'''pi'''" password "'''raspberry'''" and run:
 +
<pre>
 +
$ sudo raspi-config
 +
</pre>
 +
 
 +
You will want to be sure to do the following:
 +
 
 +
*Set a strong, unique password
 +
*Change localization settings:
 +
**by default the rpi locale is configured for EN-GB, change as appropriate (ie: to EN_US.UTF-8)
 +
**set timezone (we recommend UTC so your logs match the times in Network; UTC is under the 'none of the above' submenu)
 +
**set keyboard layout, again this is defaulting to a UK layout
 +
**set wifi country
 +
**expand filesystem (under the Advanced menu)
 +
*Configure network or WiFi (see [https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md this doc for network configuration instructions])
 +
*Finish and reboot
 +
 
 +
===SatNOGS Setup===
 +
SSH to the Raspberry Pi with user "'''pi'''" and your new password.
 +
 
 +
Follow [[SatNOGS Client Setup]] instructions to configure the system.
  
* Note: you can always reconfigure the software by running "sudo satnogs-setup -n" again.
+
[[Category:Build]]
 +
[[Category:Software]]

Revision as of 09:31, 6 April 2022

Libre Space Foundation Raspberry Pi Case
Libre Space Foundation Raspberry Pi Case, on thingiverse

Introduction

The Raspberry Pi (version 3 and 4) is the reference platform for SatNOGS (see our Ansible guide to install SatNOGS on other Linux machines). You can try using various distributions for this (eg. Debian/Armbian, Arch, Fedora), but the one we suggest is our custom image based on latest Raspbian.

Idea.png
This page assumes you have an account and a ground station registered on either network.satnogs.org or network-dev.satnogs.org. Make note of your station ID and API Key.

Download

Raspbian SatNOGS Image: artifacts.zip (Release: 2020122700)

Download the latest Raspbian SatNOGS Image from above (or via the "Download" icon on the right side of the latest tag page on GitLab). This image has the SatNOGS setup script installed, the SSH server enabled ( 2021-11-15 edit by PE2BZ there is no ssh file in the boot partition, this has to be added else the Pi will not be accessible by SSH) and all required packages preinstalled. You will get an artifacts.zip file with the following content:

  • A Zipped image file
  • An Image info file
  • A SHA256 checksum file

Data integrity verification

You should verify the data integrity of the artifacts by comparing the SHA256 checksums. On Linux, run sha256sum -c sha256sums in the directory where the artifacts are downloaded and unzipped.

Example:

$ sha256sum -c sha256sums 
2020-12-27-Raspbian-SatNOGS-master-lite.info: OK
image_2020-12-27-Raspbian-SatNOGS-master-lite.zip: OK

Pi4 Workaround

With newer Pi4 models there where missing firmware files in the image, for now we have created a temporary solution. The updated image can be downloaded via the following link

Data integrity information:

md5: 5128e134554ef32aa7eb31267305b302
sha256: c769ead89686f6b232a79f23637dedec018aa73982ec31e387e61d4d60029d52


Flashing

Follow the usual Raspbian flashing instructions, and boot your Raspberry Pi.

Getting console access

You can log in the Raspberry Pi by connecting it to a keyboard and monitor or through network via an SSH connection.

Keyboard and monitor

Once your Raspberry Pi is booted, log in with username "pi" password "raspberry".

Ethernet

If you are using wired Ethernet you should get connectivity right away. You just need to find the IP address of Raspberry Pi (e.g. in your router management interface). Log in with SSH using username "pi" password "raspberry", for example:

$ ssh pi@192.168.1.2

If your network supports zeroconf, then you can use the hostname of your Pi:

$ ssh pi@raspberrypi.local

Pre-boot wireless configuration

If neither keyboard/monitor, nor a wired Ethernet are available, you can set up a WiFi connection before boot by mounting the boot partition of the flashed SD card and editing files directly. Note your OS may mount boot partition in a different location. Windows users have line ending problems. Suggested actions:

$ $EDITOR /media/Raspbian_SatNOGS-boot/wpa_supplicant.conf

contents: (note key_mgmt options include NONE, WPA-PSK, WPA-EAP)

   ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
   update_config=1
   country=US
   
   network={
       ssid="NETWORK_NAME"
       psk="password"
       key_mgmt=WPA-PSK
   }

Configuration

Raspberry Pi Setup

Once your Raspberry Pi is booted, log in with username "pi" password "raspberry" and run:

$ sudo raspi-config

You will want to be sure to do the following:

  • Set a strong, unique password
  • Change localization settings:
    • by default the rpi locale is configured for EN-GB, change as appropriate (ie: to EN_US.UTF-8)
    • set timezone (we recommend UTC so your logs match the times in Network; UTC is under the 'none of the above' submenu)
    • set keyboard layout, again this is defaulting to a UK layout
    • set wifi country
    • expand filesystem (under the Advanced menu)
  • Configure network or WiFi (see this doc for network configuration instructions)
  • Finish and reboot

SatNOGS Setup

SSH to the Raspberry Pi with user "pi" and your new password.

Follow SatNOGS Client Setup instructions to configure the system.