Server Migraton

This blog is run using a cheap VPS with legacy equipment and recently, the vender announced they are shutting down the datacenter this VPS exists in.  As such, I’m migrating to a new VPS machine.  This is the first post on the new install.  Hello World!

PAT – A Winlink Cliet

Here is how I run Pat with AX25. This assumes Direwolf can key your radio for 2M/ 1200 baud connections to local nodes. I’ve yet to get this actually working, as I live in hole which RF can’t seem to escape.

Run Direwolf, with APRS stuff commented out of the config file. The -p and -c flags are needed.

$sudo direwolf -p -c direwolf_noaprs.conf

This will give a symlink, such as:

Virtual KISS TNC is available on /dev/pts/1
Created symlink /tmp/kisstnc -> /dev/pts/1

Take note of the device number, in this case, /dev/pts/1 Bind the port to AX.25

$ kissattach /dev/pts/1 wl2k
AX.25 port wl2k bound to device ax0

Then, run pat. I use a bunch of arguments here, you don need to.

$pat --listen ardop,ax25,telnet http -a

Open a browser, and load pat interface on :8080. Please note allows connections from other machines, not just localhost which is useful for VPN.

You noticed that I included ardop in the config – this is a HF modem which needs separate command line arguments for configuration. Basic config is below. 8515 is the port, plughw is the USB sound card for I/O. Find the audio cards by typing aplay -l into the terminal

Download ardop here.

$./ardopc 8515 plughw:1,0 plughw:1,0

Server uptime

This Linux machine has been up for quite a bit of time.  It’s going down soon for a complete refit.  If this post is here in a few days, it means I didn’t break the SQL database!  Whoohoo!

$ uptime

15:16:27 up 858 days,  5:02,  2 users,  load average: 1.43, 1.65, 1.65


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;

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.

# 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.

svxlink – install on a pi

This is going to be the first post in a series on how to setup an Echolink node using cheap hardware. Read more about Echolink here.

EchoLink allows licensed Amateur Radio stations to communicate with one another over the Internet, using streaming-audio technology.  The system allows worldwide connections to be made between stations, or from computer to station, greatly enhancing Amateur Radio’s communications capabilities.  There are more than 200,000 validated users worldwide — in 151 of the world’s 193 nations — with about 5,200 online at any given time.

The first thing we need to do is Install svxlink on a pi. These instructions assume you have a pi running already, and you can log into it with SSH.

Create the user “SVXLink”. The software will not compile corrctly without this user.
sudo adduser svxlink

Download and install the dependencies:

sudo apt-get install libgsm1 libgsm1-dev sigc++ libsigc++-1.2-5c2 libsigc++-1.2-dev libpopt0 libpopt-dev tcl8.4 tcl8.4-dev g++ subversion patch mutt libqt3-mt libqt3-mt-dev libqt3-headers libgcrypt11 libgcrypt11-dev libspeex1 libspeex-dev libboost-dev libasound2 libasound2-dev qt4-dev-tools cmake screen

Grab the source code.

sudo wget
sudo tar xvf master.tar.gz
sudo rm master.tar.gz

Build and install SVXLink

cd /usr/src/svxlink-master/src
mkdir build
cd /buiild
cmake ..
sudo make
sudo make install
sudo ldconfig -v

Download sounds for your language:

cd /~
tar xvf svxlink-sounds-en_US-heather-16k-13.12.tar.bz2
sudo mkdir /usr/local/share/svxlink/sounds/en_US
sudo cp -a en_US-heather-16k/* /usr/local/share/svxlink/sounds/en_US

Please note that this path is different than anything that I could find on the ‘net. If you’re getting warnings like

*** WARNING: Could not find audio clip "deactivating" in context "Default"


*** WARNING: Could not find audio clip "name" in context "EchoLink"

then you need to find where SvxLink is looking for these files. The easiest way to do this is search for the ‘events.tcl’ file.

locate events.tcl

You should be able to start svxlink from the command line, but maybe you will get a bunch of errors. We need to modify the config file, which defaults in /usr/local/etc/svxlink. More on this in another post.

A thirsty bird and my Pi

A fuzzy picture of a thirsty bird and my Pi.  Note the binder clip which secures the SD card and the USB sound card.

APRS – Position data over amateur radio

Automatic Packet Reporting System (APRS) is an amateur radio-based system for real time tactical digital communications of information of immediate value in the local area. In addition, all such data are ingested into the APRS Internet System (APRS-IS) and distributed globally for ubiquitous and immediate access. Along with messages, alerts, announcements, and bulletins, the most visible aspect of APRS is its map display. Anyone may place any object or information on his or her map, and it is distributed to all maps of all users in the local RF network or monitoring the area via the Internet. Any station, radio, or object that has an attached GPS is automatically tracked. Other prominent map features are weather stations, alerts and objects and other map-related amateur radio volunteer activities including Search and Rescue and signal direction finding.

hpacucli, HP Proliant, Debian

Last time I went to my servers colocation was a year ago. At that time I dropped in a new disk to replace a failed device in the RAID array. Turns out I broke the RAID somehow. The server is an HP Proliant which features a hardware raid with battery backup.

Let’s try and fix this using hpacucli utility. After installing the software, we can query the disks. I have an unassigned disk, which I want to add into Array A. I also want to change Array A into a level 1 RAID.

$ sudo hpacucli ctrl all show config

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
to prevent rare potential data write errors on a
RAID 1 or RAID 1+0 volume in a scenario of
concurrent background surface analysis and I/O write
operations. Please refer to Customer Advisory
c01587778 which can be found at

Smart Array E200i in Slot 0 (Embedded) (sn: PR7BMU0937 )

array A (SATA, Unused Space: 0 MB)

logicaldrive 1 (931.5 GB, RAID 0, OK)

physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA, 1 TB, OK)

array B (SATA, Unused Space: 0 MB)

logicaldrive 2 (931.5 GB, RAID 0, OK)

physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA, 1 TB, OK)


physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA, 1 TB, OK)

For some reason the utility will not start on it’s own. I get this error message.

$ sudo hpacucli
HP Array Configuration Utility CLI
Detecting Controllers...

Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to

Most of the posts I’ve found on the ‘net suggest removing the lock file at

This didn’t work in Debian. The lock file is elsewhere.



sudo hpacucli
HP Array Configuration Utility CLI
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.


Whoot! I got the command line finally. Let’s add the unassigned disk into the array.

ctrl slot=0 ld 1 add drives=1I:1:3

Error: This operation is not supported with the current configuration. Use the
"show" command on devices to show additional details about the
Reason: Transformation size zero

Hmmm… Not sure what this means, but after some Googling around it seems like the internal battery for the hardware RAID has completely failed, or it is unplugged. I might be able to setup a software RAID, which I think is better for my application anyways as I can use the disk in any machine with the same RAID software. When using a hardware raid, failure of the actual hardware could mean data loss. More on this later.


Here is my public key. Need more info? Follow the link.

Version: GnuPG v1.4.10 (GNU/Linux)


Debian + Darkice

I need to setup Linux machines for streaming audio to an Icecast2 server from time to time and I always forget how to do it. This post will outline the install process on a machine with a minimal Debian Lenny system.

After you first boot into a fresh system, log in as root and install a couple things to make the next steps work.

$ apt-get install openssh-server sudo htop alsa g++ gcc oss-compat

You need to add your username into the sudoers file by running visudo and adding yourusername ALL=(ALL) ALL

once that’s done, find your IP address by

$ ifconfig

write down whatever eth0 says and you can get rid of your keyboard and monitor attached to the target machine.  SSH into the box with your username and download source code for lame, then compile it.

$ tar xfz lame-3.91.tar.gz
$ cd lame-3.91
$ ./configure –with-fileio=lame –without-vorbis –disable-gtktest –enable-expopt=full –prefix=/usr
$ make
$sudo make install

For the last step, you need to be root or have write permissions in the target directories.

You might as well use ogg vorbis too.  Go find libogg +libvorbis tarballs somewhere.

$ tar xfz libogg-1.0.tar.gz
$ cd libogg-1.0
$ ./configure –prefix=/usr
$ make
$ sudo make install
$ cd ..
$ tar xfz libvorbis-1.0.tar.gz
$ cd libvorbis-1.0
$ ./configure –prefix=/usr
$ make
$ sudo make install

You need to be root to make install.  Now, grab the darkice source code and compile.

$ ./configure –with-lame –with-vorbis –with-alsa
$ make
$ make install 

You should probably make a configuration fie in /etc as well.  A sample config file is in /usr/local/etc/

Here is my config file for your reference.


duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed


device          = /dev/dsp    # OSS DSP soundcard device for the audio input
#device = hw:0,0
sampleRate      = 44100   # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 2         # channels. 1 = mono, 2 = stereo

format          = mp3
bitrateMode     = vbr
bitrate         = 128
quality         = .8
server          = (your server)
mountPoint      = conway128
port            = 8000
password        = (your pass)
name            = rev.mook
description     = rev. mook
url             =
genre           = Mix
public          = yes

format          = mp3
bitrateMode     = vbr
bitrate         = 320
quality         = 1
server          = (your server)
mountPoint      = 320
port            = 8000
password        = (your pass)
name            = rev. mook
description     = rev. mook
url             =
genre           = Mix
public          = yes


What is it?

Digital cameras are cool. So is GPS. And, EXIF tags are really cool too.

What happens when you merge the three? You end up with a set of photos taken with a digital camera that are “stamped” with the location at which they were taken.

The EXIF standard defines a number of tags that are for use with GPS.

The program takes GPS data in GPX format. This is an XML format. I recommend using GPSBabel – it can convert from lots of formats to GPX, as well as download from several brands of popular GPS receivers.

1) The program can “interpolate” between points (linearly) to get better results. (That is, for GPS logs that are not one sample per second)

2) The resolution is down to one second. But that should be good enough for most things. (This is a limit of the EXIF tags format, as well as GPX)

3) For best results, you should synchronise your camera to the GPS time before you start taking photos. Note: digital cameras clocks drift quickly – even over a short period of time (say, a week).

Installing is easy if you are running debian unstable (sid) or Ubuntu you can just run the following command install it.

$ apt-get install gpscorrelate gpscorrelate-gui

So, here we will see if the photo’s end up on the map, and if they do, make sure they are in the correct position.

Total distance: 76.21 mi
Max elevation: 1008 ft
Total climbing: 6127 ft
Total time: 07:37:17
Download file: 20120720.gpx

Well, that didn’t work at all.  The image on the map isn’t anywhere near where I took it!