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.

Single-carrier PSK and QAM16- and 39-tone parallel modes3 kHz WBHF subset

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.

Implementation inventory. Rates are nominal input bit rates, before host and message overhead. S and L mean short and long interleavers; U means uncoded.
FamilySymbol geometryImplemented input rates, bit/sReceive selection
188-110 serial2400 symbols/s, 1800 Hz carrier75, 150, 300, 600, 1200, 2400 coded; 4800 uncodedPreamble identifies rate and S/L; zero interleave requires prior agreement
STANAG 42852400 symbols/s, 1800 Hz carrier75, 150, 300, 600, 1200, 2400 coded; 1200, 2400, 3600 URate and S/L selected beforehand
STANAG 45291200 symbols/s; 1700 Hz carrier by default75, 150, 300, 600, 1200 coded; 600, 1200, 1800 URate, S/L and sub-carrier selected beforehand
STANAG 4539 / 110B appendix C2400 symbols/s, 1800 Hz carrier3200, 4800, 6400, 8000, 9600 coded; 12800 uncodedPreamble identifies rate and interleaver
110C appendix D, 3 kHz2400 symbols/s, 1800 Hz carrierWaveforms 0–13; 75–16000Preamble identifies waveform and interleaver
110 appendix A, 16 tones16 simultaneous data tones; 75 symbols/s per tone75–2400, uncoded; in-band diversity at lower ratesRate selected beforehand
110 appendix B, 39 tones39 simultaneous data tones; 22.5 ms elements75–2400; Reed–Solomon coding and interleavingReceiver 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.

Frame geometry, STANAG 4285Code-derived layout. Blocks have proportional widths. Segment counts are listed in the following text table.Sync80Data32Probe16Data32Probe16Data32Probe16Data320 symbols256 symbols · 106.667 ms
Code-derived frame structure; widths are proportional to symbol counts. Solid blocks marked Data carry unknown symbols. Sync is a fixed known sequence; dashed Probe blocks train the equalizer. One repeating frame is shown, excluding the initial preamble and message flush.
STANAG 4285: 2400 symbols/s; 256 symbols/frame; 106.667 ms/frame. Input rates: 75–2400 coded; 1200/2400/3600 uncoded.
Selected frame: exact segment order and duration
SegmentSymbolsMilliseconds
Sync8033.333
Data3213.333
Probe166.667
Data3213.333
Probe166.667
Data3213.333
Probe166.667
Data3213.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.

Ideal constellation, 16-QAMIn-phase and quadrature coordinates. The complete ordered point table follows; this is not a received signal.IQ012345678910111213141516-QAM16 labelled symbol points4 coded bits / symbolIdeal coordinates from code tables.No received scatter or channel fit.
Ideal, code-derived points, with I horizontally and Q vertically. The dashed circle has unit radius. This is not a received constellation or evidence of a successful decode. Indices identify the table order; scrambling changes which point is emitted for a given bit group.
16-QAM: 16 points, 4 coded bits per data symbol.
Constellation — all coordinates and table indices
Exact implementation coordinates; QAM decimal precision is retained from the tables
IndexIn-phase, IQuadrature, Q
00.8660250.500000
10.5000000.866025
21.0000000.000000
30.2588190.258819
4-0.5000000.866025
50.0000001.000000
6-0.8660250.500000
7-0.2588190.258819
80.500000-0.866025
90.000000-1.000000
100.866025-0.500000
110.258819-0.258819
12-0.866025-0.500000
13-0.500000-0.866025
14-1.0000000.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
110C appendix D subset: effective code rates include repetition and puncturing
WaveformInput bit/sModulationCode rate
075Walsh1/2
1150BPSK1/8
2300BPSK1/4
3600BPSK1/3
41200BPSK2/3
51600BPSK3/4
63200QPSK3/4
748008-PSK3/4
8640016-QAM3/4
9800032-QAM3/4
10960064-QAM3/4
111200064-QAM8/9
1216000256-QAM8/9
132400QPSK9/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.

  1. Frame the bitsMessage markers and fill where the mode defines them.
  2. Add redundancyConvolutional code; repeat or puncture for the selected rate.
  3. InterleaveMove coded bits to their transmit slots.
  4. Map and scrambleConvert bits to constellation points and apply the mode’s randomizer.
  5. Insert known symbolsTraining and probes, then pulse shaping and audio.
Exact STANAG 4539 9600US block interleaver positionsFirst 24 punctured input bits loaded at input index times 229 modulo 1536. Transmit slots are read sequentially. Full numerical positions appear below.Successive punctured bits → load positions → sequential transmission012825638451264076889610241152128014080123456789101112131415161718192021222312 rows × 128 slots = 1536 transmitted coded bits; labels are input indices 0–23.
Exact positions for the first 24 punctured bits of 4539 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
9600US: 256 symbols × 6 coded bits = 1536 transmit slots; 1152 uncoded input bits before rate-3/4 coding
Punctured input indexTransmit slot
00
1229
2458
3687
4916
51145
61374
767
8296
9525
10754
11983
121212
131441
14134
15363
16592
17821
181050
191279
201508
21201
22430
23659

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.