Skip to content

Command Line

pschatzmann edited this page Oct 29, 2026 · 4 revisions

tools/tinymodem is a desktop program which supports all modem types of TinyModem. Data is read from stdin (transmit) or written to stdout (receive); the status messages (### CARRIER / ### NOCARRIER) go to stderr. For the FSK modes, the options and the output are the same as minimodem's, so tinymodem can replace minimodem in scripts.

Build

You need CMake ≥ 3.18 and a C++17 compiler. PortAudio (portaudio19-dev on Debian/Ubuntu) is optional: with it you can use the sound card, without it only --file works.

cmake -S . -B build
cmake --build build
sudo cmake --install build   # optional: installs bin/tinymodem

The arduino-audio-tools are taken from ../arduino-audio-tools if that folder exists (the usual Arduino libraries layout). Otherwise they are downloaded. Use -DAUDIO_TOOLS_DIR=/path to select another copy.

CMake option Default
TINYMODEM_BUILD_TOOLS ON Build the command line tool
TINYMODEM_BUILD_TESTS ON Build the tests
TINYMODEM_PORTAUDIO ON Use PortAudio if found
MINIMODEM_REFERENCE auto Original minimodem for the interop tests
DIREWOLF_ATEST, DIREWOLF_GEN_PACKETS auto direwolf tools for the AX.25, FX.25 and IL2P interop tests
GGWAVE_TO_FILE, GGWAVE_FROM_FILE auto ggwave tools for the ggwave interop tests

Usage

tinymodem [--tx|--rx] [options] {mode}
# transmit to a WAV file and decode it again
echo "Hello" | ./build/tinymodem --tx -f hello.wav mfsk16
./build/tinymodem --rx -f hello.wav mfsk16

# sound card (PortAudio)
echo "Hello" | ./build/tinymodem --tx 1200
./build/tinymodem --rx 1200            # Ctrl-C to stop

# reliable file transfer with error correction
./build/tinymodem --tx --packets -f data.wav ofdm32 < file.bin
./build/tinymodem --rx --packets -f data.wav ofdm32 > file.bin

# APRS
echo "N0CALL>APRS:>Hello" | ./build/tinymodem --tx -f aprs.wav aprs
./build/tinymodem --rx -f aprs.wav aprs

# ggwave (e.g. received by the Waver app)
echo -n "Hello" | ./build/tinymodem --tx ggwave-fast

# weak signals
echo "CQ de N0CALL" | ./build/tinymodem --tx -f cq.wav olivia-8-250
echo "Hello" | ./build/tinymodem --tx -f hello.wav css9

# touch tones
echo -n "*123#" | ./build/tinymodem --tx dtmf

# Morse code
echo "CQ CQ DE N0CALL K" | ./build/tinymodem --tx morse-25
echo "WHAT HATH GOD WROUGHT" | ./build/tinymodem --tx morse-american-15

Without --file, transmit is interactive like minimodem: the transmission is ended when stdin pauses for more than one symbol, and --tx-carrier keeps the idle signal on (FSK, PSK, AX.25).

Modes

Mode Modem type
1200, 300, any number, rtty, tdd, same, V.21, callerid, uic-train, uic-ground FSK compatible with minimodem
mfsk4, mfsk8, mfsk16, mfsk32, mfsk64 MFSK
psk31, psk63, psk125, psk250, psk500 PSK BPSK like fldigi
qpsk31, qpsk63, qpsk125, qpsk250, qpsk500 PSK QPSK with FEC like fldigi
8psk125, 8psk250, 8psk500, 8psk1000 PSK 8PSK without FEC like fldigi
ofdm16, ofdm32, ofdm64 OFDM
aprs, ax25 AX.25 compatible with direwolf
fx25, fx25-32, fx25-64, il2p AX.25 FX.25 and IL2P, compatible with direwolf (the receiver decodes all formats in every AX.25 mode)
ggwave-normal, ggwave-fast (ggwave), ggwave-fastest, ggwave-u-normal, ggwave-u-fast, ggwave-u-fastest, ggwave-dt-normal, ggwave-dt-fast, ggwave-dt-fastest ggwave compatible with ggwave
olivia-T-B (e.g. olivia-8-250, olivia = olivia-32-1000), contestia-T-B (contestia = contestia-8-250) Olivia like fldigi
css5 … css10 (css = css7), with bandwidth e.g. css9-500 CSS chirp spread spectrum
dtmf DTMF touch tones
morse, cw (International, 20 wpm), morse-N / cwN (N wpm), morse-american, morse-american-N Morse International (default) and American Morse code

Options

Option Modem types
-t, --tx / -r, --rx all Transmit / receive (default)
-f, --file {file.wav} all WAV file instead of the sound card
-R, --samplerate {rate} all Sample rate (default 48000)
-v, --volume {amplitude} all Transmit amplitude (E = epsilon)
-q, --quiet all No status messages
--Xrxnoise {level} all Testing: add uniform noise to the input
--packets all except AX.25, Olivia, Morse and DTMF Packets with CRC and Reed-Solomon error correction
--rx-one all except AX.25 Stop after the first transmission
-M, --mark {freq} all except ggwave and DTMF FSK and AX.25: mark tone, MFSK: lowest tone, PSK: carrier, OFDM: first carrier, Olivia and CSS: center frequency, Morse: tone
-S, --space {freq} FSK, AX.25 Space tone
--tx-carrier FSK, PSK, AX.25 Keep the idle signal on while stdin pauses
--print-eot all Print ### EOT at the end of each transmission
--kiss AX.25 KISS frames instead of the monitor text format
--benchmarks Throughput of the FSK and MFSK modems
-A, --alsa, -s, --sndio Use the default PortAudio device
-c, -l, -a, -i, -8, -7, -5, -u, -b, --startbits, --stopbits, --invert-start-stop, --sync-byte, --msb-first, --binary-output, --binary-raw, --print-filter FSK See FSK

Differences to minimodem

  • Only WAV files are supported (8, 16, 24 or 32-bit PCM, or 32-bit float, mono or multi-channel, where the first channel is decoded). The original supports all libsndfile formats, like FLAC.
  • Transmit always writes 16-bit PCM. --float-samples and --lut are accepted but have no effect.
  • --alsa and --sndio use the default PortAudio device. A device name is ignored.
  • --Xrxnoise adds real uniform noise. In the original, an integer division makes it a constant DC offset.
  • The modes MFSK, PSK, OFDM, AX.25, ggwave, Olivia, CSS, Morse, DTMF and the options --packets and --kiss are extensions.

Clone this wiki locally