-
-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
Complete guide to installing pyMC Repeater on your Raspberry Pi.
- Raspberry Pi (Zero W, 3, 4, or 5)
- SX1262 LoRa Module (e.g., Waveshare LoRa HAT)
- MicroSD Card (8GB minimum, 16GB+ recommended)
- Power Supply (appropriate for your Pi model)
- Antenna (868/915 MHz depending on region)
- Raspberry Pi OS (Bookworm or newer recommended)
- Python 3.9+ (included in recent Pi OS)
- Internet connection (for initial setup)
The easiest way to install pyMC Repeater is using the interactive management script:
# Clone the repository
git clone https://github.com/rightup/pyMC_Repeater.git
cd pyMC_Repeater
# Run the installer
sudo ./manage.sh installThe installer will:
- Enable SPI interface (with reboot if needed)
- Install system dependencies
- Create service user and directories
- Install Python packages
- Configure systemd service
- Launch interactive radio configuration
If you prefer manual installation or need more control:
sudo raspi-config
# Navigate to: Interface Options → SPI → EnableOr edit /boot/firmware/config.txt directly:
echo "dtparam=spi=on" | sudo tee -a /boot/firmware/config.txt
sudo rebootsudo apt-get update
sudo apt-get install -y libffi-dev jq pip python3-rrdtool wgetYQ_VERSION="v4.40.5"
YQ_BINARY="yq_linux_arm64" # or yq_linux_amd64 for 64-bit x86
sudo wget -qO /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}"
sudo chmod +x /usr/local/bin/yqsudo useradd --system --home /var/lib/pymc_repeater --shell /sbin/nologin repeater
sudo usermod -a -G gpio,i2c,spi,dialout repeatersudo mkdir -p /opt/pymc_repeater /etc/pymc_repeater /var/log/pymc_repeater /var/lib/pymc_repeatersudo cp -r repeater /opt/pymc_repeater/
sudo cp pyproject.toml README.md /opt/pymc_repeater/
sudo cp config.yaml.example /etc/pymc_repeater/config.yaml.example
sudo cp config.yaml.example /etc/pymc_repeater/config.yamlcd /opt/pymc_repeater
sudo pip install --break-system-packages -e .sudo cp pymc-repeater.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable pymc-repeatersudo chown -R repeater:repeater /opt/pymc_repeater /etc/pymc_repeater /var/log/pymc_repeater /var/lib/pymc_repeater
sudo chmod 750 /etc/pymc_repeater /var/log/pymc_repeater /var/lib/pymc_repeaterEdit /etc/pymc_repeater/config.yaml - see Configuration Guide for details.
sudo systemctl start pymc-repeaterCheck service status:
sudo systemctl status pymc-repeaterView logs:
journalctl -u pymc-repeater -fAccess web interface:
http://<raspberry-pi-ip>:8000
Run the radio configuration helper:
cd /path/to/pyMC_Repeater
sudo ./setup-radio-config.sh /etc/pymc_repeaterOr edit /etc/pymc_repeater/config.yaml manually - see Configuration Reference.
Generate a new identity:
# Identity is auto-generated on first start
# Find it in: /var/lib/pymc_repeater/identity.keyOr provide your own:
# In config.yaml:
repeater:
identity_file: "/etc/pymc_repeater/my_identity.key"To upgrade to the latest version:
cd pyMC_Repeater
git pull
sudo ./manage.sh upgradeThe upgrade process preserves your configuration and data.
To completely remove pyMC Repeater:
sudo ./manage.sh uninstallThis removes all files except a configuration backup in /tmp/.
Check logs for errors:
journalctl -u pymc-repeater -n 50Common issues:
- SPI not enabled → Run
sudo raspi-config - Wrong GPIO pins → Check
sx1262section in config - Permission errors → Verify service user has correct groups
Verify SPI is working:
ls -l /dev/spidev*
# Should show: /dev/spidev0.0 and /dev/spidev0.1Check module is loaded:
lsmod | grep spiCheck service is running:
sudo systemctl status pymc-repeaterVerify port 8000 is listening:
sudo netstat -tulpn | grep 8000Check firewall rules if using one.
- Hardware Setup - Verify GPIO wiring
- Configuration Guide - Configure your repeater
- First Boot - Test your installation
- LetsMesh Integration - Enable cloud monitoring