An APRS beacon over the internet

2 min read

Archive post.

Translated from Ukrainian.

Sometimes you need to put an APRS beacon on the map but can’t tie up a transceiver for it. For example, you could set up a beacon for a local repeater (if it isn’t on the map yet) or for an echo repeater. You can also broadcast your position during a field day, or just show where your radio shack is.

APRS beacon density in Europe

APRS beacon density in Europe

This recipe works over the internet only; no transceiver needed. To transmit through a transceiver you need different software and a licence to operate on the air.

You only need simple software, and you may already have it installed.

sudo apt-get install nmap

You can pick the nearest server to send APRS packets to. I chose poland.aprs2.net. The default port is 14580.

The protocol goes like this (details: http://www.aprs-is.net/Connecting.aspx):

  • Authenticate with the APRS-IS server
  • Send the data

The data looks like this:

  • user <your_callsign> pass <your_passcode>
  • objectdata

A template for sending a message from bash:

printf "%s\n" "user <your_callsign> pass <your_passcode>" "<your_callsign>>APN100,TCPIP*:=<latitude>/<longtitude>-<comment>" | ncat poland.aprs2.net 14580

An example with a callsign filled in:

printf "%s\n" "user UR5ZHF-130 pass 23558" "UR5ZHF-130>APN100,TCPIP*:=4246.29N/01412.79E_247-fakeQTH" | ncat poland.aprs2.net 14580

The 130 is a made-up suffix. It’s better to use one of these:

-0 Home station or a station running as an IGate.
-1 Digipeater, home station running as a digipeater and/or WX digipeater
-2 Digipeater on the 70 cm band
-3 Digipeater
-4 HF -> VHF gateway
-5 IGate (not a home station)
-6 Satellite operation
-7 Handheld/portable radio (Kenwood TH-D7, Yaesu VX-8R, ICOM D-Star, etc.)
-8 Boats, yachts and other vessels (maybe 802.11 in the future)
-9 Mobile
-10 APRS-IS only - APRS with no radio
-11 APRStouch-tone users (and the occasional balloon)
-12 Portable devices: laptop, campsite, etc.
-13 Not defined
-14 Trucks
-15 HF stations

Now let’s write a script that a task scheduler can run at a set interval:

#!/bin/bash

#Define login info
user=yourHAMSIGN
password=passcode

#Define object user info
senduser=yourHAMSIGN

#Define APRS-IS server
server=poland.aprs2.net
port=14580

#Define station location
lat=4146.72N
lon=01213.80E

#Define data
comment="QTH"
data="$senduser>APN100,TCPIP*:=${lat}/${lon}-${comment}"

#Send data to the server
printf "%s\n" "user $user pass $password" "${senduser}>APN100,TCPIP*:=${lat}/${lon}-${comment}" | ncat poland.aprs2.net 14580

Save it as ~/aprs.beacon.sh and don’t forget to make it executable: chmod +x ~/aprs.beacon.sh. Try running it and check the result on http://aprs.fi. Then add it to crontab to run every 20 minutes. If you send too often, your callsign may get blocked. There are also limits on how fast your position can change.

*/20 * * * * /home/pi/aprs.beacon.sh

crontab -e opens the cron table of the current user for editing.

Useful links:

RadioAPRSHardware and DIY