SatNOGS Client Setup

From SatNOGS Wiki
Revision as of 13:22, 2 March 2020 by Kerel+satnogs (talk | contribs) (Advanced Setup: Add link to Hamlib rotator models list)

Introduction

satnogs-setup provides a set of scripts for configuring a SatNOGS Client system. satnogs-setup main function is to bring up a menu-driven console configuration utility and provision the system using Ansible.

Initial Setup

Right after the first boot of the system, packages and the configuration tool itself must be updated. Follow the Updating instruction found below.

To configure a SatNOGS Client system:

  1. SSH into the system and run sudo satnogs-setup; this will bring up the configuration menu
  2. Set all options in Basic Configuration (see below)
  3. Select Apply and the Raspberry Pi will configure itself; this may take some time
  4. Select Back to exit
Idea.png
You can always reconfigure the software by running sudo satnogs-setup again.

Basic Configuration

Setting Description
SATNOGS_API_TOKEN The API token assigned to your ground station on the SatNOGS Network website, please don’t share your api key as this can give access to anyone to upload and change things in network related to your station and its observations.
SATNOGS_SOAPY_RX_DEVICE If you are using an RTL-SDR, this is driver=rtlsdr. See pothosware/SoapyRTLSDR/wiki#modules for other SDR modules (linked in the navigation bar at the right side of the page). If multiple devices are attached to your station you should also specify the serial of the desired device here, e.g. driver=uhd,serial=3164495.
SATNOGS_RX_SAMP_RATE Specify the receiver sampling rate. Example value for RTL-SDR: 2.048e6 (for 2Msps).
SATNOGS_STATION_ELEV The height of your ground station above sea level in metres.
SATNOGS_STATION_ID The numeric ID assigned to your station in the SatNOGS Network site when the groundstation was created.
SATNOGS_STATION_LAT The latitude of your station. North is positive, south is negative.
SATNOGS_STATION_LON The longitude of your station. East is positive, west is negative.

Advanced Setup

Important.png
Changing these settings is not recommended unless you're developing SatNOGS.

A more detailed description on setting up a development environment using the SatNOGS reference setup is given in SatNOGS_Client_Development.

NOTE: To get your station online, you need to set SATNOGS_NETWORK_API_URL to https://network.satnogs.org/api/

Setting Description
SATNOGS_RF_GAIN RF Gain value for your SDR hardware. Run SoapySDRUtil --probe to see all possible gain values for your hardware.
SATNOGS_RX_BANDWIDTH TODO
SATNOGS_ANTENNA TODO
SATNOGS_ROT_MODEL Hamlib rotator model. If you don't have a rotator (like the No rotator setup), leave it empty.

Use the macro name for your rotator model from this list of rotator models in Hamlib.

SATNOGS_ROT_BAUD Baud rate for Hamlib rotator serial port.
SATNOGS_ROT_PORT Serial port for Hamlib rotator.
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.
HAMLIB_UTILS_ROT_OPTS Options for rotcld:

For a yaesu rotator, use -m 601 -r /dev/ttyACM0 -s 9600 -T 0.0.0.0

For a SatNOGS rotator -m 204 -s 19200 -r /dev/ttyACM0 -C timeout=200 or -m 204 -s 19200 -r /dev/ttyUSB0 -C timeout=200

EXPERIMENTAL Install latest (experimental) versions of all software
APT_REPOSITORY This options allows you to change the SatNOGS packages repository. For example, to install unstable package builds use:

deb http://download.opensuse.org/repositories/home:/librespace:/satnogs-unstable/Raspbian_10 ./

APT_KEY_URL This options allows you to change the SatNOGS packages repository key URL. For example, to install unstable package builds use:

http://download.opensuse.org/repositories/home:/librespace:/satnogs-unstable/Raspbian_10/Release.key

APT_KEY_ID This options allows you to specify an alternative SatNOGS packages repository key ID.
SATNOGS_CLIENT_URL If you to try a development version of satnogs-client, you can change the URL here. The URL needs to be in PIP format. Here are some examples:
  • git+https://gitlab.com/librespacefoundation/satnogs/satnogs-client.git@master -- the 'master' branch (the current development version) of satnogs-client
  • git+https://gitlab.com/jdoe/satnogs-client.git@new-feature -- the 'new-feature' branch of jdoe's fork of satnogs-client
SATNOGS_RADIO_FLOWGRAPHS_VERSION This options allows you to change the version of satnogs-flowgraphs package to be installed. For example:

0.1-1

LOG_LEVEL Define SatNOGS client log level, available values: ERROR, WARNING, INFO and DEBUG

Obsolete Setup Variables

The following options were available in previous versions of the SatNOGS client system and have no effect on the latest stable version.

Setting Description
SATNOGS_RX_DEVICE If you are using an RTL-SDR, this is rtlsdr. Other devices supported by gr-satnogs include usrpb200, usrp2, airspy/airspymini, lime, or hackrf.
SATNOGS_PPM_ERROR
SATNOGS_IF_GAIN
SATNOGS_BB_GAIN
SATNOGS_RADIO_GR_SATNOGS_VERSION This options allows you to change the version of gr-satnogs package to be installed. For example: 1.5.1-1

Updating SatNOGS Client Software

To update SatNOGS software, including the configuration tool itself:

  1. SSH into the system and (re-)run sudo satnogs-setup; this will bring up the configuration menu
  2. Select Update to update the configuration tool and all distribution packages to the latest
  3. If you are prompt for a reboot during the upgrade, once the upgrade is finished, select Reboot, SSH back into the system and re-run satnogs-config to continue to the next step
  4. Select Apply and the Raspberry Pi will update itself; this may take some time
  5. Before exit, check at the top that you have the latest satnogs-client and gr-satnogs versions
  6. Select Back to exit

WARNING: An update can potentially interrupt a running observation!

Upgrading from Debian 'stretch' to 'buster'

Debian stretch is no longer supported. If you have already installed an older version of Debian or Raspbian SatNOGS image based on stretch (releases <= 2018080300), you must upgrade to buster otherwise it will be impossible to receive updates or upgrades in the future.

Method 1: Reflashing and reinstalling (recommended)

The recommended method to upgrade to buster is reflashing the latest Raspbian SatNOGS image (or reinstalling latest Debian). Follow Raspberry Pi installation instructions and reinstall from scratch.

Method 2: Release upgrade using the configuration tool (advanced)

Important.png
Make sure you have a stable connection to the internet and your SatNOGS client during this process. Release upgrades can consume a lot of time, data and storage.

To upgrade from stretch to buster using the configuration tool:

  1. SSH into the system
  2. Make sure you have enough free space on your SD card (>2GiB) by running df -h / on the console
  3. Run sudo satnogs-setup to bring up the configuration menu
  4. Select Update to update the configuration tool and all distribution packages to the latest; this will also prompt you for a distribution upgrade, if it detects that one is needed
  5. Keep an eye on the upgrade progress; dpkg may prompt for changes
  6. Once the upgrade is completed select Reboot
  7. After the reboot, SSH back into the system and make sure you are on the correct release by running lsb_release -a
  8. Re-run sudo satnogs-setup and select Update and then Apply; this may take some time
  9. Before exit, check at the top that you have the latest satnogs-client and gr-satnogs versions
  10. Select Back to exit

Verification of correct installation

To see if satnogs-client has started successfully, check the logs with journalctl:

$ journalctl -u satnogs-client.service

You should see entries running approximately once per minute that look like this:

Oct 01 23:02:13 raspberrypi satnogs-client[6695]: * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) Oct 01 23:02:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:02:14,466 - satnogsclient - INFO - [LD] Downlink thread waiting for first downlink packet Oct 01 23:03:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:14,450 - apscheduler.executors.default - INFO - Running job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:03:14 UTC)" (scheduled at 2017-10-01 23:03:14.423393+00:00) Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,324 - satnogsclient - DEBUG - Opening TCP socket: 127.0.0.1:5011 Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,325 - satnogsclient - DEBUG - Sending message: [] Oct 01 23:03:47 raspberrypi satnogs-client[6695]: 2017-10-01 23:03:47,327 - apscheduler.executors.default - INFO - Job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:04:14 UTC)" executed successfully Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,453 - apscheduler.executors.default - INFO - Running job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:04:14 UTC)" (scheduled at 2017-10-01 23:04:14.423393+00:00) Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,484 - apscheduler.executors.default - INFO - Running job "post_data (trigger: interval[0:02:00], next run at: 2017-10-01 23:04:14 UTC)" (scheduled at 2017-10-01 23:04:14.436367+00:00) Oct 01 23:04:14 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:14,489 - apscheduler.executors.default - INFO - Job "post_data (trigger: interval[0:02:00], next run at: 2017-10-01 23:04:14 UTC)" executed successfully Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,627 - satnogsclient - DEBUG - Opening TCP socket: 127.0.0.1:5011 Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,628 - satnogsclient - DEBUG - Sending message: [] Oct 01 23:04:15 raspberrypi satnogs-client[6695]: 2017-10-01 23:04:15,629 - apscheduler.executors.default - INFO - Job "get_jobs (trigger: interval[0:01:00], next run at: 2017-10-01 23:05:14 UTC)" executed successfully

If you see that, great -- you're ready to schedule your first observation! If not, check out the Troubleshooting page.

See also