Communication Server
The Communication Server is the real-time message center of DroneEngage. It keeps a WebSocket open to each unit and each WebClient, and it routes all messages between them.
Program: andruavmainserver (Rust) · Source code:
droneengage_server
What It Does
Accepts secure WebSocket (WSS) connections from units and WebClients.
Routes messages to a group or to one unit.
Connects to the Authentication Server to accept logins.
Connects to the Storage Server to keep tasks, missions and offline messages.
Asks the UDP Relay to open MAVLink pairs for Web UDP Telemetry.
Can connect to other Communication Servers (S2S relay) for large systems.
When a unit or a WebClient logs in, the Authenticator asks the Communication Server for a temporary login key. The client then opens its WebSocket with this key.
Deployment Modes
Standalone — one server, for example the air-gap Pi.
Child server — connects to a parent server, which relays its messages.
Parent (super) server — accepts child servers and forwards messages between them.
Settings
The settings are in server.config. Put your changes in
server.config.local (see Air-Gap Server: The Four Rust Servers).
Identity and network
Setting |
Default |
What it does |
|---|---|---|
|
|
The name of this server. |
|
|
The IP that the server listens on. |
|
|
The WSS port for units and WebClients. |
|
|
The IP or name that units and WebClients use to reach this server. Andruav on a phone may not know a local name, so use the IP of the Pi. |
|
|
The SSL key and certificate. |
|
|
Accept a self-signed certificate. Keep |
|
|
The root certificate of the self-signed certificates. |
Links to the other servers
Setting |
Default |
What it does |
|---|---|---|
|
|
The IP of the Authenticator S2S link. |
|
|
The port of the Authenticator S2S link. It must be the same as
|
|
|
The Ed25519 private key, if the Authenticator uses S2S keys. |
|
|
The shared secret for the Storage Server and the UDP Relay. Copy it from the Storage Server folder. |
|
|
Use the Storage Server. |
|
|
The address of the Storage Server. |
|
one relay at |
The list of UDP Relays. An empty list means no UDP telemetry. |
|
|
How to select a relay when there are many: |
|
one plugin |
The command plugins to use. An air-gap Pi does not need plugins:
set |
Protection
Setting |
Default |
What it does |
|---|---|---|
|
|
Protects the server from a slow client. When the queue of a client is large, the server skips old telemetry for that client. When the queue is too large, the server closes that connection, and the client connects again. |
|
|
Above this queue size, the server skips old telemetry. |
|
|
Above this queue size, the server closes the connection. |
|
|
The memory limit in MB. Above it, the server stops, and systemd starts it again. |
|
|
|
Logs
Setting |
Default |
What it does |
|---|---|---|
|
|
|
|
|
The folder of the log files. |
|
|
Show more details on the console. |
Example — a full server.config for an air-gap Pi:
{
"server_id" : "DE_CommSrv",
"server_ip" : "::",
"public_host" : "192.168.1.161", // the IP of the Pi
"server_port" : 9966,
"ssl_key_file" : "./ssl_local/ssl_airgap/domain.key",
"ssl_cert_file" : "./ssl_local/ssl_airgap/domain.crt",
"allow_fake_SSL" : true,
"ca_cert_path" : "./ssl_local/ssl_airgap/root.crt",
// Authenticator
"s2s_ws_target_ip" : "127.0.0.1",
"s2s_ws_target_port" : "19001",
"s2s_my_private_key" : "./ssl_local/DE_ServerComm_private.pem",
// Storage Server and UDP Relay
"s2s_shared_secret_file" : "./s2s_shared_secret.key",
"enable_storage_server" : true,
"storage_server_host" : "127.0.0.1",
"storage_server_port" : 9000,
"udp_relay" : [{ "host": "127.0.0.1", "port": 9100, "id": "DE_UdpRelay_1" }],
"command_plugin" : [],
"ignoreLog" : true,
"log_directory" : "./logs/",
"debug_logging" : false,
"memory_max" : 973
}
Warning
The file is JSON, but you can write comments with // and /* */.
For Developers
Language: Rust (tokio). It replaces the earlier Node.js server and keeps the same wire protocol.
Build:
cargo build --release. The program istarget/release/andruavmainserver.Configuration:
server.configplusserver.config.local, or--config=<file>.Shared code: droneengage_server_common — config loader, S2S authentication, web helpers.
See Server Technicals for routing, S2S relay, and configuration details.