11146644_736501906472648_3550554911153072065_o

How to link two Svxlink Repeaters

The amateur radio community has installed some Tetra repeaters in Vienna. Currently there are three repeaters active that should cover nearly the whole city. These repeaters operate in the so called DMO mode, which is actually a operation mode for direct radio to radio and radio-repeater-radio communication. Devices that support this mode are relatively cheap contrary to the TMO mode that is used in the Tetra deployments of emergency services, because the DMO mode does not need base-stations and other backend services at the cost of the lack of interconnect between the repeaters. Therefore there is no possibility to talk with people that are connected to a different repeater than you are.

We solved this by connecting the repeaters over the HAMNET network by using SvxLink nodes and USB soundcards that are connected to Tetra radios.

The three repeaters deployed in Vienna are:

  • OE1XTW – Arsenal radio tower
  • OE1XAR – Bisamberg
  • OE1X?? – Vienna, 14. district

I am member of the “A1 Amateurfunk Club” which maintains the OE1XTW repeater on the Arsenal radio tower. As I already mentioned in a previous article, we have an Echolink access to the repeater. This was set-up using a Raspberry Pi and a custom USB sound-card that has an output to activate the transmitter of the Tetra radio. The software that is used for the Echolink connectivity is SvxLink.

 

OE1XTW (picture by OE1WUW)
OE1XTW (picture by OE1WUW)

 

Tetra radio used for OE1XTW
Tetra radio used for OE1XTW
USB Soundcard used to connect to the Tetra radios
USB Soundcard used to connect to the Tetra radios
Propagation plot of OE1XTW
Propagation plot of OE1XTW

The other two repeaters had no EchoLink access until recently I built the link between OE1XTW and OE1XAR with the kind help and donation of OE1KBC (Kurt).

Our current SvxLink setup for OE1XTW used a SimplexLogic in the configuration as the uplink to the repeater is done by another Tetra device and not directly on the repeater, because unfortunately the used repeater (a Cleartone CM5000) does not output any audio signals on the interface on the back while it is configured in repeater-mode.

The configuration of the SvxLink node for OE1XTW before configuring the link to OE1XAR (svxlink.conf):

###############################################################################
#
# Configuration file for the SvxLink server #
#
###############################################################################

[GLOBAL]
MODULE_PATH=/usr/local/lib/svxlink
LOGICS=SimplexLogic
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000

[SimplexLogic]
TYPE=Simplex
RX=Rx1
TX=Tx1
MODULES=ModuleEchoLink
CALLSIGN="OE1XTW-R"
SHORT_IDENT_INTERVAL=15
LONG_IDENT_INTERVAL=30
EVENT_HANDLER=/usr/local/share/svxlink/events.tcl
DEFAULT_LANG=en_US
MACROS=Macros
FX_GAIN_NORMAL=-7
FX_GAIN_LOW=-12
MUTE_TX_ON_RX=1

[Macros]
1=EchoLink:9999#
9=Parrot:0123456789#
03400=EchoLink:9999#

[Rx1]
TYPE=Local
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0
SQL_DET=VOX
SQL_START_DELAY=0
SQL_DELAY=0
SQL_HANGTIME=2000
SQL_EXTENDED_HANGTIME=1000
SQL_TIMEOUT=600
VOX_FILTER_DEPTH=20
VOX_THRESH=400
SIGLEV_SLOPE=1
SIGLEV_OFFSET=0
SIGLEV_OPEN_THRESH=30
SIGLEV_CLOSE_THRESH=10
DEEMPHASIS=0
SQL_TAIL_ELIM=300
PEAK_METER=1

[Tx1]
TYPE=Local
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0
PTT_TYPE=Hidraw
HID_DEVICE=/dev/hidraw0
HID_PTT_PIN=GPIO1
TIMEOUT=300
TX_DELAY=0
PREEMPHASIS=0

This uses the alsa device 1 (which is the usb soundcard on the Raspberry Pi) as receive and transmit channel to the radio and /dev/hidraw0 (which is the HID endpoint of the soundcard) as PTT control.

To configure the link to OE1XAR I first setup another Raspberry PI which has another USB sound-card attached and is connected to a CM5000 Tetra radio at OE1XAR.

The remote connection is configured by changing the file remotetrx.conf on the new Raspberry PI with svxlink already installed that contains the following:

###############################################################################
#
# Configuration file for the RemoteTrx application. A remote transceiver
# for the SvxLink server system.
#
###############################################################################

[GLOBAL]
TRXS=NetUplinkTrx
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000
CARD_CHANNELS=1

[NetUplinkTrx]
TYPE=Net
RX=Rx1
TX=Tx1
LISTEN_PORT=5210
AUTH_KEY="--Link Key--"

[Rx1]
TYPE=Local
AUDIO_DEV=alsa:hw:CARD=Set,DEV=0
AUDIO_CHANNEL=0
SQL_DET=VOX
SQL_START_DELAY=0
SQL_DELAY=0
SQL_HANGTIME=2000
SQL_EXTENDED_HANGTIME=1000
SQL_TIMEOUT=800
VOX_FILTER_DEPTH=20
VOX_THRESH=400
SIGLEV_SLOPE=1
SIGLEV_OFFSET=0
SIGLEV_OPEN_THRESH=30
SIGLEV_CLOSE_THRESH=10
DEEMPHASIS=0
SQL_TAIL_ELIM=300
PEAK_METER=1

[Tx1]
TYPE=Local
CARD_CHANNELS=2
AUDIO_DEV=alsa:plughw:1
AUDIO_CHANNEL=0
PTT_TYPE=Hidraw
HID_DEVICE=/dev/hidraw0
HID_PTT_PIN=GPIO1
TIMEOUT=300
TX_DELAY=0
PREEMPHASIS=1
DTMF_TONE_LENGTH=100
DTMF_TONE_SPACING=50
DTMF_DIGIT_PWR=-15

We can now establish the connection to the remote node by adding a second SimplexLogic to the “master” SvxLink node. I called the new logic “SimplexLogicBisamberg”.

[SimplexLogicBisamberg]
TYPE=Simplex
RX=NetRx
TX=NetTx
CALLSIGN="OE1XAR-R"
SHORT_IDENT_INTERVAL=15
LONG_IDENT_INTERVAL=30
EVENT_HANDLER=/usr/local/share/svxlink/events.tcl
DEFAULT_LANG=en_US
MACROS=Macros
FX_GAIN_NORMAL=-7
FX_GAIN_LOW=-12
MUTE_TX_ON_RX=1

The new logic has to be added to LOGICS in the GLOBAL section:

[GLOBAL]
MODULE_PATH=/usr/local/lib/svxlink
LOGICS=SimplexLogic,SimplexLogicBisamberg
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000

This alone is not enough as SvxLink will now complain that the file SimplexLogicBisamberg is not found, which can be fixed by copying the following files:

cd /usr/local/share/svxlink/
cp events.d/SimplexLogic.tcl events.d/SimplexLogicBisamberg.tcl
cp SimplexLogic.tcl SimplexLogicBisamberg.tcl

After that you have to open the files and change SimplexLogic to SimplexLogicBisamberg:

Start of file /usr/local/share/svxlink/SimplexLogicBisamberg.tcl:

###############################################################################
#
# SimplexLogic event handlers
#
###############################################################################

#
# This is the namespace in which all functions below will exist. The name
# must match the corresponding section "[SimplexLogic]" in the configuration
# file. The name may be changed but it must be changed in both places.
#
namespace eval SimplexLogicBisamberg {

Start of file /usr/local/share/svxlink/events.d/SimplexLogicBisamberg.tcl:

###############################################################################
#
# SimplexLogic event handlers
#
###############################################################################

#
# This is the namespace in which all functions below will exist. The name
# must match the corresponding section "[SimplexLogic]" in the configuration
# file. The name may be changed but it must be changed in both places.
#
namespace eval SimplexLogicBisamberg {

Now we can configured the required NetRx and NetTx sections in svxlink.conf:

[NetRx]
TYPE=Net
HOST=--OE1XAR Raspberry PI IP Address--
TCP_PORT=5210
AUTH_KEY="--LINK KEY--"
CODEC=S16

[NetTx]
TYPE=Net
HOST=--OE1XAR Raspberry PI IP Address--
TCP_PORT=5210
AUTH_KEY="--LINK KEY--"
CODEC=S16

We used the S16 codec, because there was enough bandwidth available. If you find yourself in a scenario where the connection bandwidth between the two SvxLink nodes is limited, take a look at the SPEEX codec.

The only thing missing now is the link between the two logics. This can be configured by adding the following section to the svxlink.conf file:

[LinkToBisamberg]
CONNECT_LOGICS=SimplexLogic:99:OE1XTW,SimplexLogicBisamberg:98:OE1XAR
DEFAULT_ACTIVE=1
OPTIONS=DEFAULT_CONNECT,NO_DISCONNECT
TIMEOUT=300
AUTOACTIVATE_ON_SQL=SimplexLogicBisamberg

Actually the numbers 99 and 98 are the commands used to enable the links, but they are unused in this configuration as the links are configured to be active all the time and cannot be disconnected.

The new link has to be added to the GLOBAL section which should look like this afterwards:

[GLOBAL]
MODULE_PATH=/usr/local/lib/svxlink
LOGICS=SimplexLogic,SimplexLogicBisamberg
CFG_DIR=svxlink.d
TIMESTAMP_FORMAT="%c"
CARD_SAMPLE_RATE=48000
LINKS=LinkToBisamberg

If you want to use this config, please do not forget to change the link key and IP address of the remote node.

In this configuration EchoLink access is only possible to the main SvxLink node but if someone connects to it, audio will be sent to both repeaters and audio from both repeaters will be forwarded to the connected EchoLink user.

One thought on “How to link two Svxlink Repeaters”

Leave a Reply

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