How to crosslink Zello to Svxlink in proper way

Introduction

We going to use Zello windows version on linux and com port kernel module for fast interconnection between gateways, also we use alsa loopback modules to route audio between svxlink and zello

For distribution we use ubuntu 22.04 server minimal version, so you need manually install nano and other tools, but it is minimal system with low resources. You want to take at the vnc connection tutorial without full size xwindows.

Install needed packages

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine32 playonlinux alsa alsa-utils psmisc

Configure alsa loopback

edit files and insert:

sudo nano /etc/modprobe.d/alsaloop.conf
options snd-aloop enable=1,1,1 index=10,11,12 id=loop1,loop2,loop3

sudo nano /etc/modules-load.d/modules.conf
snd-aloop
snd-dummy

sudo usermod -a -G audio riku(yourusername)

And after reboot
dummy module is needed if not have sound card on your host, example a VPS not have.
This will create 3x loopback devices (total of 6) if you want only one(2) loop device use:
options snd-aloop enable=1 index=10 id=loop1
See notes at the end of this page.

 

Configure Xorg for headless use

I have created a tutorial on how you can configure VNC Server for VPS or headless use, please follow this link.

After doing that, you should have a VNC in use, and also blackbox, a simple window manager. If you don’t use VNC, you need to find out yourself how to configure a Linux GUI yourself.

Install svxlink

For svxlink you need compile from sources or install on packagemanager from your distribudion, here is tutorial in Finnish how to install step-by-step svxlink into /opt in userspace.

Install and configure tty0tty kernel serial loopback module

tty0tty is a kernel loopback module for serial data, you could use a file or other methood, but for best compitability and results with wine com port, you want to use this one. As we using com port signaling to key ptt between svxlink and zello gateway software, this is the lowest latency to do so.

Here is git repository of the tty0tty, compile it or install deb packgage and let that compile for you dkms package. https://github.com/lcgamboa/tty0tty

– add repository
sudo apt install tty0tty-dkms

Add module to bootup
sudo nano /etc/modules-load.d/tty0tty.conf
tty0tty

Also need to setup permissions to username
sudo usermod -a -G dialout riku(yourusername)

Reboot or write sudo modprobe tty0tty
Then ls /dev/tnt* there should be devices named /dev/tnt0 /dev/tnt1 etc.. they are paired as one port.

Installing Zello

Open your vnc and connect to host running vnc.

On terminal at your home directory download zello executable file
wget https://zello.com/data/ZelloSetup.exe

Start playonlinux and follow pictures to install zello

Click Install a program and follow instructions

Cancel Sign up wizard on zello
And close zello from “systemtray” icon, be sure you EXIT zello so installation of playonlinux wizard can continue!

You need create shortcut for ZELLO.EXE
Then click on “don’t want to make another shortcut” and NEXT

After installed, goto configure and miscellaneous tab, then add command to exec:
sleep 5 && rm /home/riku/.PlayOnLinux/wineprefix/zello/dosdevices/com1 &
sleep 6 && ln -s /dev/tnt1 /home/riku/.PlayOnLinux/wineprefix/zello/dosdevices/com1 &

This will overwrite dosdevice com port and link to tnt kernel loopback serial port, be sure you check your username right

It’s time to create a shortcut for starting zello from shell

nano zello.sh
#!/bin/bash
/usr/share/playonlinux/playonlinux –run “Zello” %F

Then chmod 755 zello.sh

After that just start it ./zello.sh and it should bring up working zello.

Configure Zello for gateway use

First we need setup a group for gateway proper use

Create group named Zello Gateway, add your channel in to the group.

Then CLOSE EXIT zello and terminal edit file nano .PlayOnLinux/wineprefix/zello/drive_c/users/riku/Application\ Data/ZelloDesktop/Zello.config

Search for SetGatewayMode and set it to true

After this Zello has enabled gateway mode

Then re-open zello with your script ./zello.sh and goto SETTINGS -> RADIO Set com port active on RX and TX.

After OK, then you should see Zello gateway working! Make sure MODE is COM and Status is WAITING, if failed then you have permission problem. (did you added dialout group? ls -ln /dev/tnt*)

Configure SVXLINK to Zello

At this point you should have installed working svxlink into /opt or somewhere else.
On this example we use /opt/svxlink directory.

Creating new logic files for ZELLO

cd /opt/svxlink/share/svxlink/events.d/
mkdir local
cd local
cp ../SimplexLogic.tcl ZELLO.tcl
 
nano /opt/svxlink/share/svxlink/events.d/local/ZELLO.tcl
CHANGE namespace:
namespace eval SimplexLogic {
to:
namespace eval ZELLO {

We need to copy the logic file into the local directory. We are not going to edit any original files, as the manual states. All changes should be done in the local directory, so we can upgrade svxlink in the future without messing around with our scripts.

Adding new logic to svxlink configuration.

nano /opt/svxlink/svxlink.conf

[GLOBAL]
LOGIC_CORE_PATH=/opt/svxlink/lib/svxlink
LOGICS=ZELLO
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000

[ZELLO]
TYPE=Simplex
RX=RxZello
TX=TxZello
CALLSIGN=ZELLO
SHORT_IDENT_INTERVAL=0
LONG_IDENT_INTERVAL=0
EVENT_HANDLER=/opt/svxlink/share/svxlink/events.tcl
DEFAULT_LANG=en_US
RGR_SOUND_DELAY=0
RGR_SOUND_ALWAYS=0
MACROS=Macros
FX_GAIN_NORMAL=-22
FX_GAIN_LOW=-22

[RxZello]
TYPE=Local
RX_ID=R
AUDIO_DEV=alsa:plughw:CARD=loop1,DEV=0
AUDIO_CHANNEL=0
LIMITER_THRESH=-6
SERIAL_PORT=/dev/tnt0
SERIAL_PIN=DSR
SQL_DET=SERIAL
SQL_START_DELAY=0
SQL_DELAY=0
SQL_HANGTIME=100
DEEMPHASIS=0
PEAK_METER=1

[TxZello]
TYPE=Local
TX_ID=T
AUDIO_DEV=alsa:plughw:CARD=loop1,DEV=1
AUDIO_CHANNEL=0
LIMITER_THRESH=-6
PTT_TYPE=SerialPin
PTT_PORT=/dev/tnt0
PTT_PIN=DTR
TX_DELAY=150
PREEMPHASIS=0

After configure you should have working interlink and FAST between Zello and svxlink.
You could use svxlink to connect (freeband cb, pmr, RHA68) via eqso server reflector or any amateur radio setup, but remember set up password incase using on ham bands.

From this point you are on your own, just use LINKS to connect logics into others. Follow svxlink documentation at this point.

Final words

Be aware if you use 3x loop devices then you have problem on wine side, as you need to lookup right device. If you not using multiple zello instances, you will change loop module setting into options snd-aloop enable=1 index=10 id=loop1 to avoid confusion.
EDIT: I found sound problems while using one loop device, so you need 2 of them,(IF USING TRANSMIT) to get working both directions. It means 4 loopback devices, abit more complicated but it is working!

 

Best 73 from OH1E / Riku