Skip to content

Modem Types

pschatzmann edited this page Oct 29, 2026 · 5 revisions

TinyModem provides ten modem types: FSK, MFSK, PSK (with QPSK and 8PSK), OFDM, AX.25 (with FX.25 and IL2P), ggwave, Olivia/Contestia, chirp spread spectrum (CSS), Morse code and DTMF. Each type has several modes (e.g. mfsk4 to mfsk64), which you select with setMode() or on the command line. All modem types have the same API (an AudioTools encoder and decoder, a Stream and a version which receives in a separate task) and the tinymodem command line tool supports all of them. Any of them can be combined with packets for error correction.

All modem types are audio modems: the encoder converts the data into PCM samples of an audio signal, and the decoder converts the samples back into data. The samples can be played and recorded with any audio hardware (DAC and ADC, I2S codec, sound card) or stay digital (WAV file, memory). None of them is a digital line code like a UART. They differ in how the bits are mapped to the audio signal: to the frequency of one or more tones (FSK, MFSK, AX.25, ggwave, Olivia, DTMF), to the timing of a tone which is switched on and off (Morse code), to the phase of one or more carriers (PSK, OFDM) or to the start frequency of a chirp (CSS).

Comparison

All values were measured with the unit tests and the command line tool in a digital loopback at 8000 Hz (ggwave: 48000 Hz, see testing). "Noise" is the level of uniform noise added in the receiver (--Xrxnoise) up to which the test data was decoded without errors: the higher, the more robust. Real audio paths (DAC, cable, speaker and microphone, ADC) are worse than these simulations, so leave a margin.

FSK 1200 MFSK 16 PSK 125 OFDM 32 AX.25 ggwave fast
Data rate 114 bytes/s 62 bytes/s 17 bytes/s (text) 380 bytes/s 1200 bit/s, framed 23 bytes/s, messages of up to 140 bytes
Bandwidth 1200 – 2200 Hz 1000 – 2875 Hz about 250 Hz 1000 – 2940 Hz 1200 – 2200 Hz 1875 – 6375 Hz
Noise 0.1 1.0 1.0 0.1 0.3 1.0
Different clocks of sender and receiver about ±2.5% ±3% ±1% ±0.2% ±1% at 48 kHz, less at 8 kHz ±0.3%
Decoder CPU on a PC (× real time) 4700 1600 6900 1800 1600 79 at 24 kHz
Interoperable with minimodem – PSK31 programs (untested) – direwolf, multimon-ng ggwave, Waver
Error detection – – – – CRC (frames with errors are dropped) Reed-Solomon (wrong messages are dropped)
Olivia 32-1000 CSS 7 Morse 20 wpm DTMF PSK QPSK125 / 8PSK125 AX.25 FX.25 / IL2P
Data rate 2.4 characters/s (7 bit text) 55 bit/s raw, about 5 bytes/s in frames about 2 characters/s 7 keys/s 17 / about 40 characters/s 1200 bit/s, framed
Bandwidth 1000 – 2000 Hz 1000 – 2000 Hz about 30 Hz at 700 Hz 697 – 1633 Hz about 250 Hz 1200 – 2200 Hz
Noise 6.0 3.0 (css9: 6.0) 2.0 1.0 1.0 / 0.5 0.6 / 0.5
Different clocks of sender and receiver ±0.2% ±0.3% (css10: ±0.05%) follows the speed (0.6 – 1.6 ×), ±15 Hz ±1.5% (frequency) ±0.5% like AX.25
Decoder CPU on a PC (× real time) 230 900 11000 7500 5100 / 5000 (8PSK250) 2900 / 1600
Interoperable with fldigi (untested) – CW programs and operators (by ear) telephones, DTMF decoders fldigi (untested) direwolf
Error detection – (strong FEC) CRC and Reed-Solomon – – – (QPSK: FEC) CRC and Reed-Solomon

The noise levels of OFDM refer to a quieter signal: OFDM sends at about a third of the level of the other modems, because the sum of its carriers has high peaks.

Which modem type should I use?

  • Exchange data with minimodem or with standard modems (Bell 103/202, RTTY, Caller-ID, NOAA SAME): FSK.
  • Speaker and microphone, noisy environment, cheap hardware with inaccurate clocks: MFSK, together with packets.
  • Highest data rate over a cable or a clean audio path: OFDM with packets, or FSK with a high baud rate if the audio path has a wide frequency range.
  • Very weak signals in a narrow band, amateur radio keyboard chat: PSK.
  • APRS position reports and packet radio: AX.25.
  • Short messages to and from phones and browsers (Waver app, ggwave), or inaudible ultrasound: ggwave.
  • Keyboard chat with extremely weak signals, compatible with fldigi: Olivia (Contestia is faster).
  • Very weak signals with your own data, framed with error correction: CSS (css9 or css10 for the weakest signals).
  • APRS and packet radio over a noisy channel: AX.25 with FX.25 (compatible with normal receivers) or IL2P.
  • Telephones, radio remote control, touch tones: DTMF.
  • Amateur radio CW, beacons, identification, historic telegraph (American Morse code): Morse.

FSK (minimodem)

Frequency shift keying with two tones (mark and space) and asynchronous framing with start and stop bits, like the classic Bell 103/202 modems. The receiver is a port of minimodem 0.24, so the library can talk to minimodem in both directions.

Advantages

  • Compatible with minimodem and with many standard modes: Bell 103 (300 baud), Bell 202 (1200 baud), V.21, RTTY, TTY/TDD, NOAA SAME, and the receive-only modes Caller-ID and UIC-751-3.
  • Any baud rate: with a wide audio path (cable) up to 12000 baud (1200 bytes/s) at 48000 Hz.
  • Simple and well understood.

Disadvantages

  • Sensitive to noise: one wrong bit changes a byte, a missed start bit loses it.
  • Binary data needs a baud rate which divides the sample rate (e.g. not 1200 baud at 8000 Hz).
  • High baud rates need high frequencies, which speakers and microphones can't reproduce.
  • No error detection.

MFSK (multi-tone FSK)

Each symbol is one of 4 to 64 tones and carries 2 to 6 bits. The symbols are much longer than FSK bits at the same data rate. The receiver finds the preamble, measures the clock of the sender and tracks the symbol timing.

Advantages

  • Very robust against noise: mfsk64 decodes without errors when the noise is stronger than the signal.
  • Tolerates different clocks of sender and receiver of ±3%: the receiver adapts to the sender.
  • Long symbols are robust against echoes, so it is the best choice for speakers and microphones.
  • All tones are between 1000 and 3000 Hz (telephone band).

Disadvantages

  • Slower than FSK and OFDM (23 to 125 bytes/s).
  • Not compatible with other programs.
  • The decoder needs more CPU with more tones (mfsk64).

PSK (PSK31 and faster)

Binary phase shift keying of a single carrier like PSK31: a 0 bit is a phase reversal with a smooth (cosine shaped) amplitude, a 1 bit keeps the phase. Characters are sent with the Varicode, in which frequent characters have short codes. The receiver tracks the frequency and the symbol timing.

Advantages

  • Very narrow band (about 60 Hz for PSK31), so many signals fit into one audio channel.
  • Very robust against noise and very efficient for text.
  • The decoder needs little CPU.
  • The same format as PSK31 to PSK500 in amateur radio programs like fldigi (not verified with these programs).

Disadvantages

  • Slow: PSK31 transmits about 4 characters per second.
  • Varicode is optimized for text: binary data is slower (bytes above 127 have codes of up to 12 bits).
  • The receiver only finds the signal if its frequency is close to the carrier (±10 Hz for PSK31, ±30 Hz for PSK125).
  • Phase distortions of the audio path (e.g. echoes) are a problem.

QPSK31 to QPSK500 add a convolutional code (rate 1/2) with a Viterbi decoder at the same speed, 8PSK125 to 8PSK1000 transmit 3 bits per symbol for higher speed with a good signal. See PSK.

OFDM

Orthogonal frequency division multiplexing: the data is sent in parallel on 16 to 64 carriers with differential QPSK (2 bits per carrier). Each symbol starts with a cyclic prefix, which absorbs echoes. A frame starts with a sync symbol (Schmidl & Cox) and a reference symbol and contains up to 512 bytes.

Advantages

  • The fastest modem in the telephone band: 3200 bit/s (about 380 bytes/s) between 1000 and 3000 Hz.
  • Echoes shorter than the cyclic prefix (2, 4 or 8 ms) don't matter.
  • Each frame has a length header, so the receiver knows exactly where the data ends.

Disadvantages

  • Needs a good signal: errors start at a lower noise level than with the other modems. Use it with packets.
  • Very sensitive to different clocks of sender and receiver: about ±0.2% (±0.1% for ofdm64).
  • The data is sent in frames: there is a delay until a frame is full or flush() is called.
  • The signal has high peaks, so it is sent with a lower average level.

AX.25 (APRS and packet radio)

The packet radio standard of amateur radio: Bell 202 AFSK with 1200 baud, NRZI coding and HDLC framing with bit stuffing and a frame check sequence. The data is a sequence of frames with source, destination and digipeater addresses. The text format (SRC>DEST,PATH:info) is the monitor format of direwolf and APRS programs, the binary format is KISS.

Advantages

  • Compatible with direwolf, multimon-ng, APRS programs and hardware TNCs: tested with direwolf in both directions.
  • Each frame has a CRC: corrupted frames are dropped.
  • KISS support for packet radio applications.

Disadvantages

  • Fixed at 1200 baud.
  • At 8000 Hz a bit has only 6.7 samples: use 22050 Hz or more, like direwolf.
  • Only frames with addresses, no plain byte stream.
  • Transmitting on the radio needs an amateur radio license.
  • On the frames with increasing noise of direwolf's test, the decoder finds a few frames less than direwolf (68 against 72 of 100).

FX.25 and IL2P add Reed-Solomon error correction: FX.25 can still be received by normal AX.25 receivers, IL2P is shorter and more robust. The receiver decodes all three formats. See AX.25.

ggwave

The protocol of ggwave: messages of up to 140 bytes with a Reed-Solomon coded length and payload between a start and an end marker. Each byte is sent as 2 of 16 tones, and 2 to 6 tones are sent at the same time. There are audible, ultrasound and dual tone (DT) protocols, each in 3 speeds.

Advantages

  • Compatible with ggwave, so with the Waver app, the ggwave web demos and its bindings: tested with ggwave's tools in both directions.
  • Robust against noise, and the error correction drops wrong messages.
  • Ultrasound protocols which most people can't hear.

Disadvantages

  • Slow (5 to 47 bytes/s) and only messages of up to 140 bytes.
  • Only sample rates which are a multiple of 187.5 Hz (48000, 24000), not 44100 Hz.
  • The audible protocols use tones up to 6.4 kHz.
  • The decoder needs much more CPU than the other modems.

Olivia and Contestia

MFSK with 2 to 256 tones and a strong forward error correction (Walsh-Hadamard codes spread over blocks of 64 symbols), like in fldigi. Contestia is the faster variant for upper case text.

Advantages

  • Extremely robust: decodes about 12 dB below the noise.
  • The same signal as fldigi; the receiver finds the timing and the frequency itself.

Disadvantages

  • Very slow (1 to 5 characters per second) and only text.
  • Needs more CPU and memory (about 30 KB for olivia-32-1000).
  • Random characters in pure noise.

Chirp spread spectrum (CSS)

Like LoRa in the audio band: each symbol is a chirp over the bandwidth, which starts at one of 2^SF frequencies and carries SF bits. The data is sent in frames with a length header, a CRC and Reed-Solomon error correction.

Advantages

  • Very robust: css9 decodes about 12 dB below the noise, and each step of the spreading factor gains about 2.5 dB.
  • Robust against frequency offsets and different clocks; tested over the air from speaker to microphone.

Disadvantages

  • Slow (10 to 156 bit/s) and frames: there is a delay until a frame is full or flush() is called.
  • The receiver needs an FFT of 2 × 2^SF points per symbol.
  • Not compatible with LoRa or other programs.

Morse code

A tone which is switched on and off: International Morse code (the default) or the American Morse code of the railroad telegraph. The receiver follows the speed of the sender.

Advantages

  • The universal mode of amateur radio, which can also be received by ear.
  • Very narrow band and very little CPU.

Disadvantages

  • Slow (about 2 characters per second at 20 wpm), only upper case text.
  • No error detection, and the tone frequency must be known (±15 Hz).

DTMF

The touch tones of telephones: each of the 16 keys is the sum of a row and a column tone.

Advantages

  • Understood by telephones, radios and DTMF decoder chips.
  • Robust and simple, all tones below 1700 Hz.

Disadvantages

  • Only 16 characters (0-9, *, #, A-D), about 7 per second.
  • No error detection.

Packets

Packets are not a modem but a layer on top of any of them (or a Serial): the data is sent in packets with a CRC and Reed-Solomon error correction. Packets which can't be corrected are dropped, so you only receive correct data. Use them with MFSK, PSK, OFDM and CSS if the data must be correct. ggwave, AX.25 and CSS already check their messages (packets add the splitting of long data). Olivia, Morse code and DTMF only transmit text.

Clone this wiki locally