SVXlink Part 2

This is just notes for myself really, but part one can be found here.

Default path for sound files in Debian.  This path depends on your distro;
/usr/local/share/svxlink/sounds/en_US

What I have done to build custom modules into SVXlink is to use DTMF tones to trigger external scripts.  Those scripts are written in Bash or Python.

Drop a file in the following path, copy and paste below, edit as needed.  As you can see, toggling a DTMF tone will run a script and send me an eMail.
/usr/local/share/svxlink/events.d/local/Logic.tcl

###############################################################################
#
# Generic Logic event handlers (local extension)
#
###############################################################################
# This is the namespace in which all functions and variables below will exist.
#
namespace eval Logic {
# Executed when a DTMF command has been received
# cmd - The command
#
# Return 1 to hide the command from further processing is SvxLink or
# return 0 to make SvxLink continue processing as normal.
#
proc dtmf_cmd_received {cmd} {
global active_module
if {$active_module != "" && [string index $cmd 0] != "*"} {
return 0
}
if {[string index $cmd 0] == "*"} {
set cmd [string range $cmd 1 end]
}
if {$cmd == "99"} {
puts "Executing external command 99"
playMsg "Core" "relay4"
exec mail -a /home/revmook/test.text -s "DTMF command test 99" revmook at echoparklake dot clam < /dev/null &
return 1
}
if {$cmd == "98"} {
puts "Executing external command 98"
playMsg "Core" "relay3"
exec mail -a /home/revmook/test.text -s "DTMF command test 98" revmook at echoparklake dot clam < /dev/null &
return 1
}
if {$cmd == "97"} {
puts "Executing external command 97"
playMsg "Core" "relay2"
exec mail -a /home/revmook/test.text -s "DTMF command test 97" revmook at echoparklake dot clam < /dev/null &
return 1
}
if {$cmd == "96"} {
puts "Executing external command 96"
playMsg "Core" "relay1"
exec mail -a /home/revmook/test.text -s "DTMF command test 96" revmook at echoparklake dot clam < /dev/null &
return 1
}
return 0

External sounds for the above script go in this path.  Please note SVXlink is picky about the file format. I can’t recall what it is (mono 16 bit I think) but it will error out if things are not right.
/usr/local/share/svxlink/sounds/en_US/Core

EchoLink node – Echo Park, CA

It’s taken some time, but I’ve got my EchoLink node working, and functional.  I keep the ‘net side of the node up 80% of the time, but the radio is kept off if I’m out of town or away from the house for an extended time.  The system will run off a sealed 7Ah lead acid battery for 2~3 days if needed.

Below is the basic info.  All licensed amateur radio operators are welcome to use the system if you’re in range of the transmitter.

KK6TGM-L
Node: 390877
145.675 / CTCSS 156.7
TX @ 5W (maybe less?)

Using DTMF tones, you can key in the following commands to start service modules.  Each level will give another set of commands if available.

Press (#) to deactivate any module.

ID the system (*#)

Help (0#)
Parrot (1#)
EchoLink (2#)
# disconnect last station
## disconnect all stations
51# listen only mode

Voicemail (3#)

Special features – These toggle relays on and off in the EchoLink frame, with the idea that they turn things on and off, like the radio or my coffee maker.  I haven’t wired any of that stuff up yet though.  Currently remote control is done through SSH with obvious limitations.

Relay 1 (96#)
Relay 2 (97#)
Relay 3 (98#)
Relay 4 (99#)

 

Follow this link for more info on how to setup your own node using a Pi.

Below outlines a basic EchoLink system if you don’t know what I’m talking about.  You can also read more about it here.

LinkingExample

EDIT: 091318 – changed radio frequency, added additional DTMF commands here.