Running the Server
There are currently two server implementations. This guide will only discuss the V2 version.
V1 - Windows Only - K1XM
Section titled “V1 - Windows Only - K1XM”Available from K1XM on his website. It requires a PC running Windows 7 or any newer version of Windows. It has one window. Once the server is started and a configuration file is opened it can usually be minimized and ignored.
V2 - Multi Platform - M1DST
Section titled “V2 - Multi Platform - M1DST”This is a multi platform version that runs on Windows, Linux and MacOS. There are prebuilt binaries and Docker images available for all major platforms. It does not have a GUI and is designed to be run in the background. Once running, you shouldn’t need to interact with it.
Requirements
Section titled “Requirements”The computer it runs on must have a USB port and networking capability.
General Information
Section titled “General Information”The server can control multiple switches. The design limit is 99 but this has never been tested. It has been used with at least four switches.
It does not use a lot of memory or CPU resources. It can be run on a computer which is also running a logging program or other programs.
TCP/IP
Section titled “TCP/IP”The server communicates with clients using TCP/IP (Ethernet). The communication can be over a local or wide area network, wired or wireless. Remote connections are supported.
Configuration File
Section titled “Configuration File”When the server starts it reads a configuration file. This file provides all of the information needed. Some of the configuration information is sent to the switches.
Command Line
Section titled “Command Line”The V2 server binary is moas-server-cli.
moas-server-cli [run|validate] <path-to-config.moas> [error|info|debug] [--sim] [--duration <seconds>] [--version]Commands and Arguments
Section titled “Commands and Arguments”run(optional) starts the server. If omitted,runis assumed.validateloads and validates the config, then exits.<path-to-config.moas>is required unless using version-only mode.errorsets log level to errors only.infosets log level to info (default).debugsets log level to debug.--simenables simulation mode (hardware start failures are ignored).--duration <seconds>auto-stops after N seconds (N > 0).--duration=<seconds>same as above.--versionprints version and exits.-vsame as--version.
--versionand-vare standalone (do not combine with other args).- Unknown arguments or invalid values return a usage error.
Examples
Section titled “Examples”moas-server-cli --versionmoas-server-cli run "Configuration Files/2x6.moas"moas-server-cli validate "Configuration Files/2x6.moas" debugmoas-server-cli "Configuration Files/2x6.moas" info --simmoas-server-cli run "Configuration Files/2x6.moas" --duration 10moas-server-cli run "Configuration Files/2x6.moas" --duration=10Using the Server
Section titled “Using the Server”The server displays a log of activity. The amount of detail shown is based on the log level selected when starting. If you change the configuration file, this is monitored and the server is automatically restarted to reflect the changes. CTRL + C will force the server to exit if you are running it via a command line.
When the MOAS Server reads a configuration file it attempts to communicate with all configured MOAS switches. If it is unable to communicate with a switch, either because the switch is not connected or the COM port does not exist, or because the switch is not responding, it periodically retries. When it connects to a switch it initializes it and makes it operational.
A typical startup log looks like:
__ __ ___ _ ____ ___ ___| \/ | / _ \ / \ / ___| |_ _| |_ _|| |\/| | | | | | / _ \ \___ \ | | | || | | | | |_| | / ___ \ ___) | | | | ||_| |_| \___/ /_/ \_\ |____/ |___| |___|
Master Of Antenna Switching (MOAS)Developed by James Patterson, M1DST and Paul Young, K1XM.Version: v2.0.0
Loading configuration: /config/m1dst_tcp.moasConfiguration loaded.MOAS core running. Press Ctrl+C to stop.Stopped.
Read 3905 lines from configuration fileLinux TCP listener started on port 12059Switch 1 port 192.168.10.94:12058 is not connectedSwitch 1 port 192.168.10.94:12058 is connectedSwitch 1 port 192.168.10.94:12058 is operational