Difference between revisions of "Raspberry Pi"

From SatNOGS Wiki
(Add basic walkthrough for Raspbian/Ansible setup)
m (Fedora)
(46 intermediate revisions by 10 users not shown)
Line 1: Line 1:
= Intro =
+
{{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.}}
 +
[[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]]]
  
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:
+
== Intro ==
  
* Using Fedora for ARM, and following the instructions at [http://satnogs.readthedocs.io/en/stable/satnogs-client/doc/raspi-install.html satnogs.readthedocs.io]
+
The Raspberry Pi 3 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. Arch, Fedora), but the one we suggest is our custom image based on latest Raspbian.
* Installing the custom-built SatNOGS Raspbian image
 
  
= Fedora =
+
==  [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs/artifacts/2018080300/download?job=release <span class="glyphicon glyphicon-save"></span>Download]==
  
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].
+
You can download the latest Raspbian SatNOGS image following the links from the [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/tags latest tag on GitLab]. This image has the SatNOGS setup script installed, the SSH server enabled and all required packages preinstalled. Click on the cloud icon and then click "Download release". You will get an Artifacts.zip file:
 
 
* 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].
 
 
 
= Raspbian =
 
 
 
== Download ==
 
 
 
The latest Raspbian SatNOGS image artifacts can be downloaded from [https://gitlab.com/librespacefoundation/satnogs/satnogs-pi-gen/-/jobs GitLab].
 
  
 
=== Artifacts list ===
 
=== Artifacts list ===
Line 32: Line 24:
 
<pre>
 
<pre>
 
$ sha256sum -c sha256sums  
 
$ sha256sum -c sha256sums  
2017-09-10-Raspbian-SatNOGS-master-lite.info: OK
+
2017-09-29-Raspbian-SatNOGS-master-lite.info: OK
image_2017-09-10-Raspbian-SatNOGS-master-lite.zip: OK
+
image_2017-09-29-Raspbian-SatNOGS-master-lite.zip: OK
 
</pre>
 
</pre>
  
 
== Flashing ==
 
== Flashing ==
 +
[https://www.raspberrypi.org/documentation/installation/installing-images/README.md Follow the usual Raspbian flashing instructions], and boot your Raspberry Pi.
  
[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'''":
 +
$ ssh pi@192.168.1.2
 +
 
 +
=== 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, and [https://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi#comment98121_57023 Windows users have line ending problems]. Suggested actions:
  
== Networking ==
+
$ $EDITOR /media/Raspbian_SatNOGS-boot/wpa_supplicant.conf
  
If you are using wired Ethernet you should get connectivity right away. If you are using wireless then see [https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md this doc for network configuration instructions].
+
contents: (note key_mgmt options include NONE, WPA-PSK, WPA-EAP)
  
== Setup ==
+
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
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.
+
    update_config=1
 +
    country=US
 +
   
 +
    network={
 +
        ssid="NETWORK_NAME"
 +
        psk="password"
 +
        key_mgmt=WPA-PSK
 +
    }
  
* Note: you can always reconfigure the software by running "sudo satnogs-setup -n" again.
+
== Configuration ==
  
* Note: You may find further details about the following options on the [http://satnogs.readthedocs.io/en/stable/satnogs-client/doc/raspi-install.html satnogs.readthedocs.io] page.
+
=== Raspberry Pi 3 Setup ===
 +
Once your Raspberry Pi is booted, log in with username "'''pi'''" password "'''raspberry'''" and run:  
 +
<pre>
 +
$ sudo raspi-config
 +
</pre>
  
=== Basic setup ===
+
You will want to be sure to do the following:
  
* '''SATNOGS_API_TOKEN''': The API token assigned to your ground station on the SatNOGS Network website.
+
* Set a strong, unique password
* '''SATNOGS_NETWORK_API_URL''':  The API for the SatNOGS network site.  If you're working on the stage environment, this is https://network-dev.satnogs.org/api/; if you're working on the prod environment, this is https://network.satnogs.org/api/.
+
* Change localization settings:
* '''SATNOGS_RX_DEVICE''':  If you are using an RTL-SDR, odds are this is /dev/dvb/adapter0.
+
** by default the rpi locale is configured for EN-GB, change as appropriate (ie: to EN_US.UTF-8)
* '''SATNOTS_STATION_ELEV''':  The elevation of your ground station in metres.
+
** set timezone (we recommend UTC so your logs match the times in Network)
* '''SATNOTS_STATION_ID''':  The ID assigned to your station in the SatNOGS network site (either stage or prod).
+
** set keyboard layout, again this is defaulting to a UK layout
* '''SATNOTS_STATION_LAT''': The latitude of your station.  North is positive, south is negative.
+
** set wifi country
* '''SATNOTS_STATION_LONG''': The longitude of your station.  East is positive, west is negative.
+
** expand filesystem
* '''HAMLIB_UTILS_ROT_ENABLED''':  Whether or not to enable the Hamlibs rotator daemon.  Rotctld is a software daemon that provides a network server to control a rotator on a serial port.  '''Note:''' even if you [https://wiki.satnogs.org/No_rotator do not have a rotator], you'll want to enable this; see the next option for details.
+
* Configure network or WiFi (see [https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md this doc for network configuration instructions])
* '''HAMLIB_UTILS_ROT_OPTS''':  Options for rotcld.  '''If you don't have a rotator, set this to <code>-m 1</code>'''; see [https://community.libre.space/t/raspbian-satnogs-client-image-issues/1319/10 here] for details.
+
* Finish and reboot
  
== Updating ==
+
=== SatNOGS Setup ===
 +
SSH to the Raspberry Pi with user "'''pi'''" and your new password.
  
To update SatNOGS software, re-run <code>sudo satnogs-setup</code>. This will pull the latest Ansible playbook and update if necessary.
+
Follow [[SatNOGS_Client_Ansible#SatNOGS_Client_Setup|SatNOGS Client Setup]] instructions to configure the system.
  
Raspbian packages can be updated using the normal APT updating methods (e.g. <code>apt-get upgrade</code> or <code>aptitude</code>).
+
== Fedora ==
  
WARNING: An update can potentially interrupt a running observation!
+
Instructions for installing on Fedora can be found [[Fedora_Installation|here]].

Revision as of 11:15, 28 March 2019

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.
Libre Space Foundation Raspberry Pi Case
Libre Space Foundation Raspberry Pi Case, on thingiverse

Intro

The Raspberry Pi 3 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. Arch, Fedora), but the one we suggest is our custom image based on latest Raspbian.

Download

You can download the latest Raspbian SatNOGS image following the links from the latest tag on GitLab. This image has the SatNOGS setup script installed, the SSH server enabled and all required packages preinstalled. Click on the cloud icon and then click "Download release". You will get an Artifacts.zip file:

Artifacts list

The current artifacts list consists of:

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

Data integrity verification

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

Example:

$ sha256sum -c sha256sums 
2017-09-29-Raspbian-SatNOGS-master-lite.info: OK
image_2017-09-29-Raspbian-SatNOGS-master-lite.zip: OK

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":

$ ssh pi@192.168.1.2

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, and 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 3 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)
    • set keyboard layout, again this is defaulting to a UK layout
    • set wifi country
    • expand filesystem
  • 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.

Fedora

Instructions for installing on Fedora can be found here.