You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
README: lead with what Mercury is, and state the modem work as ours
Three changes, plus corrections found while making them.
Clarity. The page opened with project funding and a paragraph of ARQ
internals ("modular reactor architecture", "persistent FreeDV mode pool")
before saying what the software is for. It now opens with a plain
sentence and a row of jump links, and the 30-line option dump that sat
between the intro and Getting Started is folded into a <details> block --
still there, no longer in the way of a first-time reader.
Physical layer. The section said only that Mercury "uses FreeDV
modulator code" and planned to add more. That undersells it: DATAC15,
DATAC16, DATAC17 and QAM16C2 are Rhizomatica modes, not upstream, and the
link layer carries HARQ Chase combining, OLLA and per-mode SNR
calibration. All of it is now stated, with a table, and each figure is
sourced from docs/MODES.md and docs/HARQ-FINDINGS.md rather than asserted
-- the HARQ number is the measured 0/130 -> 61/130 at -5.8 dB. Credit to
David Rowe and the codec2 contributors kept up front, since we build on
their work.
Interfaces. The bundled Go/Fyne GUI is fully supported alongside the
web and Qt ones; all three are now presented as first-class with a note
on when each is the right choice, rather than as a bare list.
Corrections found on the way: the mode notes still described DATAC13 as
the control mode and a DATAC4-based ladder. Control has been DATAC16 for
some time and the ladder is DATAC15 -> DATAC4 -> DATAC3 -> DATAC1 ->
DATAC17 -> QAM16C2 (arq_protocol.h:311).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-**Mercury v2** (this branch) — a complete rewrite in C with a new ARQ data link. **This is the recommended version.**
11
20
-**[Mercury v1](https://github.com/Rhizomatica/mercury/tree/mercuryv1)** — the original Mercury modem written in C++. Legacy; use only if you know what you are doing.
12
21
13
-
A Qt-based GUI is available: [mercury-qt](https://github.com/Rhizomatica/mercury-qt)
Mercury turns a single-sideband radio into a data link. It handles the
25
+
waveform, the error correction, the retransmissions and the radio keying, and
26
+
presents the result to your application as an ordinary TCP connection.
16
27
17
-
## Mercury v2
28
+
-**ARQ data link for point-to-point sessions** — connect/accept handshake, ACK and retry logic, and controlled disconnect, so a file either arrives intact or you are told it did not.
29
+
-**Adaptive speed** — the link starts robust and climbs through six payload modes as conditions allow (DATAC15 → DATAC4 → DATAC3 → DATAC1 → DATAC17 → QAM16C2), stepping back down when the channel fades. Control frames always ride the most robust mode, DATAC16, so signalling survives when payload cannot.
30
+
-**Broadcast mode** alongside ARQ, with its own framing and TCP ingress port — used for one-to-many traffic and for [Reticulum](#reticulum) mesh networking.
31
+
-**VARA-style TCP TNC interface** on two sockets (control on the base port, data on base+1), speaking `MYCALL`, `LISTEN`, `CONNECT`, `BUFFER`, `SN`, `BITRATE` and `TUNE` (a 1 kHz ATU tuning carrier with a hard 60 s unkey timer). Existing VARA-aware software can generally talk to Mercury unchanged.
32
+
-**Runs on the audio hardware you have** — `alsa`, `pulse`, `oss`, `coreaudio`, `aaudio`, `dsound`, `wasapi`, plus `shm`, `null` and `fifo` for embedded and test use.
33
+
-**Keys the radio for you** via Hamlib CAT or the HERMES shared-memory interface — or stays out of the way and lets your client do it.
18
34
19
-
Mercury v2 is a complete rewrite of the HERMES modem ARQ data link,
20
-
replacing the monolithic state machine with a modular reactor
design (DATAC13 for signaling, DATAC4/DATAC3/DATAC1 for payload),
24
-
and a persistent FreeDV mode pool eliminating codec re-initialization
25
-
overhead. Built for reliable store-and-forward email and file transfer
26
-
over HF radio links in rural and emergency scenarios.
35
+
Mercury runs on Linux, Windows and macOS, including Raspberry Pi.
27
36
28
-
## What this software does
37
+
## Command-line reference
29
38
30
-
-**ARQ data link for P2P sessions** with connect/accept handshake, ACK/retry logic, keepalive, and controlled disconnect.
31
-
-**Adaptive payload "gear-shifting"** (DATAC4/DATAC3/DATAC1) driven by link quality and backlog, with DATAC13 used for control signaling.
32
-
-**Per-direction mode selection**: each path (A→B and B→A) negotiates its mode independently based on local SNR.
33
-
-**Broadcast data mode** in parallel to ARQ, with dedicated broadcast framing and TCP ingress port.
34
-
-**VARA-style TCP TNC interface** with separate control and data sockets (base port and base+1), including commands/status like `MYCALL`, `LISTEN`, `CONNECT`, `BUFFER`, `SN`, `BITRATE`, and `TUNE` (a 1 kHz ATU tuning carrier at a requested dBFS level, with a hard 60 s unkey timer).
-**Direct radio control** via HAMLIB or HERMES shared-memory interface for direct PTT keying.
39
+
Most settings live in `mercury.ini` (see [Configuration File](#configuration-file));
40
+
command-line flags override it. Run `./mercury -h` for this list at any time.
41
+
42
+
<details>
43
+
<summary><b>All command-line options</b> (click to expand)</summary>
37
44
38
45
```
39
46
Usage modes:
@@ -72,11 +79,15 @@ Options:
72
79
-h Prints this help.
73
80
```
74
81
82
+
</details>
83
+
75
84
Mode behavior notes:
76
85
-`-m` / `-s` affects **broadcast** and **test** modes only.
77
-
- During an active ARQ link, control frames use DATAC13 and ARQ payload starts in DATAC4 (then may adapt to DATAC3/DATAC1).
78
-
- VARA `BW500` blocks DATAC1; `BW2300` and `BW2750` both allow the full Mercury
79
-
payload-mode ladder.
86
+
- During an active ARQ link, control frames always use DATAC16, and the payload
87
+
starts at the robust end of the ladder (DATAC15), climbing through DATAC4,
88
+
DATAC3, DATAC1, DATAC17 and QAM16C2 as the channel allows.
89
+
- VARA `BW500` keeps the link narrow; `BW2300` and `BW2750` allow the full
90
+
Mercury payload-mode ladder.
80
91
-`CALL` advertises the local BW token and `ACCEPT` returns the negotiated
81
92
session token. If either side uses `BW500`, the link stays narrow; `BW2750`
82
93
is preserved in `CONNECTED ... BW` only when both peers advertise it.
@@ -272,20 +283,59 @@ the integration architectures and configuration.
272
283
273
284
## Physical Layer
274
285
275
-
Mercury v2 currently uses FreeDV modulator code developed by David Rowe. We plan to introduce other modulator modes present in Mercury v1.
286
+
Mercury builds on the FreeDV / codec2 OFDM data modes developed by David Rowe
287
+
and contributors, and **extends them with waveforms and link-layer techniques
288
+
developed by Rhizomatica**for the conditions HERMES actually operates in:
289
+
long NVIS and regional paths, marginal signal levels, and fading.
290
+
291
+
Four of the modes Mercury uses are ours, not upstream:
292
+
293
+
| Mode | Bandwidth | Payload | What it is for|
294
+
|---|---|---|---|
295
+
|**DATAC15**| 200 Hz | 30 B | Fringe data. Rate-1/3 LDPC, 3 carriers — reaches below the floor of any stock data mode |
296
+
|**DATAC16**| 200 Hz | 14 B | Control and ACK at the fringe; the mode the whole session depends on |
297
+
|**DATAC17**| 2100 Hz | 1180 B | Intermediate SNR, roughly 2× the goodput of DATAC1 |
298
+
|**QAM16C2**| 2100 Hz | 1213 B | Good channels, roughly 2.9× DATAC1 |
299
+
300
+
Beyond the waveforms, the link layer adds:
301
+
302
+
- **HARQ with Chase combining** — a failed frame is not thrown away. Repeats are soft-combined with the original, so a frame that fails twice can still decode from the pair. At the fading cliff, where a single-shot link delivers essentially nothing, this recovers around half the frames ([measured](docs/HARQ-FINDINGS.md): 0/130 → 61/130 at −5.8 dB).
303
+
- **Outer-loop link adaptation (OLLA)** — closes the loop on observed delivery rather than SNR estimates alone, which stops the mode ladder oscillating on a fading path.
304
+
- **Per-mode SNR calibration**, so gear-shifting decisions are made on numbers that mean the same thing across modes.
305
+
306
+
Every mode figure above is measured on a calibrated bench (Watterson fading
307
+
channel, 100-burst trials) that reproduces the published upstream numbers
308
+
before it is trusted for ours. See [docs/MODES.md](docs/MODES.md) for the full
309
+
tables, methodology, and the negative results.
310
+
311
+
Work continues on porting the remaining Mercury v1 modulators, including a
312
+
32-tone MFSK mode for the deepest fringe conditions.
276
313
277
314
## Graphical Interfaces
278
315
279
-
Mercury v2 has three interfaces:
280
-
- **Built-in Fyne UI** — a single-binary GUI embedded in the engine via CGo (this repository, `gui_interface/fyne-ui/`). Shows waterfall/spectrum, telemetry, and controls. Build with `make fyne-ui` (Linux) or `make windows-installer` (Windows cross-compile).
0 commit comments