Ubuntu - Client Installation
This guide will enable you to install SatNOGS client on an Ubuntu 20.04 environment. It has been tested on PC, laptop, and Virtual Machines, all with success. Information is currently being added and announcement will be made when complete. It has been broken down into logical steps that will help allow for any troubleshooting should it be required.
Don't let the long contents fool you. It's not a complicated process and in fact be a great way for new SatNOGS users to experience SatNOGS from their own PC or laptop.
Contents
- 1 Installing SatNOGS on Ubuntu 20.04 - PC
- 1.1 Installation information for gr-satnogs on Ubuntu 20.04
- 1.2 Installation information for Soapy SDR and Device on Ubuntu 20.04
- 1.3 Installation information for gr-soapy on Ubuntu 20.04
- 1.4 Installation information for satnogs-flowgraphs on Ubuntu 20.04
- 1.5 Configuration information for SatNOGS user on Ubuntu 20.04
- 1.6 Configure SatNOGS Client (yes, it's a little different) on Ubuntu 20.04
- 1.7 Configure System Services
- 1.8 Device Blacklisting
Installing SatNOGS on Ubuntu 20.04 - PC
Installation information for gr-satnogs on Ubuntu 20.04
Do not add any repo for GNU Radio. It is not the required version and will cause errors.
sudo apt-get update sudo apt-get upgrade -y
sudo apt-get --purge remove snapd -y
Install required software packages
sudo apt install -y \ libboost-dev \ libitpp-dev \ libboost-date-time-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ libboost-system-dev \ libboost-thread-dev \ libboost-regex-dev \ libboost-test-dev \ swig \ cmake \ build-essential \ pkg-config \ gnuradio-dev \ libconfig++-dev \ libgmp-dev \ liborc-0.4-0 \ liborc-0.4-dev \ liborc-0.4-dev-bin \ nlohmann-json3-dev \ libpng++-dev \ libvorbis-dev \ git \ libusb-1.0-0
Install from source
cd ~ git clone https://gitlab.com/librespacefoundation/satnogs/gr-satnogs.git cd gr-satnogs mkdir build cd build cmake .. make sudo make install cd ~
If you get an error stating: server certificate verification failed. CAfile: none CRLfile: none, then use this git command instead to skip verification.
GIT_SSL_NO_VERIFY=true git clone https://gitlab.com/librespacefoundation/satnogs/gr-satnogs.git
If this is the first time you are building the gr-satnogs module, run:
sudo ldconfig
Installation information for Soapy SDR and Device on Ubuntu 20.04
Install required software packages
sudo apt-get update sudo apt-get install rtl-sdr librtlsdr-dev -y
sudo apt-get install soapysdr-tools python3-soapysdr libsoapysdr-dev -y
Installation information for gr-soapy on Ubuntu 20.04
Install from source
cd ~ git clone https://gitlab.com/librespacefoundation/gr-soapy cd gr-soapy mkdir build cd build cmake .. make sudo make install sudo ldconfig cd ~
Installation information for satnogs-flowgraphs on Ubuntu 20.04
Set & configure PYTHONPATH environment setting
Edit bashrc
sudo nano ~/.bashrc
Add the following to your .bashrc. This will make sure that every time you login the variable will be set.
export PYTHONPATH=/usr/local/lib/python3/dist-packages
If you do not re-login after adding to .bashrc then run the following (same) command in the current session.
export PYTHONPATH=/usr/local/lib/python3/dist-packages
Installation from source
cd ~ git clone https://gitlab.com/librespacefoundation/satnogs/satnogs-flowgraphs.git cd satnogs-flowgraphs mkdir build cd build cmake .. make sudo make install
Configuration information for SatNOGS user on Ubuntu 20.04
Add SatNOGS user
sudo useradd -c "SatNOGS-client" -d /var/lib/satnogs -G plugdev,dialout -m -s /bin/false satnogs
Create the satnogs python virtual environent
Install the required packages.
sudo apt-get install python3.8-venv virtualenv python3-pip -y
Next
sudo -H -u satnogs virtualenv --system-site-packages --python python3 /var/lib/satnogs
Start a SatNOGS user bash and activate the virual environment
sudo -H -u satnogs bash source /var/lib/satnogs/bin/activate pip install satnogs-client pip install gps
Exit the bash
exit
cd /tmp sudo mkdir -p .satnogs/data/incomplete sudo chown -R satnogs:satnogs .satnogs
Configure SatNOGS Client (yes, it's a little different) on Ubuntu 20.04
Create the satnogs-client environment file, make sure the PYTHONPATH is also in there (this is not normally done).
We're using nano (installed on Ubuntu 20.04 by default, though you can also use vi)
sudo nano /etc/default/satnogs-client
Here you will need to add your station information. The setup command does not run to configure this through an interface.
PYTHONPATH=/usr/local/lib/python3/dist-packages SATNOGS_API_TOKEN="" SATNOGS_STATION_ID="" SATNOGS_STATION_LAT="" SATNOGS_STATION_LON="" SATNOGS_STATION_ELEV="" SATNOGS_SOAPY_RX_DEVICE="driver="" SATNOGS_RF_GAIN="" SATNOGS_RX_SAMP_RATE="" SATNOGS_ANTENNA="" UDP_DUMP_HOST="127.0.0.1"
Configure System Services
Create systemd service file on Ubuntu 20.04
Create file using nano (you can use vi)
sudo nano /etc/systemd/system/satnogs-client.service
Now add the following:
[Unit] Description=SatNOGS client
[Service] EnvironmentFile=-/etc/default/satnogs-client ExecStart=/var/lib/satnogs/bin/satnogs-client Restart=on-failure User=satnogs Group=satnogs
[Install] WantedBy=multi-user.target
hamlib, rigctld and rotctld
There is also a dependency with hamlib, rigctld and rotctld, so we also need to add its environment file and the systemd services file.
Install hamlib-utils
sudo apt-get install python3-libhamlib2 libhamlib-utils
Edit hamlib-utils
sudo nano /etc/default/hamlib-utils
Add the following:
ROT_OPTS="" RIG_OPTS="-T 127.0.0.1 -m 1"
Edit rigctld.service
sudo nano /etc/systemd/system/rigctld.service
Add the following:
[Unit] Description=rigctld server [Service] EnvironmentFile=-/etc/default/hamlib-utils ExecStart=/usr/bin/rigctld $RIG_OPTS Restart=on-failure User=satnogs Group=satnogs [Install] WantedBy=multi-user.target
Edit rotctld.service
sudo nano /etc/systemd/system/rotctld.service
Edit rotctld.service
[Unit] Description=rotctld server
[Service] EnvironmentFile=-/etc/default/hamlib-utils ExecStart=/usr/bin/rotctld $ROT_OPTS Restart=on-failure User=satnogs Group=satnogs
[Install] WantedBy=multi-user.target
Reload systemd daemon
After the above is complete, you must reload the systemd daemon so it will use the newly created services.
Execute the following:
sudo systemctl daemon-reload
Now we can enable and start rigctld, rotctld and finally when all the /etc/default/satnogs-client variables are set, the satnogs-client.
sudo systemctl enable rigctld.service sudo systemctl start rigctld.service sudo systemctl status rigctld.service
sudo systemctl enable rotctld.service sudo systemctl start rotctld.service sudo systemctl status rotctld.service
sudo systemctl enable satnogs-client.service sudo systemctl start satnogs-client.service sudo systemctl status satnogs-client.service
If you want to see log information you can use the following commands:
sudo journalctl -f -u rigctld -n 512 sudo journalctl -f -u rotctld -n 512 sudo journalctl -f -u satnogs-client -n 512
Device Blacklisting
code goes here