The Winlink Canary takes a JSON configuration file as the first argument to the program. While this document breaks the keys into logical sections, the actual configuration file is flat (other than the nodes array).
The callsign we are using to connect to the winlink network.
Type: String
Required: Yes
This callsign is what is used to connect to the winlink network. It is expected that the Pat config "telnet" will fetch messages for rx_aux_call
using this call (so they end up in the mailbox for pat_call
). Note that we will NOT fetch messages destined for pat_call
directly, so long as
we're running pat >= 0.15.1.
(It's also assumed this is the over-the-air callsign but I don't actually think anything depends on this assumption.)
The callsign used as the recipient of our test messages.
Type: String
Required: Yes (TODO: FIXME)
This callsign is used as the recipient of our health probes. It is recommended that this is a tactical call sign different from pat_call. This must be set up in the auxiliary_addresses
section of the pat config.
With pat >= 0.15.1, we will ONLY fetch the auxillary address mail and not the pat_call mail.
The email address or Winlink call that test messages are sent from
Type: String
Required: No
This is the envelope header sender for the winlink message. There is no authenticaiton for this value. If unset, we default to pat_call.
Important Note: This value must be different than rx_ax_call because Winlink will drop messages addressed to the sender.
The path to the pat binary.
Type: String
Required: No
This should be the path to the pat binary (ex: /usr/bin/pat
).
If not specified, we simply invoke "pat" and rely on it being contained in the PATH
.
Path to the pat mailbox
Type: String
Required: no
Default: $HOME/.local/share/pat/mailbox/
(Dev TODO: Can we take a pat config and read this out instead?)
Initial time to wait between sending a probe and trying to retrieve it. Type: Integer
Required: no
Default: 30
After we send a probe via RF, how long to wait before trying to fetch it via telnet. If it doesn't show up, we do exponential backoff and keep trying up to fetch_retries_count
times.
Number of times to retry looking for a probe. Type: Integer
Required: no
Default: 3
Note that there's exponential backoff between each retry for a given probe.
How many runs we look back in time to decide whether a node is healthy Type: Integer
Required: no
Default: 5
Note that you must have at least this many runs before a health state can be generated.
How long to wait between passes over a set nodes Type: Integer
Required: no
Default: 3600
Its important that we don't hog the channel. There is a tradeoff between minimizing channel use and detection time for broken nodes. Should probably be O(hours).
** We treat a node as unhealthy if it failed unhealthy_threshold
probes out of the last health_window_size
probes we did.
Type: Integer
Required: no
Default: 3
** If the mailbox is dedicated to this function, we will be more cavalier with mailbox cleanup.
Type: Boolean
Required: no
Default: False
How to handle the outbox:
- True: if the mailbox being used is dedicated to this funciton, then we can assume anything we find in the outbox at the start of a pass is left over from an aborted run, and remove it.
- False: if the mailbox being used is shared with a real user, then if we find any mail there, be extra cautious and abort until the user clears the mail.
** Currently, only TAIT 8100 ("TAIT") is supported but the goal is to support HamLib library radios.**
Full pathname to rig control device
Type: String
Required: yes
Default: none
Serial port speed for rig_port
Type: Integer
Required: yes
Default: none
This needs to be a supported speed, typically 9600.
Name of the device as expected by HamLib or "TAIT"
Type: String
Required: yes
Default: none
Whether to log node health information (only) to syslog
Type: Boolean
Required: no
Default: False
A webserver is provided principally to allow polling of the winlink_monitor for its current status and the status of the monitored nodes. The output is formatted json and intended for easy parsing by other programs or administrators tracking issues. The use of HTTPS instead of HTTP is optional and the server will only support one of the protocols at a time. If using HTTPS, the server will look for a certificate file and key file in the current directory by default, but these can be changed with the relevant parameters below.
**The address to listen on for new web connections
Type: String
Required: no
Default: 127.0.0.1
**The port to listen on for new web connections
Type: Integer
Required: no
Default: 8080
**Force the use of SSL (https) for web connections
Type: Boolean
Required: no
Default: False
**If using HTTPS, this specifies where the private key file is located
Type: String
Required: no
Default: ./key.pem
**If using HTTPS, this specifies where the certificate file is located Type: String
Required: no
Default: ./cert.pem
The options are discussed above. nodes is a list of dictionaries that specify the Winlink gateway's to be monitored. The information includes:
- name - human friendly name for the node
- frequency - the frequency in megahertz of the winlink gateway
- peer - the ssid of the winlink gateway
{
"our_call": "WY2K",
"sender": "ACS-WL",
"pat_call": "W7ACS-1",
"rx_aux_call": "ACS-WLCPWT",
"mailbox_base_path": "/home/astronut/.local/share/pat/mailbox/",
#"dedicated_mailbox": "True",
"pat_bin_path": "/usr/bin/pat",
"fetch_sleep_seconds": 2,
"fetch_retry_interval_seconds": 30,
"fetch_retries_count": 3,
"health_window_size": 5,
"unhealthy_threshold": 3,
"rig_port": "/dev/ttyACM0",
"rig_port_speed": "9600",
"rig_model": "RIG_MODEL_IC705",
# Example for TAIT
#"rig_port": "/dev/ttyUSB_TAIT_UHF",
#"rig_port_speed": "9600",
#"rig_model": "TAIT",
"syslog_enabled", "True",
"nodes": [
{"name": "Beacon Hill #1", "frequency": 430.800, "peer": "W7ACS-10"},
{"name": "Beacon Hill #2", "frequency": 439.800, "peer": "W7ACS-11"},
{"name": "First Hill #1", "frequency": 430.850, "peer": "W7ACS-12"},
{"name": "First Hill #2", "frequency": 440.850, "peer": "W7ACS-13"},
{"name": "Capitol Park #1", "frequency": 430.950, "peer": "W7ACS-14"},
{"name": "Capitol Park #2", "frequency": 439.950, "peer": "W7ACS-15"},
{"name": "Magnolia", "frequency": 430.875, "peer":"W7ACS-9"}
],
}