How to Install and Configure SvxLink on Raspberry Pi

blog

Introduction

SvxLink is a powerful and flexible software solution for building an amateur radio repeater system. This guide provides step-by-step instructions for installing SvxLink from source on a Raspberry Pi, ensuring optimal performance and customization.

Prerequisites

Before starting, ensure you have:

  • A Raspberry Pi (preferably with an SD card of at least 4GB)
  • Raspberry Pi OS Lite installed
  • SSH enabled for remote access
  • A stable internet connection
  • A connected audio interface or radio interface for testing

Step 1: Preparing the Raspberry Pi

  1. Download the latest Raspberry Pi Imager.
  2. Select Raspberry Pi OS Lite and create a bootable SD card.
  3. Configure WiFi (if needed) and enable SSH during setup.
  4. Insert the SD card into the Raspberry Pi, power it up, and find its IP address on the network.
  5. Connect via SSH using PuTTY or Terminal:
    ssh pi@your_raspberry_pi_ip
    

Step 2: Updating the System

Before installation, update the system packages:

cd ~
sudo apt update
sudo apt upgrade -y

Step 3: Installing Dependencies

Install the required libraries and tools:

sudo apt-get -yq install gcc g++ make cmake libgcrypt-dev libgsm1-dev libsigc++-2.0-dev
sudo apt-get -yq install tcl-dev libspeex-dev libasound2-dev libpopt-dev libssl-dev libopus-dev
sudo apt-get -yq install git mc libjsoncpp-dev libgpiod-dev gpiod librtlsdr-dev libogg-dev
sudo apt-get -yq install ca-certificates doxygen alsa-utils vorbis-tools curl rtl-sdr
sudo apt-get -yq install libcurl4-openssl-dev ladspa-sdk git-core

Step 4: Creating a SvxLink User

sudo useradd -rG audio,plugdev,dialout svxlink
sudo gpasswd -a svxlink gpio
sudo gpasswd -a svxlink tty

Step 5: Downloading and Building SvxLink

git clone https://github.com/sm0svx/svxlink.git
mkdir svxlink/src/build
cd svxlink/src/build

Configure the build:

cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON ..

Compile and install:

make
make doc
sudo make install
sudo ldconfig

Step 6: Installing Audio Files

Download and install the Russian and English voice packs:

wget http://ua6hjq.qrz.ru/files/svxlink-sounds-ru-16k.tgz
sudo tar xvf svxlink-sounds-ru-16k.tgz -C /
sudo chown -R svxlink:svxlink /usr/share/svxlink/sounds

Step 7: Configuring SvxLink

Edit the main configuration files:

sudo mcedit /etc/svxlink/svxlink.conf
sudo mcedit /etc/svxlink/gpio.conf

Set the default language in svxlink.conf:

DEFAULT_LANG=ru
# or
DEFAULT_LANG=en_US

Step 8: Running SvxLink

Enable and start the service:

sudo systemctl enable --now svxlink

To manually control the service:

sudo systemctl start svxlink
sudo systemctl stop svxlink
sudo systemctl restart svxlink

Check logs in real-time:

tail -f /var/log/svxlink

(Press Ctrl+C to exit)

Step 9: Updating SvxLink

To update, stop SvxLink and rebuild:

sudo systemctl stop svxlink
cd ~/svxlink/src/build
git pull
make clean
cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON ..
make
sudo make install
sudo ldconfig
sudo systemctl start svxlink

Step 10: Uninstalling SvxLink

If necessary, remove SvxLink:

sudo systemctl stop svxlink
sudo rm -rf /usr/lib/arm-linux-gnueabihf/svxlink /usr/share/svxlink /etc/svxlink
sudo rm -f /usr/sbin/svxlink* /usr/bin/svx* /usr/bin/remotetrx
sudo rm -rf /etc/systemd/system/svx*
sudo reboot

Conclusion

By following these steps, you can successfully install and configure SvxLink on a Raspberry Pi. This setup allows for efficient amateur radio repeater operation with full customization capabilities.


Social Share :