Echolink node on Raspberry Pi using SVXLink (part 2)

Echolink node on Raspberry Pi using SVXLink (part 2)

At the end of part 1 we had Tx setup and working from the Raspberry Pi to the Baofeng HT. Let’s dive in and get Rx working.
First let’s head back to our svxlink.conf and enable Rx under the [Simplex] section.

sudo nano /etc/svxlink/svxlink.conf

Under [Simplex]:
Rx=Rx1
Save the changes and exit nano using“ctrl + x” | “y” | “enter”
Go ahead and reboot the Pi

sudo reboot

Once the Pi reboots open terminal and start svxlink as we have been.

sudo -u svxlink svxlink

You should 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…

Honestly, it took me a while to figure out what was happening here. Ultimately, I discovered svxlink set itself up as a service during the installation. Therefore, 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. Not what we’re looking for. Reboot the Pi and let’s get back on track!

sudo reboot

Open terminal again and let’s check the svxlink service. You should see the service is “active”. Press “q” to quit when you are done reviewing the service status.

sudo systemctl status svxlink

Now ‘tail’ the svxlink log and see if its running. Use “ctrl + c” to stop the tail process.

tail -f /var/log/svxlink

If you’re lucky. You’ll see the EchoLink Module load and connect to the EchoLink server:
pi@NP2WJpi:/ $ tail -f /var/log/svxlink
Thu Feb 27 09:43:13 2020: Loading module “ModuleTclVoiceMail” into logic “SimplexLogic”
Thu Feb 27 09:43:13 2020: Found /usr/lib/arm-linux-gnueabihf/svxlink/ModuleTcl.so
Thu Feb 27 09:43:13 2020: Module Tcl v1.0.1 starting…
Thu Feb 27 09:43:13 2020: SimplexLogic: Event handler script successfully loaded.
Thu Feb 27 09:43:13 2020: EchoLink directory status changed to ON
Thu Feb 27 09:43:14 2020: — EchoLink directory server message: —
Thu Feb 27 09:43:14 2020: EchoLink Server v2.5.9997
Thu Feb 27 09:43:14 2020:
Thu Feb 27 09:43:14 2020: ECHO6: N.Virginia, USA

In my case I had several errors relating to DNS and failed lookups for the EchoLink servers. The log would show the Pi eventually connecting to EchoLink and then disconnecting. Making a slight edit to the svxlink.service file and adding a ‘sleep’ delay of 30 seconds resolved the issues for me. This allowed the Pi to complete the boot process before starting the svxlink service. Go head and stop the svxlink service.

sudo systemctl stop svxlink

Now edit the svxlink.service file. 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

[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
sudo systemctl start svxlink
sudo reboot

Whew… 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

pi@NP2WJpi:/ $ tail -f /var/log/svxlink
Thu Feb 27 09:43:13 2020: SimplexLogic: Event handler script successfully loaded.
Thu Feb 27 09:43:13 2020: EchoLink directory status changed to ON
Thu Feb 27 09:43:14 2020: — EchoLink directory server message: —
Thu Feb 27 09:43:14 2020: EchoLink Server v2.5.9997
Thu Feb 27 09:43:14 2020:
Thu Feb 27 09:43:14 2020: ECHO6: N.Virginia, USA
Thu Feb 27 09:43:14 2020:
Thu Feb 27 10:00:00 2020: SimplexLogic: Sending long identification…
Thu Feb 27 10:00:00 2020: Tx1: Turning the transmitter ON
Thu Feb 27 10:00:06 2020: Tx1: Turning the transmitter OFF

Go ahead and make some test transmissions. Make small adjustments to the speaker and mic volume level on the Pi using “alsamixer”. On the Baofeng you’ll likely need to adjust the volume knob and possibly the VOX and SQL settings.

Coming up in part 3. We’ll tackle some configuration details including identification settings, timeout value, and maximum number of connected users.

Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *