Skip to main content
minimodem operates in one of two modes: transmit (TX) or receive (RX). The mode determines whether minimodem encodes data into audio or decodes audio into data.

Mode Selection

--tx
flag
Transmit mode: encode data to audioAliases: -t, --transmit, --write
--rx
flag
Receive mode: decode audio to data (default)Aliases: -r, --receive, --read
You cannot specify both --tx and --rx in the same command. Attempting to do so will result in an error.

Transmit Mode (—tx)

In transmit mode, minimodem reads data from standard input and generates FSK audio output.

Basic Operation

minimodem --tx 1200
Type your message and press Ctrl+D (EOF) to complete transmission.

Audio Output

By default, transmit mode outputs audio to your system’s default audio playback device:
# Outputs to speakers/headphones
echo "test" | minimodem --tx 1200

Transmission Behavior

Transmit mode includes several automatic behaviors:
A brief leader tone (mark frequency) is transmitted before data to help receivers acquire carrier lock. This is 2 bits in length by default.Disabled if: --startbits=0 is specified
A trailer tone (mark frequency) is transmitted after data ends to ensure complete transmission. This is 2 bits in length by default.
When transmitting to audio devices (not files), minimodem operates in interactive mode:
  • Monitors stdin for input
  • Starts transmitting when data arrives
  • Automatically stops after a brief timeout when input pauses
  • Can use --tx-carrier to maintain continuous carrier
For protocols like SAME that require synchronization, minimodem automatically transmits sync byte preambles:
minimodem --tx --sync-byte=0xAB same
This transmits 16 sync bytes before actual data.

TX-Specific Options

--volume
float
default:"1.0"
Output amplitude (0.0 to 1.0, or ‘E’ for FLT_EPSILON)Flag: -v
minimodem --tx --volume 0.5 1200
--lut
integer
default:"4096"
Sine wave lookup table length for TX tone generationLarger values provide higher quality but use more memory.
minimodem --tx --lut=8192 1200
--tx-carrier
flag
Transmit continuous carrier toneMaintains carrier signal even when no data is being sent (outputs idle mark tone).
minimodem --tx --tx-carrier 1200
--print-eot
flag
Print ”### EOT” message when transmission endsUseful for debugging or monitoring transmission completion.

Transmit Examples

echo "Testing" | minimodem --tx 1200

Receive Mode (—rx)

In receive mode, minimodem captures audio input, demodulates FSK signals, and outputs decoded data to standard output.

Basic Operation

minimodem --rx 1200
Captures audio from your default microphone/line-in device and decodes in real-time.

Carrier Detection

Receive mode automatically detects carrier signals:
  1. Scanning: Searches for FSK carrier in the audio input
  2. Acquisition: When carrier is detected, displays ### CARRIER message
  3. Decoding: Demodulates and outputs data while carrier is present
  4. Loss: When signal is lost, displays ### NOCARRIER with statistics
### CARRIER 1200 @ 1200.0 Hz ###
Hello World
### NOCARRIER ndata=11 confidence=2.145 ampl=0.850 bps=1200.00 ###
Carrier detection messages are printed to stderr, while decoded data goes to stdout. This allows you to separate the data from status messages:
minimodem --rx 1200 > data.txt 2> status.log

Auto-Carrier Detection

--auto-carrier
flag
Automatically detect carrier frequencyFlag: -aInstead of using fixed mark/space frequencies, minimodem will scan the audio spectrum to find the carrier.
minimodem --rx --auto-carrier 1200
This is useful when:
  • The exact carrier frequency is unknown
  • The transmitter frequency may drift
  • Multiple signals may be present
Auto-carrier detection may not work well with all protocols. It is not recommended for callerid mode.

Signal Quality

Receive mode monitors signal quality through confidence values:
--confidence
float
default:"1.5"
Minimum confidence threshold for signal detectionFlag: -cLower values accept weaker/noisier signals but may increase errors. Higher values require cleaner signals.
minimodem --rx --confidence 2.0 1200
--limit
float
default:"2.3"
Maximum confidence search limitFlag: -lControls performance vs. quality tradeoff:
  • Lower values: faster performance, may miss optimal frame positions
  • Higher values: better quality for noisy signals, slower
  • INFINITY: search exhaustively for best frame
minimodem --rx --limit 3.0 1200

RX-Specific Options

--rx-one
flag
Exit after receiving one complete transmissionUseful for scripting or batch processing of audio files:
minimodem --rx --rx-one --file recording.wav 1200
--bandwidth
float
RX filter bandwidth in HzFlag: -bNarrows or widens the receive filter:
  • Narrower: better noise rejection, requires accurate tuning
  • Wider: more tolerant of frequency errors, more noise
minimodem --rx --bandwidth 100 1200

Receive Examples

minimodem --rx 1200

Common Workflows

Two-Way Communication

# Terminal 1: Send data
cat message.txt | minimodem --tx 1200

Test Loop

Test minimodem by looping audio output back to input:
# Terminal 1
echo "test message" | minimodem --tx 1200

# Terminal 2 (with audio looped back)
minimodem --rx 1200
On Linux, you can use PulseAudio or ALSA loopback devices to route audio internally without physical cables.

File Processing

Batch process multiple audio files:
#!/bin/bash
for file in *.wav; do
    echo "Processing $file..."
    minimodem --rx --rx-one --file "$file" 1200 > "${file%.wav}.txt"
done

Mode Comparison

FeatureTransmit (—tx)Receive (—rx)
Inputstdin (data)Audio device or file
OutputAudio device or filestdout (data)
Sample FormatS16 or FloatFloat only (for FFT)
InteractiveYes (with timing)Continuous
Status MessagesEOT (optional)CARRIER/NOCARRIER
Auto-frequencyNoYes (with —auto-carrier)
Signal QualityN/AConfidence metrics

Build docs developers (and LLMs) love