This page describes what happens to your bytes between the moment they enter the modem and the moment they come out of the receiver, and which profile fields control each step. For a closer look at the signal processing, see Transmitter Chain and Receiver Chain.
Modulations#
phy.modulation accepts BPSK, QPSK and GMSK.
| Modulation | Bits per symbol | Character |
|---|---|---|
BPSK | 1 | Two phases, 180° apart. The most robust, at half the throughput of QPSK |
QPSK | 2 | Four phases, 90° apart, Gray mapped. Twice the throughput of BPSK for the same bandwidth |
GMSK | 1 | Continuous-phase frequency modulation with a constant envelope, tolerant of non-linear amplifiers |
All modulations run at 4 samples per symbol. BPSK and QPSK use root-raised-cosine pulse shaping
(α = 0.35) and are received coherently: the receiver recovers the symbol timing and locks a
carrier loop onto the signal's phase. GMSK requires phy.bt (the bandwidth-time
product that characterises GMSK), set to 0.5, and is received with a frequency discriminator.
The transmit and receive chains#
TX: bytes -> framing -> FEC encoder -> scrambler -> sync marker -> preamble/fill -> modulator
RX: demodulator -> find sync marker -> descrambler -> FEC decoder -> bytesThe order follows CCSDS 131.0-B:
- the attached sync marker is added after coding, so the receiver can find frames before it decodes them;
- the scrambler works on the coded stream, just before the marker, and the marker itself is never scrambled;
- on receive, frames are delimited and descrambled first, then decoded.
Frames and frame lengths#
The modem cuts the transmit byte stream into frames of framing.mtu_bytes bytes (256 when
absent). Coding expands each frame, and Stellar Link programs the receiver for the coded length
automatically; you only set mtu_bytes.
framing.fec.type | Frame length before coding | Frame length on the air | Constraint |
|---|---|---|---|
none | mtu_bytes | mtu_bytes | — |
conv (K=7, r=1/2) | mtu_bytes | 2 × mtu_bytes | — |
rs (RS(255,223)) | 223 | 255 | mtu_bytes must be 223 |
rs+conv | 223 | 510 | mtu_bytes must be 223 |
Stream and slot framing. By default the modem treats what you send as a byte stream: it is cut into frames on the byte count, and what comes back is the same bytes re-cut at the frame length. To keep one packet per frame, send packets in fixed slots of one frame length each (see Datapath and Transmission). The datapath moves data in blocks of 4096 bytes, so slots stay aligned only when the frame length divides 4096: 1024, 512, 256, 128, 64 or 16 work; 223 does not, so slot framing is used without Reed-Solomon.
Attached sync marker (ASM)#
The sync marker is a known 32-bit word placed in front of every frame so the receiver can find
where frames start. framing.sync_word.value_hex sets it (the CCSDS value is 1ACFFC1D), and
the same value is used by the transmitter and the receiver.
- Without a
sync_wordthere is no marker, and the receiver has nothing to lock onto. Such a profile is transmit-only, useful for putting a known signal on a spectrum analyser (theraw_txprofile is one). - Phase ambiguity. A QPSK carrier loop can lock on any of four phases (BPSK and GMSK: two), and three of the four would turn the bit stream into a permuted copy. The receiver searches the marker under every rotation the modulation allows and corrects the payload with the rotation that matched.
- One wrong bit is tolerated. A marker with one wrong bit out of 32 is still accepted. These
near-matches are counted and give a pre-FEC bit error estimate (
ber_asm, see Telemetry and Metrics).
Scrambler#
The CCSDS pseudo-randomiser (polynomial x^8+x^7+x^5+x^3+1) XORs the coded stream with a
pseudo-random sequence, so that long runs of identical bits do not reach the modulator.
framing:
scrambler:
enabled: true
seed: 0xFF # optional, 8 bits, default 0xFF (all ones, the CCSDS preset)The same setting is applied to the transmitter and the receiver.
Forward error correction#
framing:
fec:
type: "rs+conv" # none | conv | rs | rs+conv
rate: "223/255" # required when type is not none; informativetype | Encoder | Decoder |
|---|---|---|
none | — | — |
conv | Convolutional, K=7, r=1/2, G1=171₈, G2=133₈ (CCSDS) | Viterbi |
rs | Reed-Solomon (255,223) over GF(2⁸), conventional basis | Berlekamp-Massey, Chien/Forney |
rs+conv | RS outer code, convolutional inner code (the CCSDS 131.0-B concatenation) | Viterbi, then RS |
- A convolutional code doubles the number of bits on the air and corrects scattered errors; a Reed-Solomon code adds 32 parity bytes per 223 and corrects up to 16 erroneous bytes per codeword. Concatenated, the inner code cleans up the channel and the outer code catches the bursts the Viterbi decoder leaves behind.
- The Reed-Solomon code uses the conventional symbol basis rather than the CCSDS dual basis; its correcting power is the same.
fec.ratedocuments the code rate; the code itself is selected bytype.- The receiver counts corrected bytes and uncorrectable codewords. An uncorrectable codeword is still delivered, errors included, so check the counters when integrity matters.
Preamble and inter-frame fill#
After a silence, the receiver's gain control, timing recovery and carrier loop need some signal to settle; between frames, a transmitter with nothing to send would stop and let them drift. The profile's preamble settings address both:
- a preamble of
pre_symbolssymbols is sent before a frame that follows a silence; - up to
post_symbolssymbols of fill are sent between frames.
Preamble and fill are inserted only between frames, after the sync marker, so they are never scrambled or coded and never appear inside a frame.
framing:
preamble:
type: "fill" # "fill" (built-in pattern) or "pattern" (your own value_hex)
# value_hex: "727252D02A1FEDD8" # optional for fill, required for pattern
pre_symbols: 512 # default 512
post_symbols: 2048 # default 2048; must be greater than 0| Field | Meaning |
|---|---|
type | fill uses the built-in 64-bit pattern 0x727252D02A1FEDD8 unless value_hex is given; pattern requires value_hex |
value_hex | 64-bit pattern, 16 hex digits read MSB first; 8 digits are repeated to fill 64 bits |
pre_symbols | Preamble length before a frame that follows silence. The default of 512 symbols (about 26 ms at 19 531 baud) leaves a comfortable margin for the receiver to settle |
post_symbols | Maximum fill between two frames. It is bounded so that the transmitter does go quiet after traffic stops, which lets configuration changes take effect |
Every pattern is checked when the profile is applied: it must differ by at least 8 bits from
every rotation of the sync word (so it can never be mistaken for one), and it must be balanced
(a biased pattern would transmit a carrier). A profile without framing.preamble sends no fill.
CCSDS transfer frames#
framing.transfer_frame adds a CCSDS Space Data Link layer. stellarlinkd's link service wraps
each message in a transfer frame before handing it to the modem, and locates frames again in the
received stream.
framing:
mtu_bytes: 1024 # one transfer frame per modem frame
transfer_frame:
type: "tm" # tm (132.0-B), aos (732.0-B) or uslp (732.1-B)
scid: 0x0AB # 10 bits for TM, 8 for AOS, 16 for USLP
vcid: 1 # 3 bits for TM, 6 for AOS and USLP
fecf: true # CRC-16 Frame Error Control Field, default trueRules checked when the profile is applied:
mtu_bytesis required and must divide 4096 (1024, 512, 256, 128 and 64 work);- the SCID and VCID must fit the field widths of the chosen frame type;
- transfer frames are combined with
fec.typenoneorconv, and the FECF carries the error detection.
Received frames are published on the link service with framing: "transfer_frame" and a quality
verdict: good (the FECF checks), erred (the FECF fails; the payload is still delivered) or
undetermined (no FECF). Each message must fit in one frame. See
ZeroMQ Link Service and, for the complete list of profile
fields, RF Profiles.