November 29, 2022

Starting Zello with VOX enabled on Linux

2014-08-09

[widget id=”text-13″]

Are you running a RoIP gateway on Zello, or would like to? If the answer is yes, this article is for you.

I don’t use Microsoft Windows (a boycott) so I’m using Ubuntu for this project, it is an easy to use Linux distribution.

I’m using windows emulation (Wine) on Linux and Zello runs fairly well. I won’t get into the details of installing Zello on Linux in this article. What I’ll show you is how I run VOX enabled on boot, how to restart Zello when it crashes using crontab and xdotools. The reasons for this are fairly obvious, you want maximum up-time without physically monitoring the server 24/7.

The first step is to setup VOX on Zello, the same way it’s done on Windows.

Now, the first problem I ran into was VOX crashing when the internet connection dropped and Zello reconnects. To solve that problem I key up every 15 minutes. That re-enables VOX. Now first of all, xdotools is a command utility to control the keyboard and therefore you will need to install xdotools.

I have the following script named zello-keyup.sh in my $HOME folder.

#000080;”>#!/bin/sh
export DISPLAY=:0
WID=
xdotool search -name zello | head -1
xdotool windowactivate $WID key –window $WID F7

The next problem I run into is Zello crashing with the Program Error message. To reboot Zello I have the following script named zello-restart.sh, that runs zello-exe.sh, zello-vox.sh and zello-channel.sh

#000080;”>#!/bin/sh
export DISPLAY=:0
VAR=
xdotool search -name "Program error" | wc -l
if [ “$VAR” -ge 1 ] ; then
WID=xdotool search -name "Program error" | head -1
xdotool windowactivate $WID key –window $WID Return &
killall -r .exe
sh ~/zello-exe.sh && sh ~/zello-vox.sh && sh ~/zello-channel.sh
fi

Now let me explain this real quick, I ran into troubles running everything from a single script, so I split things up.

The zello-exe.sh script

#000080;”>#!/bin/sh
export DISPLAY=:0
wine C:\windows\command\start.exe /Unix /home/rick/.wine/dosdevices/c:/users/Public/Desktop/Zello.lnk > /dev/null 2>&1

The zello-vox.sh script (Note: I changed the Zello Handsfree shortcut to F8 within the Zello settings, it was a self preference.)

#000080;”>#!/bin/sh
export DISPLAY=:0
sleep 30
WID=
xdotool search -name zello | head -1
xdotool windowactivate $WID key –window $WID F8

The zello-channel.sh script (Note: I’ve had troubles with this one, it often wont work on the first attempt but works on the second attempt, therefore it switches tabs and re-selects Zello on the next attempt. This only works with a one channel setup, it selects the top channel which should be the only channel.)

#000080;”>#!/bin/sh
export DISPLAY=:0
WID=
xdotool search -name zello | head -1
xdotool windowactivate $WID key –window $WID Tab+Return
xdotool key Alt+Tab

Now to put all this together, my crontab files looks like this

#000080;”>*/1 * * * * /home/rick/zello-channel.sh
*/1 * * * * /home/rick/zello-restart.sh
*/15 * * * * /home/rick/zello-keyup.sh

The Zello channel & restart scripts run every minute while the Zello keyup scripts runs every 15 minutes. This has allowed me to run an 24/7 RoIP gateway for GMRS traffic and a Police scanner using Zello.

Don’t forget to load Zello on sartup :)

[widget id=”text-13″]

Leave a Reply

%d bloggers like this: