Skip to content

Instantly share code, notes, and snippets.

@ytjohn
Created October 11, 2016 00:22
Show Gist options
  • Save ytjohn/23859c8ba89c761d6bbd308a01d29291 to your computer and use it in GitHub Desktop.
Save ytjohn/23859c8ba89c761d6bbd308a01d29291 to your computer and use it in GitHub Desktop.
APRS Meetings
#!/bin/bash
#
# https://www.reddit.com/r/amateurradio/comments/4r2cq5/aprs_schedule_generator_for_direwolf/d4y9san
## Which week is this? Only needed for stuff to be advertised for one week per month
#weeknum=$[ ($(date +%e)-1)/7+1 ]
## returns 1 through 5
#[ "$weeknum" == 3 ] || exit 0
#
# Set your LATITUDE in DDMM.mmN/S
# DD = Degrees (34 degrees)
# MM.mm = Minutes (19.32 minutes)
# N/S = Hemisphere (North)
# - note: two decimal places only!
# example: LAT=3419.32N
#
LAT=1234.56N
#
# Set your LONGITUDE in DDDMM.mmE/W
# DDD = Degrees (118 degrees)
# MM.mm = Minutes (26.52 minutes)
# E/W = Hemisphere (West)
# - note: two decimal places only!
# example: LONG=11826.52W
#
LONG=12345.67W
#
# APRS Callsign
# This is the call that the APRS object is to be
# sent from. Typically the node callsign, with a
# high SSID number. example: APRS_CALL=KC6HUR-13
#
APRS_CALL=ABC123-13
#
# APRS Pass/Validation number
# - Without a validation number, the beacons will not
# be accepted by the APRS Tier 2 server system.
# - This must match the APRS callsign. To obtain a validation
# number for your node callsign,
# - You cannot run the system without vailidation number. The
# APRS Tier 2 system requires this validation number.
#
# example: APRS_PASS=23483
#
APRS_PASS=12345
#
# APRSD server address
# - Use the default provided here. With the APRS Tier 2 server
# system, the address below will automatically point you to
# a server. Using this address will spread the load across all
# of the servers by passing out random addresses.
# NOTE: Should not be necessary to change this.
#
APRS_SERVER=noam.aprs2.net
#
# Port to use on APRS server
# NOTE: Should not be necessary to change this.
#
APRS_PORT=14580
#
# Set the APRS symbol
SYMBOL=y
#
# Make the APRS Object Name
#
OBJ_NAME="MEET SITE" # MUST be 9 character long
#
# Make the APRS Object Timestamp
#
TIMESTAMP=`date -u +%d%H%M`z # Format = DDHHMMz
#
# Assemble the COMMENT
#
COMMENT="Put in any comment you like here." # Keep in mind that it is hard to read long comments
#
# Assemble the APRS OBJECT
OBJECT=";${OBJ_NAME}*${TIMESTAMP}${LAT}/${LONG}${SYMBOL}${COMMENT}"
#
# Assemble the BTEXT line
#
BTEXT="$APRS_CALL>APN001:${OBJECT}"
#
# Assemble the APRS-IS Login string
#
LOGIN="User $APRS_CALL pass $APRS_PASS"
#
# Send the Beacon to the APRS-IS network
#
# Figure out which nc to use
if [ -f /usr/bin/nc ] ; then
NC=/usr/bin/nc
else
NC=$BIN/nc
fi
#
echo -e "${LOGIN}\n${BTEXT}" | $NC -w 10 ${APRS_SERVER} ${APRS_PORT} &>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment