Overview
Transmit mode (--tx) converts data from standard input into FSK (Frequency-Shift Keying) audio tones. minimodem reads data byte-by-byte and modulates it into audio signals that can be played through speakers, written to audio files, or transmitted over radio.
Basic Transmit Usage
Command-Line Options
The transmit mode is activated using any of these equivalent flags:Interactive Transmission
When transmitting to a real-time audio device (not a file), minimodem operates in interactive mode:Interactive Mode Features
Leader Tone
Transmits 2 bits of mark tone before data to establish carrier
Trailer Tone
Transmits 2 bits of mark tone after data to complete transmission
Idle Carrier
Emits mark tone during input pauses (1/25 second timeout)
Auto Flush
Adds 0.5 seconds of silence to flush audio buffers
Transmit Workflow
Here’s how minimodem processes data in transmit mode (from src/minimodem.c:114-250):Generate tones
- Mark frequency (logical 1): Higher frequency tone
- Space frequency (logical 0): Lower frequency tone
- Each bit is transmitted for exactly
1/baud_rateseconds
Practical Examples
Text Transmission
- Bell 202 (1200 bps)
- Bell 103 (300 bps)
- RTTY (45.45 bps)
- Mark: 1200 Hz
- Space: 2200 Hz
- 8 data bits + 1 start + 1 stop
Binary Data Transmission
Transmit binary files by piping them directly:Custom Frequencies
Override the default mark and space frequencies:Volume Control
Adjust transmission amplitude:Advanced Transmit Options
Custom Frame Format
Modify the data frame structure:Sync Bytes
Add synchronization bytes at the start of transmission:Continuous Carrier
Keep the carrier tone active even when idle:The
--tx-carrier option prevents the carrier from dropping during input pauses, maintaining a constant presence for radio applications where rapid carrier on/off switching is undesirable.Sample Rate Control
Change the audio sample rate:Technical Details
Tone Generation
minimodem uses a sine wave lookup table (LUT) for efficient tone generation (src/minimodem.c:979):Performance: The default LUT size of 4096 entries provides excellent quality with minimal CPU usage. Larger tables use more memory but don’t significantly improve quality.
Frame Transmission
Each data byte is transmitted as a frame with this structure:Start bits
Transmitted as space frequency (or mark if
--invert-start-stop)- Default: 1 start bit
- Duration:
1/baud_rateseconds per bit
Data bits
Transmitted LSB-first (unless
--msb-first specified)- 5 bits for Baudot
- 7 or 8 bits for ASCII
- Custom bit counts supported
Timing Accuracy
Bit timing is calculated as (src/minimodem.c:132):- Samples per bit: 48000 / 1200 = 40 samples
- Bit duration: 40 / 48000 = 0.833 ms
Troubleshooting
No audio output
No audio output
- Check volume:
minimodem --tx 1200 --volume 1.0 - Verify audio device:
minimodem --tx 1200 --alsa=hw:0,0 - Test with file output:
minimodem --tx 1200 --file test.wav
Distorted audio
Distorted audio
- Reduce volume:
--volume 0.5 - Check sample rate compatibility
- Ensure CPU is not overloaded (shouldn’t be an issue with minimodem)
Data not transmitting
Data not transmitting
- Verify stdin has data:
echo "TEST" | minimodem --tx 1200 - Check for EOT marker:
minimodem --tx 1200 --print-eot - Enable quiet mode to reduce stderr noise:
minimodem --tx 1200 --quiet
Wrong frequency
Wrong frequency
- Explicitly set frequencies:
--mark 1200 --space 2200 - Verify baud mode:
minimodem --tx 1200notminimodem --tx 300 - Check for frequency inversion: remove
--invertedif present
See Also
- Receive Mode - Learn how to decode FSK audio
- Audio Files - Working with audio files instead of real-time audio
- Data Transfer - Complete examples of bidirectional data transfer