# FTR4 technical specification, version 0.1 FTR4 is a slotted digital mode for amateur radio. It carries FT8-style contacts (call signs, grid, signal report), typed messages with delivery confirmation, and file transfer with erasure-code error correction. This document is the public description of the signal and protocol (FCC §97.309(a)(4)). The reference implementation is the `ftr` Python package in this folder. Where this text and the code disagree, the code is what's on the air, and this text has a bug. Nothing in FTR4 is encrypted. Compression (zlib/deflate, RFC 1950/1951) is used only to shorten files, and is fully described below. FTR4 has two submodes, named by their slot length: **FTR4-3** (Fast, 3-second slots) and **FTR4-6** (Robust, 6-second slots). The 4 is the number of tones. ## 1. Signal | | FTR4-3 (Fast) | FTR4-6 (Robust) | |---|---|---| | Sample rate used to define the signal | 12 000 Hz | 12 000 Hz | | Samples per symbol (NSPS) | 288 | 576 | | Symbol rate | 41.667 baud | 20.833 baud | | Tone spacing | 41.667 Hz | 20.833 Hz | | Tones | 4 (4-GFSK) | 4 (4-GFSK) | | Occupied bandwidth (approx.) | 167 Hz | 83 Hz | | Symbols per frame | 99 | 99 | | Frame length | 2.376 s | 4.752 s | | Slot length | 3.0 s | 6.0 s | **Speeds (messages and files to one station).** Their frames may be sent at 2×, 4× or 8× the symbol rate (NSPS divided by 2, 4 or 8), with the same 4 tones, spacing scaled with the symbol rate, coding and frame structure: | | 1× | 2× | 4× | 8× | |---|---|---|---|---| | FTR4-3 symbol rate / bandwidth / frame | 41.667 Bd / 167 Hz / 2.376 s | 83.333 Bd / 333 Hz / 1.188 s | 166.667 Bd / 667 Hz / 0.594 s | 333.333 Bd / 1333 Hz / 0.297 s | | FTR4-6 symbol rate / bandwidth / frame | 20.833 Bd / 83 Hz / 4.752 s | 41.667 Bd / 167 Hz / 2.376 s | 83.333 Bd / 333 Hz / 1.188 s | 166.667 Bd / 667 Hz / 0.594 s | 8× FTR4-3 (333 baud) is above the 300-baud limit some countries still apply to HF data; the US replaced that limit with a 2.8 kHz bandwidth limit in 2024. Stations can be set to use 4× at most. At speed `k`, up to `k` frames are sent in one slot, back to back on one carrier, the first starting 0.2 s after the slot boundary (so the slot's signal ends at the same time as a 1× frame). Tone 0 is the station's transmit frequency, moved down if needed so the signal stays below 2950 Hz. **Modulation.** Continuous-phase GFSK. The instantaneous frequency is `f0 + spacing × Σ tone[k] × p(t − kT)`, where `p` is the Gaussian frequency pulse with BT = 1.0 spanning three symbols (`p(t) = ½[erf(c(t/T + ½)) − erf(c(t/T − ½))]`, `c = π·√(2/ln 2)·BT`). `f0` is the audio frequency of tone 0. The first and last NSPS/8 samples are shaped with a raised cosine ramp. **Timing.** Slot `n` starts at UTC second `n × slot length` counted from the Unix epoch. A transmission starts 0.2 s after the slot boundary. Receivers search start times from the slot boundary to 1.1 s after it. **Frame layout** (symbol index: content): ``` 0– 3 Costas array A: tones 0 1 3 2 4–46 data symbols 0–42 47–50 Costas array B: tones 1 0 2 3 51–94 data symbols 43–86 95–98 Costas array C: tones 2 3 1 0 ``` **Bits to tones.** The 174 coded bits `c0..c173` map to the 87 data symbols in order. Data symbol `i` carries `v = 2·c(2i) + c(2i+1)`, sent as tone `G[v]` with Gray map `G = (0, 1, 3, 2)`. **Wide ×4** (older FTR4 file transfers; current FTR4 sends at 2×/4×/8× instead and still receives Wide ×4). Up to four frames are sent in the same slot on four signals at `f0`, `f0 + 200 Hz`, `f0 + 400 Hz` and `f0 + 600 Hz`. Each signal gets 1/√4 of the amplitude, and the sum is scaled down if needed so it never exceeds the single-signal peak. Each carrier is an ordinary frame; receivers need nothing special to decode them. ## 2. Coding **Payload.** Every frame carries 77 message bits (§4). **CRC.** A 14-bit CRC with generator polynomial `0x2757` (x¹⁴ implied) is computed over the 77 bits followed by 14 zero bits, most significant bit first, register starting at zero. The 77 bits plus the 14 CRC bits make the 91-bit LDPC input. **LDPC (174, 91).** FTR4's own code: 83 parity checks, every column of weight 3, girth at least 6. The parity-check matrix is published in `ftr/ldpc_174_91.json` as a list of 83 checks, each the list of codeword positions it covers. A codeword `c` is valid when every check sums to zero mod 2. The code is systematic: `c0..c90` are the 91 input bits, and `c91..c173` are the parity bits that satisfy the checks. (The matrix was built by `ldpc.build_code()` from seed `0x46545231`. The JSON file is the definition, not the program.) ## 3. Station identification Every QSO message includes both call signs. Every message or file burst begins and ends with a Header frame that carries the sender's and the addressee's call signs. A receiving station identifies in its TextAck frames (which carry its full call), and at the end of a file transfer with a Standard frame ` RRR`. Long transfers repeat the Header at the start of every block burst, which is well inside 10 minutes. ## 4. Message types The first three bits (`i3`) give the type. Fields are unsigned integers, most significant bit first. Unused bits are zero. | i3 | Type | Fields (bits) | |---|---|---| | 0 | FreeText | text 71 (13 characters, base 42) | | 1 | Standard | call1 28, call2 28, R 1, extra 15 | | 2 | Header | from 28, to 28, transfer id 8, kind 2, count 6, speed 2 | | 3 | TextData | transfer id 8, sequence 6, last 1, text 54 (10 characters, base 42), left 5 | | 4 | TextAck | from 28, hash12(to) 12, transfer id 8, in_row 7, bitmap 8 | | 5 | FileData | transfer id 8, block 7, index 7, data 48 (6 bytes), left 4 | | 6 | FileAck | hash12(from) 12, transfer id 8, block 7, status 2, need 7 | | 7 | FileInfo | transfer id 8, blocks 7, parity 6, length 15, CRC-32 32, wide 1 | **Characters.** Text uses the 42-character alphabet `" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.,?/-"` (space first). A string of `n` characters is the base-42 number with the first character most significant, padded with spaces on the right. **Call fields (28 bits).** | Value | Meaning | |---|---| | 0, 1, 2 | DE, QRZ, CQ | | 3–1002 | CQ 000–999 | | 1003–532 443 | CQ followed by 1–4 letters, base 27 (`" A–Z"`), right-aligned | | 532 444 + h | a hashed name, h = CRC-32(upper-case name) & 0x3FFFFF (22 bits). Used for @GROUP names and calls that don't fit the standard form | | 4 726 748 + n | a standard call sign | A standard call sign is up to six characters, with a digit in position 3 (padded with a leading space when the digit is in position 2) and letters after it. Normalised to six characters `c1..c6`: `n = ((((c1·36 + c2)·10 + c3)·27 + c4)·27 + c5)·27 + c6`, where `c1 ∈ " 0–9A–Z"` (37), `c2 ∈ "0–9A–Z"` (36), `c3 ∈ "0–9"` (10) and `c4..c6 ∈ " A–Z"` (27). `hash12(x)` = CRC-32(upper-case x) & 0xFFF. **Extra (15 bits).** 0–32 399: a 4-character Maidenhead grid, `(L1·18 + L2)·100 + D1·10 + D2`. 32 400: blank. 32 401: RRR. 32 402: RR73. 32 403: 73. 32 404 + (r + 50): a report `r` from −50 to +49 dB. 32 504 + (r + 50): a heartbeat answer `HB r` (§5.5). 32 604–32 767: reserved. The `R` bit prefixes the report or grid with "R". **Header kind.** 0 = text to a station, 1 = file to a station, 2 = text to a group or everyone (no ACKs), 3 = file to a group or everyone (no ACKs). For text, `count` is the number of TextData frames (1–64; 0 means 64). For files, `count` is 0. **speed** (text): the speed of the frames that follow this opening Header in the same round: 0 = 1×, 1 = 2×, 2 = 4× (3 is reserved). **left** (TextData, FileData) is the number of frames still to come in the current burst after this one, including the closing Header, saturating at 31 (text) or 15 (file). At 2× or 4× speed, TextData `left` counts the slots of the burst still to come after this one. ## 5. Protocol ### 5.1 Contacts (QSO) As in FT8: a station calls `CQ ` on its slot parity (even or odd slots). A reply goes in the other parity. The usual sequence is: ``` CQ K1ABC FN42 K1ABC W9XYZ EN61 W9XYZ K1ABC -08 K1ABC W9XYZ R-11 W9XYZ K1ABC RR73 (both stations log the contact) K1ABC W9XYZ 73 ``` Each message is repeated up to six times until the next one is heard. ### 5.2 Text messages The sender transmits a burst in consecutive slots, one frame per slot: `Header, TextData(0), TextData(1), …, Header`. The last TextData has `last = 1`. The receiver works out when the burst ends: at the closing Header, or from any TextData frame's `left` count, or after three silent slots. In the next slot it sends `TextAck(from = itself, to = hash12(sender), id, in_row, bitmap)`: * `in_row` = the number of frames received in an unbroken run from frame 0 (`count` when the message is complete); * bit `i` of `bitmap` = frame `in_row + 1 + i` was received. The sender then transmits `Header, , Header`. It does this until all frames are confirmed, or after six rounds without progress. If no TextAck arrives within three slots (plus 0–2 slots chosen at random), it sends everything not yet confirmed again. Messages to a group or to CQ are sent once, with no ACKs. **Speed.** Each round starts with the Header at 1×, carrying the round's speed. At 2× or 4× the TextData frames follow, `k` per slot, and there is no closing Header (the frames' `left` count marks the end). The sender picks the speed from the SNR at which it last decoded the other station (FTR4-3: 4× from +1 dB, 2× from −3 dB; FTR4-6: 4× from −2 dB, 2× from −6 dB; 1× if it hasn't heard the station in 20 minutes). After a round at 2× or 4× that isn't fully confirmed, it halves the speed for that station for the next 100 slots. TextAck frames are always sent at 1×. **Conversation.** Once a message to a station has been confirmed, or a message from it received complete, the two stations are in conversation for 200 slots from the latest such message. In conversation, the first round of a message at 2× or 4× has no separate 1× slot: the Header (with its speed field) is the first frame of the first fast slot, followed by the TextData frames. A station in conversation therefore looks for 2× and 4× frames from its partner in every slot, at the partner's transmit frequency and timing as measured on its 1× frames, for 240 slots. If the round isn't confirmed, later rounds start with the 1× Header as usual. ### 5.3 Files The file payload is the file name (UTF-8, at most 80 bytes), a zero byte, then the file content. It is compressed: one flag byte (`0x01` = zlib stream follows, `0x00` = stored uncompressed if that's smaller), then the data. The result (at most 32 767 bytes) is padded with zero bytes to a multiple of 6. It is cut into 6-byte frames, and the frames are grouped into blocks of 32 (the last block may be shorter). FileInfo carries the number of blocks, the parity per block, the compressed length, and the CRC-32 (IEEE 802.3, as zlib) of the uncompressed payload. **Erasure code.** Inside a block of `k` data frames, frame index `0..k−1` is data and index `j ≥ k` is parity. In GF(256) with polynomial `0x11D`, parity frame `j` is ``` P_j = Σ_i inv(j XOR i) · D_i (i = 0 … k−1, each byte position separately) ``` This is a Cauchy matrix, so any `k` distinct frames of a block rebuild it. Parity frames can be generated for any index up to 127, so a resend never repeats a frame the receiver already has. Parity per block: Light 4, Standard 8, Strong 16, Broadcast 32. **Bursts.** For each block the sender transmits `Header, FileInfo, data frames, parity frames, Header` in consecutive slots (four frames per slot in Wide ×4). At 2×, 4× or 8× (the Header's speed field, chosen per burst as for text, with file thresholds 3 dB lower: FTR4-3 8× from +3 dB, 4× from −1 dB, 2× from −4 dB) the Header goes alone at 1× (or, in conversation, first in the first fast slot), then FileInfo, data and parity frames `k` per slot, with no closing Header; FileData `left` then counts the slots still to come. A burst whose FileAck doesn't arrive, or that leaves the block short, halves the speed for that station. The receiver answers after the burst (same end-of-burst rule as text) with a `FileAck` (`status`: 0 = still needs `need` more frames of `block`, 1 = `block` complete, 2 = whole file received and the CRC-32 matched, 3 = cancel). * Status 0: the sender sends `Header, FileInfo, need + 1 new parity frames, Header`. * Status 1: the sender moves to the next block. * Status 2: the transfer is finished. The receiver also identifies with ` RRR`. If no FileAck arrives within three slots, the sender sends four new parity frames of the current block. It gives up after twelve unanswered rounds. Files to a group or to CQ use Broadcast parity and no ACKs. ### 5.5 Heartbeats (who's listening) A station asks who can hear it with one Standard frame `CQ HB ` (call1 is the directed CQ "CQ HB"), sent once on its slot parity. A station that decodes it may answer with ` HB`, where `r` is the SNR at which it heard the heartbeat (the extra field's heartbeat range), so the caller learns how it is heard. An answer: * goes in one of the next three slots of the other parity, chosen at random, so that several stations answering don't collide; * is sent at most once per caller every 10 minutes, and not while the station is in a contact, sending a burst or receiving one; * is never treated as the start of a contact. Stations should answer only while an operator has transmit switched on, and should send automatic heartbeats no more often than every 10 minutes. ### 5.4 Channel use A station never starts a burst while it is receiving one. An ACK always goes out in the slot after a burst ends. No transmission lasts longer than a configurable limit (60 s by default); after that the station listens for at least one slot. ## 6. Frequencies (USB dial, audio 200–3000 Hz) | Band | Dial (MHz) | Notes (US rules; check your own country's) | |---|---|---| | 160 m | 1.805 | ARRL digital segment 1.800–1.810 (outside Region 1 bands that start at 1.810) | | 80 m | 3.583 | ARRL RTTY/data 3.570–3.600; above FT8 (3.573), FT4 (3.575) and JS8 (3.578) | | 60 m | 5.4035 | US channel 5403.5 kHz (100 W PEP ERP). Data must be centred 1.5 kHz above the channel frequency, one signal per channel: on 60 m every FTR4 signal, at any speed, is centred on 1500 Hz audio (tone 0 = 1500 − 1.5 × tone spacing), and receivers look for 2×/4×/8× frames there. (5.357 is the FT8 frequency.) | | 40 m | 7.083 | ARRL RTTY/data 7.080–7.125; above JS8 (7.078) | | 30 m | 10.146 | ARRL packet/data 10.140–10.150; 200 W maximum | | 20 m | 14.085 | ARRL RTTY 14.070–14.095; above FT4 (14.080) | | 17 m | 18.106 | ARRL packet/data 18.105–18.110 | | 15 m | 21.083 | ARRL RTTY/data 21.070–21.110; above FT8 (21.074) and JS8 (21.078) | | 12 m | 24.926 | ARRL packet/data 24.925–24.930 | | 10 m | 28.083 | ARRL RTTY 28.070–28.150; above FT8 (28.074) and JS8 (28.078). Technicians may use data here | | 6 m | 50.330 | ARRL all modes 50.3–50.6; clear of FT8 (50.313, 50.323) and FT4 (50.318) | Each dial frequency keeps the whole signal (0.15–3.07 kHz above the dial) inside the segment named. Technicians have no HF data privileges below 10 m. In the US, unattended (automatic control) data stations are limited to specific sub-bands (§97.221); FTR4 expects a control operator at the radio. ## 7. Measured performance (reference implementation, AWGN, 2500 Hz noise bandwidth) See README.md for the current table, made by `tools/bench_modem.py`.