Overview
Receive mode (--rx) is the default operating mode of minimodem. It captures audio input (from a microphone, line-in, or audio file), analyzes the FSK (Frequency-Shift Keying) tones, and decodes them back into the original data.
Basic Receive Usage
Start minimodem
Simply specify the baud rate (—rx is the default):Or explicitly use the receive flag:
Command-Line Options
Receive mode is the default, but can be explicitly specified:Carrier Detection
minimodem automatically detects when FSK carrier signals are present in the audio stream.Carrier Acquisition
When a valid signal is detected, minimodem displays (src/minimodem.c:1336-1348):- Baud rate: 1200 bps
- Mark frequency: 1200.0 Hz (the detected carrier frequency)
Carrier Loss
When the signal ends or becomes too weak, minimodem reports (src/minimodem.c:1469-1473):Number of data frames successfully decoded
Average signal-to-noise confidence level (higher is better)
Average signal amplitude (0.0 to 1.0 range)
Actual measured data rate in bits per second
(rate perfect): Transmitter clock matches exactly(0.5% fast): Transmitter clock is slightly fast(1.2% slow): Transmitter clock is slightly slow
Auto-Carrier Detection
By default, minimodem uses fixed frequencies for the mark and space tones. Use--auto-carrier to automatically detect the carrier frequency:
When to use auto-carrier: Useful when the transmitter uses non-standard frequencies or when the signal is off-frequency due to radio tuning, Doppler shift, or transmitter drift.
Receive Processing Algorithm
minimodem uses a sophisticated FSK demodulation algorithm (src/minimodem.c:1014-1463):Sample buffering
Reads audio samples into a circular buffer. Buffer size is automatically calculated based on frame length:
FFT analysis
Uses Fast Fourier Transform to analyze frequency content and measure mark/space tone amplitudes at expected frequencies.
Frame detection
Scans for valid data frames by correlating the expected bit pattern (start bits, data bits, stop bits) with the received signal.
Confidence scoring
Each detected frame receives a confidence score based on signal-to-noise ratio:
- Score >
confidence_threshold(default 1.5): Valid frame - Score <
confidence_threshold: Ignored as noise
Frame refinement
When carrier is first acquired or confidence drops, performs a fine-grained scan with 8 steps instead of 3 to find the optimal frame position.
Confidence Threshold
The confidence threshold controls the receive sensitivity and noise rejection:Low Threshold (< 1.5)
Pros: Decodes weaker signalsCons: More false decodes from noiseUse case: Marginal signals, distant stations
High Threshold (> 1.5)
Pros: Fewer false decodesCons: May miss valid weak signalsUse case: Strong signals, noisy environments
Confidence Search Limit
Controls the performance vs. quality tradeoff:Performance Impact: The search limit dramatically affects CPU usage. Higher values search more thoroughly for the best frame position, improving quality on difficult signals at the cost of performance.
Practical Examples
Basic Reception
- Bell 202 (1200 bps)
- Bell 103 (300 bps)
- RTTY (45.45 bps)
Binary Data Reception
Receive and decode binary data:Custom Frequencies
Bandwidth Control
Adjust the receive bandwidth for better performance:Bandwidth Selection: Narrower bandwidths provide better noise rejection but require more stable transmitter frequency. Wider bandwidths are more forgiving of frequency drift but allow more noise.
Advanced Receive Options
Decode Only One Carrier
Exit after decoding a single carrier:Custom Data Formats
Filter Non-Printable Characters
Replace non-printable characters with periods:Sync Byte Detection
For protocols that use sync bytes:Sample Rate Configuration
Higher sample rates provide better frequency resolution:Technical Details
Frame Scanning
minimodem scans the audio buffer looking for valid frames (src/minimodem.c:1236-1274):Amplitude Tracking
minimodem tracks signal amplitude with hysteresis (src/minimodem.c:1286-1288):No-Confidence Counter
Carrier is declared lost after 20 consecutive frames with insufficient confidence (src/minimodem.c:1290-1313):Output Format
Standard Output (stdout)
Decoded data bytes are written to stdout:Standard Error (stderr)
Status messages appear on stderr:Troubleshooting
No carrier detected
No carrier detected
Symptoms: No
### CARRIER ### message appearsSolutions:- Increase volume: Check input mixer levels
- Lower confidence threshold:
--confidence 1.0 - Enable auto-carrier:
--auto-carrier - Check frequencies:
--mark 1200 --space 2200 - Verify audio input: Test with audio file first
Garbled output
Garbled output
Symptoms: Random characters or binary garbageSolutions:
- Verify baud rate matches transmitter
- Check for frequency inversion: try
--inverted - Reduce noise:
--confidence 2.0 - Adjust bandwidth:
--bandwidth 100 - Check sample rate: Use 48000 Hz
Intermittent decode
Intermittent decode
Symptoms: Carrier detected but data drops outSolutions:
- Lower confidence threshold:
--confidence 1.2 - Increase search limit:
--limit 3.0 - Check audio buffer: CPU may be overloaded
- Reduce noise at source
- Use narrower bandwidth
Rate not perfect
Rate not perfect
Symptoms: NOCARRIER shows “2% fast” or “slow”Solutions:
- Small deviations (< 2%) are normal and handled automatically
- Large deviations indicate clock mismatch between transmitter/receiver
- Verify both use same sample rate
- Check for audio device timing issues
High CPU usage
High CPU usage
Symptoms: Process uses excessive CPUSolutions:
- Reduce search limit:
--limit 2.0 - Use lower sample rate:
--samplerate 48000 - Disable auto-carrier if enabled
- Use faster baudrate if possible
See Also
- Transmit Mode - Learn how to generate FSK audio
- Audio Files - Working with audio files for testing
- Real-Time Audio - Audio device configuration
- Data Transfer - Complete transmission examples