Complete installation instructions for the KiwiSDR automated recording system.
For a fresh Raspberry Pi installation, simply run:
cd /home/pi/projects/recorder
sudo ./install_kiwi_recorder.shThe installer will guide you through the process.
-
KiwiSDR Client (
/home/pi/kiwiclient/)- Cloned from official GitHub repository
- Includes kiwirecorder.py for radio reception
- Requires: git, python3-numpy, python3-scipy
-
System Dependencies
sox- Audio file manipulationlibsox-fmt-mp3- MP3 support for soxpython3-requests- HTTP client librarypython3-numpy- Numerical processingpython3-scipy- Scientific computing
-
Recorder Script (
/home/pi/kiwi_recorder.py)- Main consolidated recording script
- All-in-one: scan, record, feed, setup commands
/home/pi/
├── kiwi_recorder.py # Main script
├── requirements.txt # Python dependencies
├── kiwiclient/ # KiwiSDR client (git clone)
│ └── kiwirecorder.py
├── share/198k/ # Output directory for recordings
│ ├── *.wav # Audio files
│ ├── *.txt # Metadata sidecar files
│ ├── feed.xml # Podcast RSS feed
│ └── latest.wav # Symlink to most recent
├── kiwi_scans/ # Scan results
│ ├── scan_198_*.json # Historical scan data
│ └── latest_scan_198.json # Pointer to latest scan
└── Shipping_Forecast_SDR_Recordings.log # Main log file
Prompts for confirmation at each step:
sudo ./install_kiwi_recorder.shNo prompts, installs everything automatically:
sudo ./install_kiwi_recorder.sh --auto- Raspberry Pi (any model with network connectivity)
- At least 5GB free disk space for recordings
- Internet connection
- Raspberry Pi OS (Debian Bookworm or later)
- Python 3.9 or higher
- Root access (sudo)
If you prefer to install components individually:
sudo apt-get update
sudo apt-get install -y git python3-pip python3-numpy python3-scipy \
python3-requests sox libsox-fmt-mp3cd /home/pi
git clone https://github.com/jks-prv/kiwiclient.git
chmod +x kiwiclient/kiwirecorder.pymkdir -p /home/pi/share/198k
mkdir -p /home/pi/kiwi_scans
touch /home/pi/Shipping_Forecast_SDR_Recordings.logcd /home/pi/projects/recorder
sudo cp kiwi_recorder.py /home/pi/
sudo chmod +x /home/pi/kiwi_recorder.py
sudo cp requirements.txt /home/pi/python3 /home/pi/kiwi_recorder.py --help
python3 /home/pi/kiwiclient/kiwirecorder.py --help-
Test feed generation:
python3 /home/pi/kiwi_recorder.py feed
-
Run a scan (1-2 minutes):
python3 /home/pi/kiwi_recorder.py scan
-
Test recording (13 minutes):
python3 /home/pi/kiwi_recorder.py record
Configure cron jobs for automatic recording:
python3 /home/pi/kiwi_recorder.py setupThis creates cron jobs that:
- Scan for best receivers at 00:42 London time
- Record at 00:47 London time (main broadcast)
- Record at 05:19 London time (morning broadcast)
- Trim logs weekly
Check that everything is working:
# View recent log entries
tail -50 /home/pi/Shipping_Forecast_SDR_Recordings.log
# Check cron jobs
crontab -l
# View latest scan results (requires jq)
cat /home/pi/kiwi_scans/latest_scan_198.json | jq '.top20[] | {host, port, avg}'
# List recordings
ls -lh /home/pi/share/198k/*.wavIssue: "Python 3.9 or higher is required"
- Update your system:
sudo apt-get update && sudo apt-get upgrade - Raspberry Pi OS Bookworm includes Python 3.11
Issue: "kiwirecorder.py not found"
- The kiwiclient installation failed
- Check network connectivity
- Manually clone:
git clone https://github.com/jks-prv/kiwiclient.git /home/pi/kiwiclient
Issue: "Low disk space warning"
- Free up space or use external storage
- Recordings are ~100MB each (13 minutes, WAV format)
- Consider converting to MP3 for space savings
Issue: "python3-requests not found"
- Install manually:
sudo apt-get install python3-requests - Or check if it's already installed:
python3 -c "import requests; print(requests.__version__)"
Issue: Recording fails with timeout
- Network connectivity to KiwiSDR server may be poor
- Try running another scan to find better receivers
- Check firewall settings
View comprehensive documentation:
cat /home/pi/projects/recorder/CLAUDE.mdCheck system status:
python3 /home/pi/kiwi_recorder.py --help
python3 /home/pi/kiwiclient/kiwirecorder.py --versioncd /home/pi/projects/recorder
git pull # If using git
sudo cp kiwi_recorder.py /home/pi/cd /home/pi/kiwiclient
git pullsudo apt-get update
sudo apt-get upgradeTo remove the recorder system:
# Stop and remove cron jobs
python3 /home/pi/kiwi_recorder.py setup # Shows current setup
crontab -e # Remove the managed block
# Remove directories (CAREFUL - deletes recordings!)
rm -rf /home/pi/kiwi_scans
rm -rf /home/pi/share/198k
rm -rf /home/pi/kiwiclient
# Remove scripts
rm /home/pi/kiwi_recorder.py
rm /home/pi/requirements.txt
rm /home/pi/Shipping_Forecast_SDR_Recordings.logEdit /home/pi/kiwi_recorder.py and modify the Config class:
class Config:
# Paths
OUT_DIR = "/home/pi/share/198k" # Change output location
# Scanning
SCAN_WORKERS = 15 # Increase for faster scans
TARGET_SCAN_COUNT = 100 # Scan more receivers
# Recording
DURATION_SEC = 13 * 60 # Change recording length
FREQ_KHZ = "198" # Change frequencyTo use a different output directory (e.g., external USB drive):
- Mount your storage
- Edit
Config.OUT_DIRin kiwi_recorder.py - Create the directory:
mkdir -p /mnt/usb/recordings - Update nginx or web server config if serving files
Add to /etc/rc.local (before exit 0):
# Start KiwiSDR recorder service
su - pi -c "python3 /home/pi/kiwi_recorder.py scan" &Edit the cron jobs after running setup:
crontab -eLook for the managed block between:
# >>> KIWI-SDR AUTO (managed) >>>
# ... your jobs here ...
# <<< KIWI-SDR AUTO (managed) <<<
To serve recordings via HTTP:
# Install nginx
sudo apt-get install nginx
# Configure nginx to serve /home/pi/share/198k
sudo nano /etc/nginx/sites-available/kiwi
# Add:
server {
listen 80;
server_name cherrypi.local;
root /home/pi/share/198k;
location / {
autoindex on;
}
}
# Enable site
sudo ln -s /etc/nginx/sites-available/kiwi /etc/nginx/sites-enabled/
sudo systemctl reload nginxFor issues or questions:
- Check CLAUDE.md for detailed documentation
- Review logs:
tail -f /home/pi/Shipping_Forecast_SDR_Recordings.log - Test components individually using the commands above
This project uses:
- KiwiSDR client: BSD license (https://github.com/jks-prv/kiwiclient)
- Recorder script: Custom implementation