#
# Simple sample configuration file for the APRX-2  -- an APRS iGate and Digipeater
#
# This configuration is structured with Apache HTTPD style tags
# which then contain subsystem parameters.
#

#
# For simple case, you need to adjust 4 things:
#   - Mycall parameter
#   - Select correct type of interface (ax25-device or serial-device)
#   - Optionally set a beacon telling where this system is
#   - Optionally enable digipeater with or without tx-igate
#

#
#
# Define the parameters in following order:
#   1)  <aprsis>     ** zero or one
#   2)  <logging>    ** zero or one
#   3)  <interface>  ** there can be multiple!
#   4)  <beacon>     ** zero to many
#   5)  <digipeater> ** zero to many (at most one for each Tx)
#

#
# Global macro for simplified callsign definition:
# Usable for 99+% of cases.
#

mycall  HA2NON-1

<aprsis>
# The  aprsis login  parameter: 
# Station callsignSSID used for relaying APRS frames into APRS-IS.
#
login     HA2NON-1	# login defaults to $mycall

# APRS-IS server name and portnumber.
server    euro.aprs2.net    14580

# Some APRS-IS servers tell every about 20 seconds to all contact
# ports that they are there and alive. Others are just silent.
# Default value is 3*"heartbeat" + some  --> 120 (seconds)
#
#heartbeat-timeout   0    # Disabler of heartbeat timeout

# APRS-IS server may support some filter commands.
# See:  http://www.aprs-is.net/javAPRSFilter.aspx
#
# You can define the filter as single long quoted string, or as
# many short segments with explaining comments following them.
#
#filter "possibly multiple filter specs in quotes"
#
#filter "m/100"	     # My-Range filter: positions within 100 km from my location
#filter "f/OH2XYZ-3/50"  # Friend-Range filter: 50 km of friend's last beacon position
</aprsis>

<logging>

# pidfile is UNIX way to tell that others that this program is
# running with given process-id number.  This has compiled-in
# default value of:  pidfile /var/run/aprx.pid
#
pidfile /var/run/aprx.pid


# rflog defines a rotatable file into which all RF-received packets
# are logged.  It can be rotated at any time without need to signal
# the aprx that the file has been moved.
#
rflog /var/log/aprx/aprx-rf.log

# aprxlog defines a rotatable file into which most important 
# events on APRS-IS connection are logged, namely connects and
# disconnects.  It can be rotated at any time without need to
# signal the aprx that the file has been moved.
#
aprxlog /var/log/aprx/aprx.log

# erlangfile defines a mmap():able binary file, which stores
# running sums of interfaces upon which the channel erlang
# estimator runs, and collects data.
# Depending on the system, it may be running on a filesystem
# that actually retains data over reboots, or it may not.
# With this backing store, the system does not loose cumulating
# erlang data over the current period, if the restart is quick,
# and does not stradle any exact minute.
# (Do restarts at 15 seconds over an even minute..)
# This file is around 0.7 MB per each interface talking APRS.
# If this file is not defined and it can not be created,
# internal non-persistent in-memory storage will be used.
#
# Built-in default value is: /var/run/aprx.state
#
#erlangfile /var/run/aprx.state

</logging>


# ***********  Multiple <interface> definitions can follow   *********

# ax25-device  Lists AX.25 ports by their callsigns that in Linux
#              systems receive APRS packets.  If none are defined,
#              or the system is not Linux, the AX.25 network receiver
#              is not enabled.  Used technologies need at least
#              Linux kernel 2.4.x
#
# tx-ok        Boolean telling if this device is able to transmit.
#
<interface>
    ax25-device HA2NON-1
    tx-ok      false  # transmitter enable defaults to false
</interface>

# The  TNC serial  options.  Parameters are:
#   - /dev/ttyUSB1    -- tty device
#   - 19200           -- baud rate, supported ones are:
#                        1200, 2400, 4800, 9600, 19200, 38400
#   - 8n1             -- 8-bits, no parity, one stop-bit,
#                        no other supported modes
#   - "KISS"                  - plain basic KISS mode
#   - "XORSUM" alias "BPQCRC" - KISS with BPQ "CRC" byte
#   - "SMACK"  alias "CRC16"  - KISS with real CRC
#   - "TNC2"                  - TNC2 monitor format
#
#<interface>
#   serial-device /dev/ttyUSB0  19200 8n1    KISS
#   #callsign     $mycall  # callsign defaults to $mycall
#   #tx-ok        false    # transmitter enable defaults to false
#</interface>
#
#<interface>
#   serial-device /dev/ttyUSB1  19200 8n1    TNC2
#   #callsign     $mycall  # callsign defaults to $mycall
#   #tx-ok        false    # TNC2 monitor can not have transmitter
#</interface>
#


# ***********  Multiple <beacon>  definitions can follow   *********
<beacon>
#
#  Beacons are sent out to radio transmitters AND/OR APRSIS.
#  Default if "both", other modes are settable.
#
#beaconmode { aprsis | both | radio }
#
#  Beacons are sent from a circullar transmission queue, total cycle time
#  of that queue is 20 minutes by default, and beacons are "evenly"
#  distributed along it.  Actual intervals are randomized to be anything
#  in between 80% and 100% of the  cycle-size / number-of-beacons.
#  First beacon is sent out 30 seconds after system start.
#  Tune the cycle-size to be suitable to your number of defined beacons.
#
cycle-size  30m
#
#
# There can be multiple beacon options.
# 'srccall'   parameter sets claimed origination address.
# 'dstcall'   sets destination address, default "APRXnn"
# 'interface' parameter picks an interface (must be "tx-ok true" type)
# 'via'       sets radio distribution pattern, default: none.
# 'type'      Single character setting type:  ! = / @, default: !
# 'item'      Defines a name of Item (')') type beacons.
# 'object'    Defines a name of Object (';') type beacons.
#
# 'timefix'   On APRS messages with HMS timestamp (hour:min:sec), the
#             system fixes appropriate field with transmit time timestamp.
# 'file' option tells a file at which a _raw_ APRS message content is
#        expected to be found as first line of text. Line ending newline
#        is removed, and no escapes are supported.  The timefix is
#        available, though probably should not be used.
#
# The parameter sets can vary:
#  a) 'srccall nnn-n dstcall "string" symbol "R&" lat "ddmm.mmN" lon "dddmm.mmE" [comment "any text"]
#  b) 'srccall nnn-n dstcall "string" raw "string"'
#
# The a) form flags on some of possible syntax errors in parameters.
# It will also create only "!" type messages.  The dest parameter
# defaults to "APRS", but can be used to give other destinations.
# The via parameter can be used to add other keywords, like "NOGATE".
#
# Writing correct RAW format beacon message is very hard,
# which is evidenced by the frequency of bad syntax texts
# people so often put there...   If you can not be persuaded
# not to do it, then at least VERIFY the beacon result on
# web service like  findu.com,  or  aprs.fi
#
# Symbol  R&   is for "Rx-only iGate"
# Symbol  I&   is for "Tx-iGate"
# Symbol  /#   is for "Digipeater"
#
#beacon                     file /tmp/wxbeacon.txt
#beacon interface N0CALL-3 srccall N0CALL-3 \
#                           raw "!6016.30NR02506.36E&aprx - an Rx-only iGate"
#beacon interface $mycall   symbol "R&" lat "6016.30N" lon "02506.36E" \
#                           comment "aprx - an Rx-only iGate"
#
beacon raw "!4738.48N/01818.15EyPHG2277Linux aprx rx-IGATE | ant: 3el Yagi east-southeast | rig: Wouxun KG689 jee :) | www.nonoo.hu"
</beacon>


# ***********  <digipeater>  definition(s) follow   *********
#
#  The digipeater definitions tell transmitters that receive
#  AX.25 packets from possibly multiple sources, and then what
#  to do on the AX.25 headers of those messages.
#
#  There is one transmitter per digipeater -- and inversely, there
#  can be at most one digipeater for each transmitter.
#
#  In each digipeater there is at least one <source>, usually same
#  as the transmitter.  You may use same <source> on multiple
#  <digipeater>s. Using multiple instances of same <source> on
#  a single <digipeater> does not crash the system, but it can cause
#  packet duplication in case of non-APRS protocols (like AX.25 CONS)
#
#  Use only at most two levels of viscous-delay in your <digipeater>.
#  Immediate sending is by "0", and a delayed sending is any value
#  from 1 to 9.  This system does not correctly support other than
#  immediate sending and one level of delay.
#
#<digipeater>
#    transmitter     $mycall
#    #ratelimit      120      # default: max 120 packets/minute
#
#    <source>
#        source         $mycall
#    #   #relay-type    digipeated # default mode is "digipeated"
#    #   viscous-delay  0     # no viscous delay for RF->RF digipeating
#    #   ratelimit      120   # default: max 120 packets/minute
#    </source>
#    #### NOTE: Some APRSIS / Tx-IGate processing rules are not yet implemented
#    #<source>                # Adding APRSIS source makes this tx-igate
#    #    source        APRSIS
#    #    relay-type    third-party  # Must define this for APRSIS source!
#    #    viscous-delay  5    # Recommendation: 5 seconds delay to give
#    #                        # RF delivery time make itself known.
#    #    filter         t/m  # Tx-IGate only messages sent to me by APRSIS
#    #</source>
#</digipeater>
