Setting a Beacon


An RC script for starting a beacon...

Here is a very simple script that automates the starting up of a beacon for either a VHF port or an HF port, or both.

You may use this script exactly as is, but it is more likely that you will have to alter it to suit your particular situation, especially if you have more than two (2) ports. So, it may be best to follow it as a model or guide to help you in designing your own custom script.

The rules are quite straighforward. What immediately follows the -d is the "destination." This may be "ID" or "BEACON." The timing is controlled by the -t parameter, as measured in minutes. The next item is the port name as it appears on the axports file, and finally, there is the broadcast message or text which is usually quoted.

The script may be called from the console or from another script file. Here is an example:

  • do_beacon - bc0
So in this case, the "-" (dash) is simply a placeholder indicating that there is no HF port being used, or no first port being used.




My do_beacon Script

As usual, I have left the script in its original form so that you can see how it has evolved over time. (The "$1" variable is the first argument in the script command line. The "$2" is the second.) Notice how you may store as many beacon command lines as you wish by using the "#" sign to comment out unused commands. This makes it very easy to activate previous lines!

#!/bin/sh
# do_beacon
# KA1FSB/kbn
# Sat Feb 19 11:20:04 EST 2000
# 07-11-03 (bambi)
#

#----- General usage if from KBD...
# echo "Usage: do_beacon  "

#----- This is for the hf port... position one, $1
if [ "$1" != "" ] && [ "$1" != "-" ]
then

/usr/sbin/beacon -d ID -t 60 $1 "NETWORK 105 - AX25 utilities (Linux 2.0.30) - Wellesley, MA
  14.105<>145.77 KA1FSB/PBBS, -6/FSB-BBS, -7/Node
     Keep those packets comming!" 2>/dev/null
fi

#----- This is for the vhf port... position 2, $2
if [ "$2" != "" ] && [ "$2" != "-" ]
then

# beacon -d ID -t 20 $2 "AX25 Utilities 2.1.42a/Linux Slackware (44.56.26.11)"

   /usr/sbin/beacon -d BEACON -t 20 $2 "Karl in Wellesley, MA: LinuxNode and MBX-PMS"

# KA1FSB-2/FSB-BBS...KA1FSB-3/Chat-tty...KA1FSB-7/node...KA1FSB-4/PMS

fi

#----- End of do_beacon

      Mail Document Request for:   do_beacon
  A Few Caveats:

  • Be sure your local mailer is properly "hooked" into your browser.
  • Allow up to 24 hours for delivery, although 3-6 is typical...
  • Mailed copy, being the latest "on-line" version, may differ slightly from above.
  • Click on "Mail it to me" below to activate your mailer, then send from there.
  • Please don't change the subject field. (Additional text body comments OK.)
  • Sometimes server is down for extended periods of time... (1-10+ days)
  • (You obtain, modify and run all data/code at your own risk.)


Enough "excuses," just Mail it to me!

  What if ...

  • If your browser-linked mailer doesn't seem to respond, you may send a null-bodied email to ka1fsb@att.net with a subject of "Code Request - do_beacon" not including the quotes... (Some browsers and their mail agents do not like excessive string data in the mailto format.)



(Courtesy KBNorton Computer Services)