hfmodem / bateleur
STANAG & MIL-STD
A family of HF waveforms for carrying a bit stream through fading and multipath. Known symbols train the receiver; coding and interleaving protect the unknown ones.
Experimental. These diagrams describe implemented geometry, not a measured radio exchange. No live STANAG QSO with hfmodem is demonstrated here, and interoperability remains incomplete.
Related standards, different waveforms
Which modem is on the channel?
“STANAG” means a NATO standardization agreement. It does not name one modulation. Bateleur implements several STANAG waveforms alongside related MIL-STD-188-110 modes. Some identify their rate in a preamble; others require the operator to know the rate and interleaver before decoding.
| Family | Symbol geometry | Implemented input rates, bit/s | Receive selection |
|---|---|---|---|
| 188-110 serial | 2400 symbols/s, 1800 Hz carrier | 75, 150, 300, 600, 1200, 2400 coded; 4800 uncoded | Preamble identifies rate and S/L; zero interleave requires prior agreement |
| STANAG 4285 | 2400 symbols/s, 1800 Hz carrier | 75, 150, 300, 600, 1200, 2400 coded; 1200, 2400, 3600 U | Rate and S/L selected beforehand |
| STANAG 4529 | 1200 symbols/s; 1700 Hz carrier by default | 75, 150, 300, 600, 1200 coded; 600, 1200, 1800 U | Rate, S/L and sub-carrier selected beforehand |
| STANAG 4539 / 110B appendix C | 2400 symbols/s, 1800 Hz carrier | 3200, 4800, 6400, 8000, 9600 coded; 12800 uncoded | Preamble identifies rate and interleaver |
| 110C appendix D, 3 kHz | 2400 symbols/s, 1800 Hz carrier | Waveforms 0–13; 75–16000 | Preamble identifies waveform and interleaver |
| 110 appendix A, 16 tones | 16 simultaneous data tones; 75 symbols/s per tone | 75–2400, uncoded; in-band diversity at lower rates | Rate selected beforehand |
| 110 appendix B, 39 tones | 39 simultaneous data tones; 22.5 ms elements | 75–2400; Reed–Solomon coding and interleaving | Receiver settings include interleaver, diversity and character format |
A single carrier changes its phase and sometimes amplitude in successive symbol intervals. Parallel modes modulate several tones at once. Neither carrier count nor symbol rate alone gives the user data rate.
STANAG 4529 uses the 4285 frame structure at half the symbol rate in a nominal 1240 Hz maritime channel. Its library accepts carrier centres from 800 to 2400 Hz in 100 Hz steps. Transmit placement is further restricted by the station’s declared passband; a receive-only monitor can select a carrier outside that transmit span.
The WBHF name belongs to a wider standards family. This implementation provides only its 3 kHz subset; a radio with a 4 kHz receive filter does not thereby gain a 6–24 kHz WBHF implementation. Later MIL-STD editions extend the standards further. See the official MIL-STD-188-110D with Change 1 for that broader scope; the implemented tables here follow the documented 110C subset.
Time on the air
Data shares the clock with training
A baud is one symbol per second. At 2400 baud, the modem changes symbol every 416.7 microseconds. A symbol can carry several coded bits, but synchronization, probes, error-correcting redundancy and repetition also occupy time. The input rate printed on a mode is not the radio’s instantaneous symbol rate or an application’s delivered throughput.
| Segment | Symbols | Milliseconds |
|---|---|---|
| Sync | 80 | 33.333 |
| Data | 32 | 13.333 |
| Probe | 16 | 6.667 |
| Data | 32 | 13.333 |
| Probe | 16 | 6.667 |
| Data | 32 | 13.333 |
| Probe | 16 | 6.667 |
| Data | 32 | 13.333 |
4285 sends 80 synchronization symbols in every 256-symbol frame, followed by four 32-symbol data runs separated by three 16-symbol reference runs. Data occupies exactly half the symbols. At 2400 symbols/s the frame lasts 106.667 ms; 4529’s identical 256-symbol frame lasts 213.333 ms.
188-110 serial starts with a preamble, then alternates data and probes: 32 + 16 symbols at 2400/4800 bit/s, or 20 + 20 at 150–1200 bit/s. Its 75 bit/s mode instead expands a coded dibit into a 32-chip Walsh pattern. A short preamble lasts 0.6 seconds, and a long one 4.8 seconds. These startup costs matter most for short messages.
4539 carries 256 data symbols and a 31-symbol mini-probe per ordinary frame. It reinserts 72 preamble symbols after every 72 frames, allowing a receiver that missed the start to acquire later. The ordinary frame lasts 119.583 ms. The 72-frame group plus reinsertion occupies 8.64 seconds, giving the input rate: 72 × 256 × 6 × 3/4 ÷ 8.64 = 9600 input bit/s.
WBHF waveform 0 uses Walsh blocks rather than the ordinary data/mini-probe layouts shown in the selector. The other waveform groups have their own probe lengths; treating every “2400 baud” mode as the same frame would lose these distinctions.
In-phase and quadrature
PSK and QAM constellations
PSK carries information in phase. QAM also changes amplitude. These are the actual ordered symbol coordinates in Bateleur’s tables: the military QAM mappings should not be replaced by a generic square constellation. The receiver compares the equalized sample with candidate points and retains soft bit evidence for the decoder.
Constellation — all coordinates and table indices
| Index | In-phase, I | Quadrature, Q |
|---|---|---|
| 0 | 0.866025 | 0.500000 |
| 1 | 0.500000 | 0.866025 |
| 2 | 1.000000 | 0.000000 |
| 3 | 0.258819 | 0.258819 |
| 4 | -0.500000 | 0.866025 |
| 5 | 0.000000 | 1.000000 |
| 6 | -0.866025 | 0.500000 |
| 7 | -0.258819 | 0.258819 |
| 8 | 0.500000 | -0.866025 |
| 9 | 0.000000 | -1.000000 |
| 10 | 0.866025 | -0.500000 |
| 11 | 0.258819 | -0.258819 |
| 12 | -0.866025 | -0.500000 |
| 13 | -0.500000 | -0.866025 |
| 14 | -1.000000 | 0.000000 |
| 15 | -0.258819 | -0.258819 |
In 4539, 3200 bit/s uses QPSK data, 4800 uses 8-PSK, 6400 uses 16-QAM, 8000 uses 32-QAM, and 9600 uses 64-QAM. The 12800 bit/s mode uses 64-QAM without coding. The 3 kHz WBHF family reaches 16000 bit/s with 256-QAM and an 8/9 effective code rate, using a different frame geometry.
All implemented 3 kHz WBHF waveforms
| Waveform | Input bit/s | Modulation | Code rate |
|---|---|---|---|
| 0 | 75 | Walsh | 1/2 |
| 1 | 150 | BPSK | 1/8 |
| 2 | 300 | BPSK | 1/4 |
| 3 | 600 | BPSK | 1/3 |
| 4 | 1200 | BPSK | 2/3 |
| 5 | 1600 | BPSK | 3/4 |
| 6 | 3200 | QPSK | 3/4 |
| 7 | 4800 | 8-PSK | 3/4 |
| 8 | 6400 | 16-QAM | 3/4 |
| 9 | 8000 | 32-QAM | 3/4 |
| 10 | 9600 | 64-QAM | 3/4 |
| 11 | 12000 | 64-QAM | 8/9 |
| 12 | 16000 | 256-QAM | 8/9 |
| 13 | 2400 | QPSK | 9/16 |
Interleavers are ultra short, short, medium and long (US/S/M/L), except waveform 0, which has no US setting. Their durations differ by waveform group: waveform 0 has 0.53/1.92/7.68 seconds; waveforms 1–2 and 11–12 have 0.16/0.64/2.56/10.24 seconds; 3–4 have approximately 0.11/0.43/1.71/6.83 seconds; 5–10 and 13 have 0.12/0.48/1.92/7.68 seconds. These are block spans, not complete message durations.
Protecting a burst
Spread errors before decoding them
HF fading can damage adjacent symbols together. Forward error correction adds redundancy; interleaving moves neighboring coded bits apart before transmission, so a burst of errors can be distributed when the receiver restores their order. Longer interleavers add delay and require more buffering. They do not make the channel error-free.
- Frame the bitsMessage markers and fill where the mode defines them.
- Add redundancyConvolutional code; repeat or puncture for the selected rate.
- InterleaveMove coded bits to their transmit slots.
- Map and scrambleConvert bits to constellation points and apply the mode’s randomizer.
- Insert known symbolsTraining and probes, then pulse shaping and audio.
9600US. Each numbered dot is an input index, placed at (index × 229) mod 1536. The receiver restores the same permutation before decoding. Only those 24 positions are highlighted; this is a code-derived diagram, not a fade measurement.Interleaver — exact input and transmit positions
| Punctured input index | Transmit slot |
|---|---|
| 0 | 0 |
| 1 | 229 |
| 2 | 458 |
| 3 | 687 |
| 4 | 916 |
| 5 | 1145 |
| 6 | 1374 |
| 7 | 67 |
| 8 | 296 |
| 9 | 525 |
| 10 | 754 |
| 11 | 983 |
| 12 | 1212 |
| 13 | 1441 |
| 14 | 134 |
| 15 | 363 |
| 16 | 592 |
| 17 | 821 |
| 18 | 1050 |
| 19 | 1279 |
| 20 | 1508 |
| 21 | 201 |
| 22 | 430 |
| 23 | 659 |
The serial convolutional code has constraint length 7 and two generator masks, 0x6D and 0x4F, in this implementation’s delay-bit convention, with the first mask’s output transmitted first. Its base rate is 1/2. 4285’s 2400 bit/s path punctures the coded stream; lower rates repeat coded pairs before the convolutional interleaver. Its 32 branches use row permutation (9 × row) mod 32 and delays proportional to branch position.
4539 uses a tail-biting block code and punctures the six-output-bit group with mask 111001 to obtain rate 3/4. It interleaves 1, 3, 9, 18, 36 or 72 frames, named US, VS, S, M, L and VL. The coded block sizes and load increments depend on both rate and interleaver. The uncoded 12800 mode has no interleaver despite its 12800US parser spelling.
The byte interface defaults to least-significant-bit first. An asynchronous sender inserts start, data, optional parity and stop bits, so a receiver must use the matching character format. The physical waveform alone cannot tell whether a decoded byte stream is text, compressed data, a higher-layer packet or something else.
For coded 4285, the implementation’s Annex E framing uses start marker 03873C3C, end marker 4B65A5B2 and a mode-dependent flush. Its implemented flush formula is J × 32 × 32 ÷ (2 × repeat) + 102 bits: 600L has 6246 flush bits, about 10.4 seconds at 600 bit/s. These Annex E readings remain unverified against another implementation. Uncoded 4285 carries a bare bit stream and uses no such message markers.
Three different jobs
A waveform is not a link controller
The modem converts bits to audio and audio back to bits. Its physical layer does not provide ARQ: decoding a message marker says nothing about a recipient’s acknowledgement. Bateleur’s raw host interface offers command and data ports, normally 8310 and 8311. Applications must supply their own meaning and delivery rules.
ALE, automatic link establishment, selects and calls stations on suitable channels. Bateleur’s 2G ALE uses a separate FSK waveform and controller. It is not a 4285 preamble and does not make arbitrary military data traffic readable. The console’s HFLINK operation is documented separately in ALE and selcall.
STANAG 5066 is an HF subnetwork layer above a modem. The implemented edition 1.2 node handles link setup, segmentation, ARQ/non-ARQ delivery and host primitives. Its client interface normally uses TCP port 5066. A supported modem waveform and a local node test do not establish interoperability with a foreign 5066 service; that remains unverified.
The parallel modes have different protection. The 39-tone waveform uses Reed–Solomon coding over GF(16), interleaving and diversity; its data tones run from 675 to 2812.5 Hz at 56.25 Hz spacing, with a separate 393.75 Hz Doppler tone. The 16-tone waveform has data tones from 935 to 2585 Hz at 110 Hz spacing and a 605 Hz Doppler tone; it is uncoded and uses in-band diversity below 2400 bit/s. Their fuller framing and character rules are in the linked protocol notes.
Listen to one family
Choose the decoder you need
The console has distinct receive-only modes. With your radio already tuned, these commands listen through its selected audio input. They do not transmit or automatically acknowledge anything. For 4285 and 4529, choose the actual rate and interleaver used by the sender; a default is only a starting setting.
hfmodem console stanag4285 monitor --mode 1200L hfmodem console stanag4529 monitor --mode 600L/1700 hfmodem console mil110 monitor --framing 8N1 hfmodem console stanag4539 monitor hfmodem console wbhf monitor hfmodem console tone39 monitor --mode 600/33/A10.8 hfmodem console tone16 monitor --mode 1200
--freq is an optional startup dial frequency in kHz, and a peer name can select a configured channel. You can retune the radio itself while monitoring. Monitor mode does not perform in-session CAT tuning. stanag is a convenience alias for one selected Bateleur waveform, not a simultaneous scan of every STANAG: --mode '4529 600L' selects just 4529.
For self-identifying 110, 4539 and WBHF, the monitor reads the preamble rather than accepting a rate restriction. Character framing and byte order still matter. The console shows decoded text or escaped/hex bytes; seeing bytes is not proof that an application checksum or delivery protocol succeeded. See the monitor guide for sources, recording and stopping.
Evidence boundary
What the implementation establishes
The waveform implementations have local round trips, worked-example checks and fading-channel simulations. The protocol notes also report receiver decodes of published foreign 188-110 serial and 39-tone recordings. Those recording checks are narrower than a live QSO, and they do not show a foreign modem receiving Bateleur’s transmissions.
No independent 4285, 4529, 4539 or WBHF interoperability result is established by these diagrams. The 4285 Annex A tables were independently cross-checked against a published decoder, but its Annex E framing still needs targeted recordings. The serial-110 preamble count interpretation and randomizer reset, 4539 scrambler conventions and tail-biting boundaries, and several WBHF preamble choices remain documented verification targets.
The implementation omits frequency hopping, two-channel independent-sideband modes and WBHF widths above 3 kHz. WBHF also omits the optional K=9 code, shortened fixed preamble, shifted-mini-probe late entry and optional end-of-transmission marker. The reverse-engineered mod110 receiver stops at channel bits because its payload coding is unknown.
These pages make no STANAG certification or conformance claim. Simulation error counts are conditional on their recorded channels, lengths and seeds; consult the protocol notes before interpreting a short zero-error run as a performance bound.
Constants and implementations
Follow the geometry into the code
The figures embed coordinates and counts taken from the implementation, without audio, network libraries or animation. They start stationary and update only when you change a native selector. Every graphical value also appears in a table. The SVG labels are schematic explanations; there is no recorded-radio trace on this page.
- Bateleur implementation overview: implemented scope, foreign-recording decodes, unresolved readings and simulation conditions.
- Shared specification tables: 2400 baud / 1800 Hz constants, 110 mode rows, 4285 frame layout, PSK maps, sync/randomizer generators, convolutional masks and message markers.
- 4285 transmitter and receiver and interleaver implementation: synchronization, pair repetition, branch delays and acquisition.
- 4529 protocol note and 4529 implementation: JITC April 2004 procedure reading, half-speed transform, selectable carriers and transmit placement.
- 4539 protocol note and 4539 implementation: exact QAM coordinates, preamble/Barker phases, mini-probes, scrambler, puncturing mask and per-mode interleaver increments.
- WBHF protocol note and WBHF implementation: all 14 waveform rows, 256-QAM, Walsh/trinomial generators, probe sequences, code masks, interleaver sizes and identifier codings.
- Convolutional encoder and decoder and serial-110 implementation: register orientation, soft Viterbi, tail-biting and zero-interleave handling.
- 16-tone protocol note, 39-tone protocol note and STANAG 5066 implementation note: the parallel-waveform and link-layer details.
- Raw host interface and console monitor selections: current command surface and receive-mode defaults.
- Official DLA STANAG 4285 catalogue record; document images require an ASSIST login. MIL-STD-188-110D with Change 1, official DLA document: standards context and wider family scope, rather than a claim that all current-edition features are implemented here.