Download the PDF file that contains the manual/guide HERE
How to install/setup:
Raspberry PI OS – Bullseye
SVXLink
USB Sound Card
Alsamixer
GPIO
Radio Interface
This guide will show
you how to setup SVXLink on a Raspberry Pi computer. This guide
assumes that you have limited knowledge of the Linux based Raspberry
Pi OS. (Click on images for larger view.)
We will install the Debian operating system to the Raspberry Pi and then the SVXLink firmware. Yes I know there are hundreds of videos and examples of how to install and setup a PI and SVXLink. I am going to explain what worked for me that resulted in a successful installation and working setup.
Please note this setup resulted in a fully working node running on a Raspberry Pi 3 (b) with Debian version: 11. (Bullseye)
To write the OS to an SD Card for the Raspberry Pi, I used a very nice and versatile piece of software called Raspberry Pi Imager. Using the imager is a simple way to image your microSD card with Raspbian, the official Raspberry Pi operating system, and other operating systems.
Note: You will need to be connected to the Internet the first time for the Raspberry Pi Imager to download the OS that you choose.
Download and install Raspberry Pi Imager to a computer with an SD card reader. Put the SD card you'll use with your Raspberry Pi into the reader and run Raspberry Pi Imager. Watch this 45-second video to learn how to install an operating system using Raspberry Pi Imager. Take note that I changed the settings of Pi Imager to include the following:
Image customization options - to always use
Enable SSH (Use Password authentication)
Set username and password - Username: pi Password: xxxxxx (you choose)
Set locale settings – Time Zone: You choose Keyboard Layout: You choose
Note: I did not configure wireless LAN as I use the Ethernet connection.
Persistant Settings
Play sound when finished
Eject media when finished
Enable telemetry
All selected.
Click Save
You are now ready to write the image to the SDCard. Ensure that you selected the correct storage (SDCard) as choosing the wrong drive will erase everthing on the drive you choose. Click on write. The image will now be written to the selected SDCard. After writing it will verified the firmware and then you will get a message that the write is completed and you can remove the SDCard.
Before continuing install the following two programs to your windows computer:
PuTTY – Used to access the Raspberry Pi
Advanced Port Scanner -Used to obtain the IP address of the Raspberry Pi
I take a shortcut route and do not install a keyboard, mouse or HDMI screen to the Raspberry Pi. Insert the Ethernet cable to the Ethernet port.
You can now insert the SDCard into the slot of the Raspberry Pi. Bootup the Pi and wait till its finished. Ensure that your Windows computer is on the same Router as the Raspberry Pi. Open the Advanced Port Scanner program and set the correct IP scanning range just below the Scan button. Leave other settings as is. Click the Scan Button. The scanning will start. Wait till the program stops scanning. Now look for the columns Manufacturer and MAC Address. Under the Manufacturer column you will see Raspberry Pi Foundation and the MAC Address next to it. To the left in the IP column will be your raspberry pi’s IP address. Write it down as you will need the address for PuTTY to access the Pi headless.
Now open PuTTY and enter the IP address in the slot named Host Name or IP Address. Leave the port setting 22 and click Open. You will be greated with a new screen asking for your Login as: and Password: Enter the Username and Password that you set in settings of the Raspberry Pi Image. Once you logged in we can now change a few settings for the Raspberry Pi. At the command prompt type:
sudo raspi-config
enter
The configuration menu will open. I only make changes to two headings. You can always later access the config menu again and make changes. The two headings are Interfaces and Localisation. I selected the following settings:
Interfaces
Select VNC
Remote GPIO or Serial depending on how you going to interface your radio.
Localisation
Change -
Set Locale
Set Timezone
Set Keyboard
Set WLAN Country
The above settings is straight forward and I am not going to go into detail here.
Click OK and the menu will close.
Now open a terminal and type:
sudo reboot
enter
This will reboot the Raspberry Pi.
It is now time to access the Pi via Real VNC client from your Windows computer.
I use “VNC Connect” by Real VNC. Once installed open the program and a VNC viewer screen will appear. Right click and select New Connection. A new window will open. Just add your Raspberry Pi IP address in the VNC Server column. Leave the other setting as is. Click OK. A new window will open asking for your Raspberry Pi Username and Password. This is the same username and password that you used in PuTTY. Click OK. Another screen either Red or Yellow will open just click OK and you will see your Raspberry Pi main screen on you Windows Computer.
But the resolution and screen size of the Pi might not be correct. Lets fix this quickly.
Set VNC resolution for the Raspberry Pi
Step 1:
sudo nano /boot/config.txt
enter
as this file needs root permission to edit we use the command sudo. Nano is used for editing.
To run the Pi headless using VNC, I changed this in the boot config file.
# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1900
framebuffer_height=1024
Step 2:
With the frame buffer set comment the following line out:
#dtoverlay=vc4-kms-v3d
Commenting out and rebooting got me full resolution via VNC. Use “ctrl+x” “y” “enter” to exit nano and save your changes. Now reboot the Pi.
sudo reboot
enter
Once rebooted it is
not a bad time to set a static IP- address for the Pi, if you so
wish. I did not setup a Static IP Address.
Set Static IP-Address (Optional)
Open a new Terminal window. We will setup a static IP- address by editing the dhcpcd.conf file. See the example near the bottom of the file. You can use "nano" editor. To save and exit the editor, press ctrl-x and answer Y to save:
sudo nano /etc/dhcpcd.conf
enter
# Example static IP configuration:
interface eth0
static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8
Enter the IP address allocated to the PI by your router under {static ip address=}
Enter your routers IP address under {static routers =}
Enter you routers IP address under {static domain_name_servers=}
Now is a good time to reboot your Raspberry.
sudo reboot
enter
Your Raspberry Pi is now ready to use once the reboot has been completed.
However it is always a good thing to keep your OS up to date. On the top right side of you Pi screen an icon will show up from time to time to inform you that there are updates for your Pi. Click on the icon and install the updates. However you can also use a terminal.
sudo apt-get update
sudo apt-get upgrade ;( Optional - You going to need a big cup of coffee for this one to finish.)
enter
Updates / Upgrades will start. Reboot once finished.
sudo reboot
enter
Congratulations you should now have a working Raspberry Pi with Bullseye (32 bit) OS installed!!
We can now install SVXLink. Open a Terminal Window. First we need to update apt and then install the SVXLink packages and server. Lets get cracking!!
Load Packages
sudo apt update
sudo apt install g++ cmake make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl-dev libgcrypt20-dev libspeex-dev libasound2-dev libopus-dev librtlsdr-dev doxygen groff alsa-utils vorbis-tools curl libcurl4-openssl-dev git rtl-sdr libcurl4-openssl-dev cmake libjsoncpp-dev
Create SVXLink user and add to groups
sudo useradd -rG audio,plugdev,gpio,dialout svxlink Download the software from Github and compile ( Note: Takes 30 - 45 min to compile) git clone http://github.com/sm0svx/svxlink.git mkdir svxlink/src/build cd svxlink/src/build cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON .. make -j4 make doc sudo make install sudo ldconfig
Download Sounds files and install
Change to directory:
cd /usr/share/svxlink/sounds/
Enter
sudo curl -LO https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases/download/18.03.1/svxlink-sounds-en_US-heather-16k-18.03.1.tar.bz2
Enter
sudo tar xvjf svxlink-sounds-en_US-heather-16k-18.03.1.tar.bz2
Enter
sudo ln -s en_US-heather-16k en_US
Note: I used 18.03.1 as the version 19.09.99.1 would not tar with tar.bz2. Important: Ensure that the download using curl downloads the sound files. It takes a least 50 seconds. If it ends after just 10 seconds you will get and error. If this happens go to cd /usr/share/svxlink/sounds/ and delete the file in the folder with sudo rm svxlink-sounds-en_US-heather-16k-18.03.1.tar.bz2 Once deleted go back to using the sudo curl -LO................... command and try the download again. I was successful on the second attempt.
That’s it you have SVXLink installed as well as the sound files.
Time now for some blacklisting:
Open a new terminal
Create a file using nano or any text editor and save in /etc/modprobe.d
cd /etc/modprobe.d
sudo nano alsa-blacklist.conf
enter
Enter the following line
blacklist snd_bcm2835
Save the file
Shutdown the machine
sudo shutdown now
enter
Switch everything OFF. It is now time to connect your USB
Soundcard dongle to one of the USB ports of the Raspberry Pi. We
need to set it as the default audio device. First we need to
configure the Raspberry Pi NOT to load Broadcom’s
Sound Chip (BCM2835)
It is now time to set the USB Sound Card as the default audio device. First we need to find the USB Sound Card device ID. Then we will edit the alsa.conf file.
Start your Raspberry Pi. with the new USB Souncard dongle fitted.
Once the Pi has booted, open a new terminal
sudo arecord -l
enter
The output in the terminal window should be:
**** List of CAPTURE Hardware Devices ****
card 0: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
open nano and edit the alsa.conf
I use nano to edit the alsa.conf file:
sudo nano /usr/share/alsa/alsa.conf
enter
Edit the lines
defaults.ctl.card and defaults.pcm.card. In my case I had to
change the number at the end of the line from “0” to “1” as
arecord listed my sound card as Card 1, Device 0 and changed it when
I removed the BCM2835 sound chip setting explained supra. Depending on the sound card you use you might not have to change anything.
default1.ctl.card 1
default.pcm.card 1
Use “ctrl + x” | “y” | “enter” to exit nano and save your changes.
Now reboot the Pi
sudo reboot
enter
After the reboot, head back to terminal and run alsamixer, verify the USB Audio device is set as the default playback/recording device. You can connect speaker/headphones to the USB Sound card and played an audio file in Chronium to verify that the audio output is working.
sudo alsamixer
enter
Once alsamixer opens press F5 to show all the volume controls. I set the Speaker / Mic / Mic (Capture slides to 19 and ensure that all three slides reflect 00. If it shows MM then just click on MM and it will go to 00. The Auto Gain Contol must be turned off (MM) muted. In my case I experienced a distortion error with the Auto Gain Control on. (00)
Now press F6 to bring up Sound Card listing and select 0 or 1 USB Audio Device depending on your card number. Mine was 1 but yours might be 0. Move to 1 or 0 and press enter to select your card.
Once selected press Esc to exit the mixer.
Now it is time to save the alsamixer settings
sudo alsactl store
enter
Next we’ll edit
the svxlink.conf file for the initial setup. It is always a good idea
to make a copy of the svxlink.conf as backup in case you want to
revert back later to the unedited file. This is optional. I did not make a backup.
sudo nano /etc/svxlink/svxlink.conf
enter
Under the [GLOBAL] section:
uncomment: “CARD_CHANNELS=1”
Under the [SimplexLogic] section:
RX=NONE (this is temporary)
CALLSIGN=YOUR CALLSIGN
DEFAULT_LANG=en_US
Under the [Rx] section:
AUDIO_DEV=also:plugw:0 ;(recall our USB Sound card was Card 0)
Under the [Tx] section:
AUDIO_DEV=also:plugw:0 ;(recall our USB Sound card was Card 0)
Save your changes and exit nano Using“ctrl + x” | “y” | “enter”
Next we need to edit the ModuleEchoLink.conf file once again using nano. It is always a good idea to make a copy of the ModuleEchoLink.conf as backup in case you want to revert back later to the unedited file. This is optional. I did not make a backup.
sudo nano /etc/svxlink/svxlink.d/ModuleEchoLink.conf
enter
Make the following changes to the ModuleEchoLink.conf file
Uncomment line 5 “Allow_IP=192.168.1.0/24“
;You may need to adjust the IP for your network subnet as used by your router
CALLSIGN=CALLSIGN
PASSWORD=ECHOLINK PASS WORD
SYSOPNAME=CALLSIGN
LOCATION=CITY, STATE
Lastly uncomment the line “DEAFULT_LANG=en_US” to set the language to English
We also need to change the SERVERS setting.
SERVERS=europe.echolink.org ;(IMPORTANT: SVXLink will not connect or allow other stations so connect with servers.echolink.org. Change the address to europe.echolink.org or an Echolink server closest to your location)
Other changes in this file relates to you station information. You can change this to suite your needs.
Save your changes and exit nano Using“ctrl + x” | “y” | “enter”
sudo reboot
enter
Next on the list is to configure the ports on your router for your router/firewall for the Raspberry Pi. Due to the wide variety of Routers I will not go into detail on how to configure the ports and firewall. You need to consult your owners manual for you specific router as well as the Echolink manual. Echolink relies on the following ports:
5198 UDP, 5199 UDP, 5200 TCP
Check open Ports
sudo lsof -i -P -n
enter
More info on the opening of ports can be found further down in this manual.
We are now ready to connect everything together to do some basic tests of the SVXLink installation.
The USB Sound Card should already be connected
Connect Power Cables to the Raspberry Pi and the Radio if you have one connected to he Pi
Optional: Connect your interface board between the radio and the Raspberry Pi if you have installed an interface board
Optional: Connect the Radio Cable from the Interface board to the radio
Open up a new Terminal window. We are going to provisionally start SVXLink with the following command. The command hereunder will only be used to test start SVXLink.
Enter in a terminal window
sudo -u svxlink svxlink
enter
If all went well you
should get a message “event handler script successfully loaded”
and SVXLink should be waiting for input or a connection. Go ahead and
tune a second transceiver if an interface and radio is connected, to
the same simplex frequency the SVXLink radio is set to. If no
interface or radio is connected you can use a set of earphones that
is plugged into the speaker socket of the USB Sound Card dongle. In
SVXLink use this command to have the server ID itself (*#). Note the command *# at this stage will not work via the radio as we must still setup the GPIO pins. You will see Tx1 Turning the transmitter On and after a few seconds Tx1 Turning the transmitter off.
*#
enter
SVXLink should key up the SVXLink Radio and you should hear the identification transmission on your second monitoring transceiver. If using headphones you should hear the ID on the phones. You may need to go back and adjust the speaker level using alsamixer. For me setting the speakers to approx 55% seems to work well.
Do the test below
only if you have and interface and radio installed. If it does not work just go ahead to the setting up the receive Rx.
Now open Echolink on your cell phone using a proxy and connect to your Echolink station. If all went well you should hear the Echolink ID the incoming connection on your monitoring transceiver. Additionally, you should be able to key up Echolink on your cell phone, transmit, and hear the transmission on your monitoring transceiver.
You now have SVXLink with the Echolink module setup and working on the transmit (TX) side of SVXLink. We still need to setup the receive (RX) side of SVXLink.
Setting up SVXLink is not difficult. Your need to be accurate in executing commands and not be in a hurry.
Now onto setting up the receiver (RX) side of SVXLink but first a few handy commands to use.
Remember that we always start and stop SVXLink the correct way.
Start and Stop SVXLink and Start and Shutdown the Raspberry PI
sudo systemctl start svxlink
sudo systemctl stop svxlink
Now I am sure you will get tired of starting svxlink manually every time. Lets fix this to allow svxlink to start automatically always after rebooting the Pi. Once you entered this command you must not start svxlink with the command: sudo -u svxlink svxlink anymore!
Select a new terminal and enter the command underneath at the command prompt
sudo systemctl enable --now svxlink
enter
sudo reboot
enter
The pi will reboot and svxlink will automatically startup after the Pi has finished rebooted.
Now let’s look at how to shutdown the Pi
Once you stopped SVXLink and you want to switch off the raspberry pi you need to shut down the Pi as prescribed. Never just pull the plug!! You have been warned.
Here is the correct way to shut-down your Raspberry Pi in a terminal window.
When using the command line or a terminal window, you can enter the following to do a clean shutdown:
sudo shutdown -h now
enter
or
sudo halt
enter
or
sudo poweroff
enter
If you use the GIU option click on the Pi emblem (left top corner) Click on Shutdown. New window will open. Click on Shutdown. The Pi will now shutdown.
Now lets shut-down SVXLink and then reboot the Raspberry Pi.
Were you successful in shutting down SVXLink and rebooting the Pi. If not, try again.
Setup the final receive (RX) side of SVXLink
We need to go back to svxlink.conf and enable RX under die Simplex section. Remember we put in None when we first edited the svxlink.conf file. We need to change the none now to Rx1.
sudo nano /etc/svxlink/svxlink.conf
enter
Under [Simplex]:
Rx=Rx1
Save the changes and exit nano using“ctrl + x” | “y” | “enter”
Go ahead and reboot the Pi
sudo reboot
enter
Once the Raspberry Pi reboot open a terminal and start svxlink as we have done before
sudo -u svxlink svxlink
enter
You might receive the following error:
Starting logic: SimplexLogic
Loading RX: Rx1
*** ERROR: Open capture audio device failed: Device or resource busy
*** ERROR: Could not open audio device for receiver “Rx1”
*** ERROR: Could not initialize RX “Rx1”
*** ERROR: Could not initialize Logic object “SimplexLogic”. Skipping…
*** ERROR: No logics available. Bailing out…
Why do you receive this error? Svxlink.service was starting when the Pi booted and already opened the Mic port on the USB Sound Card. Issuing the “sudo -u svxlink svxlink” command was starting a second svxlink processes. That’s why I earlier indicated that you must not use the “sudo -u svxlink svxlink” command once SVXLink auto starts from boot. Lets reboot the Pi.
sudo reboot
enter
Open a terminal window and lets check the svxlink service. The service should be listed as “active” in green. Here is the command to check the service.
sudo systemctl status svxlink
enter
Once you confirm that the service is “active” press “q” to quit when you are done reviewing the service status.
Now lets “tail” the svxlink log and see if the service is running and the Echolink Module is loaded.
tail -f /var/log/svxlink
enter
Use “ctrl + c” to stop the tail process.
If you’re lucky you will see the EchoLink Module load and connect to the EchoLink server:
Tue Nov 29 15:37:38 2022: SimplexLogic: Loading module "ModuleTclVoiceMail"
Tue Nov 29 15:37:38 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleTcl.so
Tue Nov 29 15:37:38 2022: Module Tcl v1.0.1 starting...
Tue Nov 29 15:37:38 2022: SimplexLogic: Event handler script successfully loaded.
Tue Nov 29 15:37:39 2022: EchoLink directory status changed to ON
Tue Nov 29 15:37:40 2022: --- EchoLink directory server message: ---
Tue Nov 29 15:37:40 2022: EchoLink Server v2.6.105
Tue Nov 29 15:37:40 2022:
Tue Nov 29 15:37:40 2022: ECHO4: Frankfurt, Germany
Tue Nov 29 15:37:40 2022:
Now you might find that you have a lot of errors relating to DNS and failed lookups for the EchoLink servers. The log would show the Pi eventually connecting to EchoLink and then disconnecting. Lets see if we can fix it by editing the svxlink.service file and adding a ‘sleep’ delay of 30 seconds resolved the issues. This will allow the Pi to complete the boot process before starting the svxlink service. Now lets stop the svxlink service.
sudo systemctl stop svxlink
enter
Now edit the svxlink.service file. Important: Change/add the BOLD lines as below. Be sure you add the ExecStartPre=/bin/sleep 30 BEFORE THE OTHER ExecStartPre lines. Else the sleep delay won’t be effective.
sudo nano /lib/systemd/system/svxlink.service
enter
[Unit]
Description=SvxLink repeater control software
Documentation=man:svxlink(1)
Requires=svxlink_gpio_setup.service
After=network.online.target remote-fs.target time.target
After=svxlink_gpio_setup.service
[Service]
EnvironmentFile=/etc/default/svxlink
PIDFile=/run/svxlink.pid
ExecStartPre=/bin/sleep 30
ExecStartPre=-/bin/touch /var/log/svxlink
ExecStartPre=-/bin/chown $RUNASUSER /var/log/svxlink
ExecStart=/bin/sh -c ‘/usr/bin/svxlink –logfile=/var/log/svxlink –config=$CFG$
ExecReload=/bin/kill -s HUP $MAINPID
Restart=on-failure
TimeoutStartSec=60
#WatchdogSec=
#NotifyAccess=main
LimitCORE=infinity
WorkingDirectory=/etc/svxlink
[Install]
WantedBy=multi-user.target
Save the changes to the file and exit nano using“ctrl + x” | “y” | “enter”.
Now reload the systemctl daemon, start the svxlink service, and reboot the Pi.
sudo systemctl daemon-reload
enter
sudo
systemctl start svxlink (Might take a while to execute)
enter
sudo systemctl status svxlink (To check if svxlink is loaded)
enter
To exit use Ctrl Z
sudo reboot
enter
After the Pi reboots. Open up the terminal again and tail the svxlink log. It should have successfully connected to EchoLink.
tail -f /var/log/svxlink
enter
pi@raspberrypi:~ $ tail -f /var/log/svxlink
Tue Nov 29 15:49:30 2022: SimplexLogic: Loading module "ModuleTclVoiceMail"
Tue Nov 29 15:49:30 2022: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleTcl.so
Tue Nov 29 15:49:30 2022: Module Tcl v1.0.1 starting...
Tue Nov 29 15:49:30 2022: SimplexLogic: Event handler script successfully loaded.
Tue Nov 29 15:49:31 2022: EchoLink directory status changed to ON
Tue Nov 29 15:49:32 2022: --- EchoLink directory server message: ---
Tue Nov 29 15:49:32 2022: EchoLink Server v2.6.105
Tue Nov 29 15:49:32 2022:
Tue Nov 29 15:49:32 2022: ECHO4: Frankfurt, Germany
Tue Nov 29 15:49:32 2022:
Tue Nov 29 16:00:00 2022: SimplexLogic: Sending long identification...
Tue Nov 29 16:00:00 2022: Playing Long voice ID
Tue Nov 29 16:00:00 2022: Tx1: Turning the transmitter ON
Tue Nov 29 16:00:06 2022: Tx1: Turning the transmitter OFF
Tue Nov 29 16:18:47 2022:
Fine tuning Alsamixer to get the best RX and TX Audio
00 = Unmuted MM = Muted
Go ahead and make some test transmissions. Make small adjustments to the speaker and mic volume level on the Pi using “alsamixer”.
I found that I got an error stating that I was over modulating - ect ect.
I had to change the settings in alsamixer. Well this did not solve anything until I noticed that the automatic gain control in alsamixer was on.
Lets fix this!
alsamixer
enter
Press F6: Select Sound Card, and choose yours from the list, the bcm2835 ALSA we disabled and should not be present. I use a USB Device and this was listed as:
USB PnP Sound Device Select and press enter
You can play around with the settings but the main culprit was the on audio gain control. The Auto Gain Control wants to be off, select the gain control and press M (or click on 00) to toggle so it displays [MM] for mute. Press Esc to exit and save the settings with:
sudo alsactl store
enter
This will store your settings until the next time you changed them.
As always when you make changes to files or the alsamixer it is a good practise to reboot the raspberry Pi.
sudo reboot
enter
After rebooting the error was no more and the audio quality both incoming and outgoing was good.
Congratulations! You have successfully installed SVXLink!
Now the fun begins. You will need to configure SVXLink to match the interface you use between the node and the radio. That’s if you going to connect an interface and radio to your node. This could be either via serial port or GPIO via the Raspberry Pi.
Raspberry Pi GPIO Configuration for Radio Interfacing using SVXLink Software
GPIO (General Purpose IO) is used to access hardware pins that are made available for example on and embedded system. Before starting to use a pin in SVXLink some setup need to be done in the operating system. With the standard distribution of SVXLink there is a pair of scripts that help with setting up and talking down the GPIO pins. The scripts are named svxlink_gpio_up and svxlink_gpio_down. The configuration file, which can be found among the other SVXLink configuration files (typically in etc/svxlink ), is called gpio.conf.
We have successfully installed the OS (Bullseye) and SVXLink and SVXLink Sounds. It is now time to setup the GPIO connection pins.
Ensure that you have the following hardware equipment connected:
Reliable Internet Connection (I use an Ethernet Connection)
Raspberry Pi 3 b
Compatible USB Sound Card
Interface between the Raspberry Pi and Radio
Some circuitry to interface PTT from 3V TTL GPIO on the Pi for your specific radio.
Preferably some “carrier-detect” (COS) output from the radio, and a 3V level shifter circuit to tell the Pi when a signal is received. (VOX type detection is possible but less reliable and not a good option if you going to connect this node to a Hub Network.)
First we need permission to access the gpio file
sudo gpasswd -a svxlink gpio
enter
Now let’s edit the gpio file
Before you make changes to the gpio.conf file, you must stop svxlink and stop the gpio setup.
sudo systemctl stop svxlink
enter
sudo systemctl stop svxlink_gpio_setup
enter
Below is an example how to configure gpio17 for PTT and gpio10 for COS in:
sudo nano /etc/svxlink/gpio.conf
enter
###############################################################################
#
# Configuration file for the SvxLink server GPIO Pins
#
###############################################################################
# GPIO system pin path
# RPi/odroid/nanopi/pine64 = /sys/class/gpio, orangpi = /sys/class/gpio_sw
GPIO_PATH=/sys/class/gpio
# Space separated list of GPIO pins that point IN and have an
# Active HIGH state (3.3v = ON, 0v = OFF)
#GPIO_IN_HIGH=""
# Space separated list of GPIO pins that point IN and have an
# Active LOW state (0v = ON, 3.3v = OFF)
# COS SETUP INTERFACE BOARD:
GPIO_IN_LOW="gpio10"
# Space separated list of GPIO pins that point OUT and have an
# Active HIGH state (3.3v = ON, 0v = OFF)
# PTT SETUP INTERFACE BOARD:
GPIO_OUT_HIGH="gpio17"
# Space separated list of GPIO pins that point OUT and have an
# Active LOW state (0v = ON, 3.3v = OFF)
#GPIO_OUT_LOW=""
# User that should own the GPIO device files
#GPIO_USER="svxlink"
# Group for the GPIO device files
#GPIO_GROUP="svxlink"
# File access mode for the GPIO device files
#GPIO_MODE="0664"
Important Note: Take specific note of the # sign in front of statements. If there are open (no #) in front of statements. You will receive errors and Svxlink will not start.
Save the gpio.conf file.
Save the changes to the file and exit nano using“ctrl + x” | “y” | “enter”.
Another file that needs to be configured for GPIO is the svxlink.conf file. Below is an example how to configure GPIO in [Tx1] and [Rx1]in:
sudo nano /etc/svxlink/svxlink.conf
enter
[Tx1]
TYPE=Local
TX_ID=T
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0
#AUDIO_DEV_KEEP_OPEN=0
LIMITER_THRESH=-6
PTT_TYPE=GPIO
PTT_PORT=/dev/ttyS0
PTT_PIN=gpio17
[Rx1]
TYPE=Local
#RX_ID=?
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0
#AUDIO_DEV_KEEP_OPEN=0
LIMITER_THRESH=-6
SQL_DET=GPIO
GPIO_SQL_PIN=gpio10
SQL_START_DELAY=100
Save the svxlink.conf file.
Save the changes to the file and exit nano using“ctrl + x” | “y” | “enter”.
Reboot svxlink (the svxlink_gpio_setup will be started automatically).
sudo reboot
enter
Ensure that SVXLink has started:
sudo systemctl status svxlink
enter
If SVXLink has not started start it with the following command:
sudo systemctl start svxlink
enter
The PTT and COS will now be active and the relevant LED’s on the interface board will be active in TX and RX.
FUNCTION RASPI PIN GPIO
PTT = 11 (real pin) 17
COS = 19 (real pin) 10
Basic SVXLink Commands
The following comments have been used supra.
How to start and stop SvxLink in Raspbian
sudo systemctl start svxlink
enter
sudo systemctl stop svxlink
enter
Monitor the system via the svxlink log
tail -f /var/log/svxlink enter
Check the Status of SVXLink
sudo systemctl status svxlink
enter
Ctrl Z (to exit)
Useful Commands:
Start and Stop SVXLink now and always after reboot
Note: This has been set. If not then you can use these commands to enable and disable SVXlink after reboot to automatically enable and disable SVXLink Only use these commands if they have never been set.
Enable
sudo systemctl enable - - now svxlink
enter
Disable
sudo systemctl disable - - now svxlink
enter
Save Alsamixer Settings
sudo alsactl store
enter
Check open Ports
sudo lsof -i -P -n
enter
The options used here are:
-i: If no IP address is specified, this option selects the listing of all network files
-P: inhibits the conversion of port numbers to port names for network files
-n: inhibits the conversion of network numbers to host names for network files
This way, it will list open ports in the Linux terminal:
But, this also shows us a lot of extra ports that the computer does not actually listen to.
You can list the listening ports by piping this output to the grep command and matching the pattern "LISTEN", like this:
sudo lsof -i -P -n | grep LISTEN
enter
This will only show the ports our computer is actively listening to and which service is using said open port.
Congratulations!! You have now installed and setup the following:
Raspberry Pi OS Firmware
SVXLink Firmware
USB Sound Card Firmware
Alsamixer Sound
GPIO Pin Setup
Interface between the Radio and Raspberry Pi
The basic installation to run SVXLink on a Raspberry Pi is now done.
The SvxLink Server is a general purpose voice services system, which when connected to a transceiver, can act as both an advanced repeater system and can also operate on a simplex channel. One could call it a radio operating system since it sits between the hardware (transceiver) and the applications (modules) and handle basic system services as well as input and output.
SvxLink is very extensible and modular. Voice services are implemented as modules which are isolated from each other. Modules can be implemented in either C++ or TCL. Examples of modules are:
Help – A help system
Parrot – Play back everything that is received
EchoLink – Connect to other EchoLink stations
DtmfRepeater – Repeater received DTMF digits
TclVoiceMail – Send voice mail to other local users
PropagationMonitor – Announce propagation warnings from dxmaps.com
SelCall – Send selective calling sequences by entering DTMF codes
Hope to hear you soon via SvxLink.
Enjoy SvxLink!!
PS/ There might be future post updates related to SVXLink. Feel free to return to the GRHub Network Blog to view them.
Recognition and References:
Contents for this manual comes from several web-sites that assisted me in getting the SVXLink Server up and running. It worked for me!
I would like to mention the following people/websites:
Raspberry Pi Site
PuTTY Site
Advanced Port Scanner Site
Real VNC Site
PacHams.com
SVXLink GitHub
Tobias Blomberg SM0SVX
Justin Wilson NP2WJ
Peter Lindquist SM5GXQ
John Pumford-Green GM4SLV
linuxhandbook.com
Curtis ZS6CMO
Pakistan Amateur Radio Society
g7smy.co.uk
Thys ZS1TBP
Various Forums – to many to mention here.
Please visit the GRHub Network Blog by clicking HERE
Compiled by Johan ZS1I
Mossel Bay
South Africa
8 February 2024