This was written for Raspbian, change for other user etc. and don't forget to change the KEY in the file!
Create a folder in your homefolder called clublog, so it will be /home/pi/clublog/ Then enter the folder
mkdir /home/pi/clublog
cd /home/pi/clublog
Download the gateway-software and unpack it:
For the older 32-bit pi's continue here, for 64-bits skip the next few instructions
wget https://clublog.org/gateway-binaries/clublog-gateway-linux_armv7.gz
gunzip clublog-gateway-linux_armv7.gz
Make the file executable (32-bits):
chmod +x clublog-gateway-linux_amd7
Rename the file to clublog-gateway (32-bits):
mv clublog-gateway-linux_armv7 clublog-gateway
For the newer 64-bit pi's, continue here, skip to "Start the gateway" for 32-bits
wget https://cdn.clublog.org/gateway-binaries/clublog-gateway-linux_arm64.gz
gunzip clublog-gateway-linux_armv64.gz
Make the file executable (64-bits):
chmod +x clublog-gateway-linux_amd64
Rename the file to clublog-gateway (64-bits):
mv clublog-gateway-linux_armv64 clublog-gateway
For both 32-bits and 64-bit, continure here Start the gateway without options to see if it works at all:
/home/pi/clublog/clublog-gateway
The output should look something like this:
G7VJR Club Log real-time upload gateway
Version linux/20191203-1023
For help on the command line arguments, try -h.
If this fails due to a glibc of the wrong version, and you are running Debian/Raspbian Stretch, update to Debian/Raspbian Buster!
Now test it with the options you need, for instance:
/home/pi/clublog/clublog-gateway -mode=listener -callsign=ChangeToYourCallSign -password=ChangeThisToYourTopSecretPassword -rate=30
The output should look similar to the following:
G7VJR Club Log real-time upload gateway
Version linux/20191203-1023
00:13:31 Initialised new database file
00:13:31 Opened database file: /home/pi/clublog/ChangeToYourCallSign.db
00:13:31 No QSOs pending (deadtime: 10s)
If this all works you can move on to automating the startup.
Create a file in /etc/systemd/system/ called clublog.service
sudo nano /etc/systemd/system/clublog.service
Add the following content to the file, where the line after "ExecStart=" should be exactly what you tested earlier! The "WorkingDirectory" is where the database will be placed, the User (pi in this example) should have write-permission in this folder. Keeping it like in the example is recommended.
[Unit]
After=network.target
Description=Clublog Gateway for PA800D
[Service]
ExecStart=/home/pi/clublog/clublog-gateway -mode=listener -callsign=ChangeToYourCallSign -password=ChangeThisToYourTopSecretPassword -rate=30
WorkingDirectory=/home/pi/clublog/
Restart=on-failure
User=pi
[Install]
WantedBy=multi-user.target
(You can exit with CTRL+X, then Y and enter)
After this you'll have to enter the folling commands, reloading the service-daemon to get it to know the service-file, enabling the clublog-service for automatic start, and starting the service.
systemctl daemon-reload
systemctl enable clublog
systemctl start clublog
After every step you'll need to authenticate, sometimes even twice! I used number 1 every time (pi user) and filed out the password.
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'clublog.service'.
Multiple identities can be used for authentication:
1. ,,, (pi)
2. root
Choose identity to authenticate as (1-2): 1
Password:
==== AUTHENTICATION COMPLETE ===
If this all goes without errors, the clublog gateway should be started. You can check the status and the last few logfiles with:
systemctl status clublog.service
The output should look something like, but will only show the "No QSOs pending" after a while.
pi@Praspberrypi:/etc/systemd/system $ systemctl status clublog.service
● clublog.service
Loaded: loaded (/etc/systemd/system/clublog.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-01-20 23:48:07 CET; 4s ago
Main PID: 8327 (clublog-gateway)
Tasks: 9 (limit: 2200)
Memory: 1.8M
CGroup: /system.slice/clublog.service
└─8327 /home/pi/clublog/clublog-gateway -mode=listener -callsign=ChangeToYourCallSign -password=ChangeThisToYourTopSecretPassword -rate=30
Jan 20 23:48:07 PI4DEC-Domotica systemd[1]: Started clublog.service.
Jan 20 23:48:07 PI4DEC-Domotica clublog-gateway[8327]: G7VJR Club Log real-time upload gateway
Jan 20 23:48:07 PI4DEC-Domotica clublog-gateway[8327]: Version linux/20191203-1023
Jan 20 23:48:07 PI4DEC-Domotica clublog-gateway[8327]: 22:48:07 Initialised new database file
Jan 20 23:48:07 PI4DEC-Domotica clublog-gateway[8327]: 22:48:07 Opened database file: /home/pi/clublog/ChangeToYourCallSign.db
Jan 20 23:48:07 PI4DEC-Domotica clublog-gateway[8327]: 22:48:07 No QSOs pending (deadtime: 10s)
All the output will be logged to the system journal (journalctl). The following command shows all the output from our clublog.service.
journalctl -u clublog
You can scroll through the logs with the PageUp and PageDown keys. You get out of the log with the Q-key (Q for Quit)
The following command only shows logs since the last reboot of the system.
journalctl -u clublog -b 0
I hope it works as good for you as it works for me!
73 PA3L
Hello. For a Raspberry Pi 5, Michael created a new executable for me. The 32 bit file did not work.
I updated the my fork of your Gist if you want to update this info. There is no obvious way to make a Pull Request of a Gist.
73, Tom NY4I