Documentation Index Fetch the complete documentation index at: https://mintlify.com/kamalmostafa/minimodem/llms.txt
Use this file to discover all available pages before exploring further.
Practical examples covering common minimodem use cases.
Basic Communication
Simple Text Transfer
Transfer text between two computers using audio:
echo "Hello from computer A" | minimodem --tx 1200
Output: ### CARRIER 1200 @ 1200.0 Hz ###
Hello from computer A
### NOCARRIER ndata=22 confidence=2.145 ampl=0.850 bps=1200.00 ###
Interactive Chat
Type messages in real-time:
# Start transmitter (type and press Enter for each message)
minimodem --tx 1200
# On another computer/terminal
minimodem --rx 1200
Press Ctrl+D to end transmission.
File Transfer
Send a Text File
# Transmit
cat document.txt | minimodem --tx 1200
# Receive
minimodem --rx 1200 > received_document.txt
Send Binary Data
Transfer any file type:
cat image.jpg | minimodem --tx --binary-output 1200
For binary files, verify data integrity with checksums: md5sum original.jpg received.jpg
Large File with Compression
Compress before transmission:
# Transmit
gzip -c largefile.dat | minimodem --tx 1200
# Receive
minimodem --rx 1200 | gunzip > largefile.dat
Audio File Processing
Record and Decode Later
Record audio first, decode later:
# Record transmission to file (using arecord, sox, or similar)
arecord -f S16_LE -r 48000 recording.wav
minimodem --rx --file recording.wav 1200 > decoded.txt
Create Audio Files
Generate audio files from data:
# Create WAV file with encoded message
echo "This is a test" | minimodem --tx --file message.wav 1200
# Play it back later
minimodem --rx --file message.wav 1200
Batch Process Multiple Files
Decode multiple recordings:
#!/bin/bash
for file in recordings/*.wav ; do
echo "Processing $file ..."
minimodem --rx --rx-one --file " $file " 1200 > "${ file % . wav }.txt"
done
Radio Communication
Amateur Radio RTTY
Classic radioteletype:
echo "CQ CQ CQ DE W1ABC W1ABC K" | minimodem --tx rtty
HF Radio with Custom Frequencies
Use specific mark/space tones for radio:
# USB mode, 1000/1200 Hz shift
minimodem --tx -M 1000 -S 1200 300
# Receive with matching settings
minimodem --rx -M 1000 -S 1200 300
NOAA Weather Radio
Decode SAME alerts from weather radio:
# From radio connected to sound card
minimodem --rx same
# From recording
minimodem --rx --file weather_alert.wav same
Example output:
ZCZC-WXR-012345-678901+0123-1234567-NNNN-
Telephone/Modem Emulation
Caller ID Decoding
Decode phone caller ID:
# Record caller ID signal from phone line
# (requires appropriate audio interface)
minimodem --rx callerid
Bell 103 Modem
Emulate classic 300 baud modem:
# Transmit at 300 baud (Bell 103)
cat data.txt | minimodem --tx 300
# Receive
minimodem --rx 300 > received.txt
Advanced Configurations
Custom Protocol
Implement a custom FSK protocol:
# 7-bit data, 2 start bits, 1.5 stop bits, custom frequencies
minimodem --tx -7 --startbits=2 --stopbits=1.5 \
-M 2200 -S 1200 600
# Matching receiver
minimodem --rx -7 --startbits=2 --stopbits=1.5 \
-M 2200 -S 1200 600
High-Speed Transfer
Push to higher baud rates:
# Try 2400 baud (requires good audio path)
minimodem --tx 2400
minimodem --rx 2400
# Or even 4800 baud
minimodem --tx 4800
minimodem --rx --bandwidth 300 4800
Low-Speed RTTY Variants
Custom RTTY-like modes:
# 50 baud Baudot
minimodem --tx --baudot 50
# 75 baud with custom shift
minimodem --tx --baudot -M 1445 -S 1275 75
Testing and Debugging
Loopback Test
Test with audio loopback:
# Terminal 1
echo "test" | minimodem --tx 1200
# Terminal 2 (with audio looped back)
minimodem --rx 1200
On Linux, use PulseAudio module-loopback: pactl load-module module-loopback latency_msec= 1
Frequency Verification
Check actual frequencies in use:
# Generate test tone and inspect with spectrum analyzer
minimodem --tx --tx-carrier 1200
# Use sox or other tool to visualize
rec -r 48000 -c 1 test.wav &
minimodem --tx --tx-carrier 1200
# ... stop after a few seconds
sox test.wav -n spectrogram
Signal Quality Testing
Test different confidence thresholds:
# Very sensitive (may have false detections)
minimodem --rx --confidence 1.0 1200
# Normal
minimodem --rx --confidence 1.5 1200
# Strict (clean signals only)
minimodem --rx --confidence 3.0 1200
Noisy Channel Simulation
Test robustness:
# Add background noise to recording
sox recording.wav -p --norm | \
sox -m - noise.wav noisy_recording.wav
# Try to decode
minimodem --rx --file noisy_recording.wav \
--confidence 2.0 --limit 3.5 1200
Scripting Examples
Automated Data Logger
Continuously log received data:
#!/bin/bash
LOGDIR = "logs"
mkdir -p " $LOGDIR "
while true ; do
TIMESTAMP = $( date +%Y%m%d_%H%M%S )
LOGFILE = " $LOGDIR /data_ $TIMESTAMP .txt"
echo "Listening... (log: $LOGFILE )"
minimodem --rx --rx-one 1200 > " $LOGFILE " 2>&1
# Add small delay before next listen
sleep 1
done
Error Correction Wrapper
Add simple error detection:
#!/bin/bash
# tx_with_checksum.sh
data = " $1 "
checksum = $( echo -n " $data " | md5sum | cut -d ' ' -f1 )
echo "${ data }|${ checksum }" | minimodem --tx 1200
#!/bin/bash
# rx_with_verify.sh
received = $( minimodem --rx --rx-one --quiet 1200 )
data = $( echo " $received " | cut -d '|' -f1 )
rcvd_sum = $( echo " $received " | cut -d '|' -f2 )
calc_sum = $( echo -n " $data " | md5sum | cut -d ' ' -f1 )
if [ " $rcvd_sum " = " $calc_sum " ]; then
echo "OK: $data "
else
echo "ERROR: Checksum mismatch"
exit 1
fi
Retry on Failure
Automatically retry failed receptions:
#!/bin/bash
MAX_RETRIES = 3
for i in $( seq 1 $MAX_RETRIES ); do
echo "Attempt $i of $MAX_RETRIES ..."
if timeout 30 minimodem --rx --rx-one 1200 > output.txt 2>&1 ; then
if [ -s output.txt ]; then
echo "Success!"
exit 0
fi
fi
echo "Failed, retrying..."
sleep 2
done
echo "All attempts failed"
exit 1
Integration Examples
With GNU Radio
Pipe to/from GNU Radio:
# Receive from GNU Radio flowgraph
# (flowgraph outputs audio to stdout)
./gr_flowgraph.py | minimodem --rx --file /dev/stdin 1200
With netcat
Network to audio bridge:
# Receive from network, transmit as audio
nc -l 12345 | minimodem --tx 1200
# Receive audio, send to network
minimodem --rx 1200 | nc remote_host 12345
With socat
Serial port bridge:
# Serial to audio
socat /dev/ttyUSB0,raw,echo=0,b9600 - | minimodem --tx 1200
# Audio to serial
minimodem --rx 1200 | socat - /dev/ttyUSB0,raw,echo=0,b9600
Real-World Scenarios
Emergency Communication
Air-gapped data transfer:
# Computer A (no network, has speakers)
cat emergency_message.txt | minimodem --tx 300
# Computer B (no network, has microphone)
minimodem --rx 300 > received_message.txt
Use 300 baud for maximum reliability in difficult conditions.
Data Over Intercom
Send data through building intercom system:
# Transmit (into intercom)
echo "Door code: 1234" | minimodem --tx --volume 0.6 300
# Receive (from intercom speaker)
minimodem --rx --confidence 2.0 300
Acoustic Data Transfer
Air-gapped systems or underwater communication:
# High-volume transmission
minimodem --tx --volume 1.0 300
# Sensitive reception
minimodem --rx --confidence 1.8 --limit 3.0 300
Radio Beacon
Continuous identification beacon:
#!/bin/bash
while true ; do
echo "BEACON ID:W1ABC GRID:FN42 $( date -u +%H%M)Z" | \
minimodem --tx rtty
sleep 300 # Every 5 minutes
done
Low-Latency Mode
Minimize decode latency:
minimodem --rx --limit 1.5 --confidence 1.2 \
--samplerate 22050 1200
High-Quality Recording
Maximum quality for file output:
cat data.txt | minimodem --tx --file output.flac \
--volume 0.8 --lut 8192 --float-samples \
--samplerate 96000 1200
Low-Resource System
Minimize CPU/memory usage:
minimodem --rx --samplerate 22050 --limit 2.0 1200
Troubleshooting Examples
Too Many Errors
Increase robustness:
# Reduce baud rate
minimodem --rx 300 # instead of 1200
# Adjust confidence
minimodem --rx --confidence 2.5 --limit 3.5 1200
# Narrow bandwidth
minimodem --rx --bandwidth 100 1200
No Carrier Detection
Diagnose frequency issues:
# Try auto-detect
minimodem --rx --auto-carrier 1200
# Check inverted
minimodem --rx --inverted 1200
# Reduce confidence threshold
minimodem --rx --confidence 1.0 1200
Audio Level Issues
# Increase TX volume
minimodem --tx --volume 1.0 1200
# Check audio levels
arecord -D default -f S16_LE -r 48000 -c 1 test.wav
aplay test.wav # Listen for proper level
See Also
Overview CLI basics and syntax
Modes Transmit and receive modes
Options Complete options reference