-
-
Notifications
You must be signed in to change notification settings - Fork 15
Troubleshooting
Common issues and solutions for pyMC Repeater.
# Check service status
sudo systemctl status pymc-repeater
# View recent logs
journalctl -u pymc-repeater -n 100
# Live log monitoring
journalctl -u pymc-repeater -f
# Check configuration
yq eval '.' /etc/pymc_repeater/config.yaml
# Verify SPI
ls -l /dev/spidev*Symptoms:
● pymc-repeater.service - failed
Check logs:
journalctl -u pymc-repeater -n 50Common causes:
-
SPI Not Enabled
sudo raspi-config # Interface Options → SPI → Enable sudo reboot -
Wrong GPIO Configuration
- Verify
sx1262section in/etc/pymc_repeater/config.yaml - Check BCM pin numbers match your hardware
- Verify
-
Missing Dependencies
cd /opt/pymc_repeater sudo pip install --break-system-packages -e .
-
Permission Issues
sudo chown -R repeater:repeater /opt/pymc_repeater /etc/pymc_repeater /var/lib/pymc_repeater sudo usermod -a -G gpio,spi repeater
Check for issues:
# Recent crashes
journalctl -u pymc-repeater --since "1 hour ago"
Solutions:
- Reduce
logging.levelfrom DEBUG to INFO - Add cooling (heatsink/fan)
- Check power supply capacity
- Review configuration for errors
Error: Failed to initialize radio hardware
Solutions:
-
Verify SPI enabled:
lsmod | grep spi ls -l /dev/spidev*
-
Check GPIO configuration:
sx1262: cs_pin: 21 reset_pin: 18 busy_pin: 20 irq_pin: 16
-
Test with different pins if custom wiring
-
Verify 3.3V power to module
-
Check for loose connections
Symptoms: Service running, but no packets in logs/dashboard
Check:
-
Radio settings match network:
radio: frequency: 869618000 # Must match other nodes spreading_factor: 8 bandwidth: 62500 coding_rate: 8 sync_word: 13380
-
Antenna connected properly
-
Check TX power:
radio: tx_power: 14 # Try increasing to 20
-
Verify other nodes are transmitting
-
Check logs for received packets:
journalctl -u pymc-repeater
Symptoms: Low RSSI, high packet loss
Solutions:
-
Check antenna:
- Proper 868/915 MHz antenna
- Secure connection
- Vertical orientation
- Away from metal
-
Increase TX power:
radio: tx_power: 20 # Maximum for most modules
-
Optimize placement:
- Higher location
- Clear line of sight
- Away from interference sources
-
Monitor signal:
# Watch RSSI/SNR in logs journalctl -u pymc-repeater -f | grep -i rssi
Check service is running:
sudo systemctl status pymc-repeaterVerify port 8000 listening:
sudo netstat -tulpn | grep 8000Test from Pi itself:
curl http://localhost:8000Check firewall (if enabled):
sudo ufw status
sudo ufw allow 8000/tcpFind Pi's IP address:
ip addSymptoms: No status updates on LetsMesh dashboard
Check configuration:
letsmesh:
enabled: true
iata_code: "NYC" # Set your location code
broker_index: 0 # 0=EU, 1=US
status_interval: 60Verify internet connectivity:
ping -c 4 mqtt-eu-v1.letsmesh.net
curl -I https://analyzer.letsmesh.shCheck logs for errors:
journalctl -u pymc-repeater | grep -i letsmeshCommon errors:
- JWT token errors - Fixed in v1.0.5+
-
Wrong broker - Check
broker_index - Network blocked - Check firewall for port 443
Check configuration:
storage:
mqtt:
enabled: true
broker: "localhost"
port: 1883Test MQTT broker:
# Install mosquitto-clients
sudo apt-get install mosquitto-clients
# Subscribe to test
mosquitto_sub -h localhost -t "meshcore/#" -vCheck broker running:
sudo systemctl status mosquittoError: Error parsing config.yaml
Test syntax:
yq eval '.' /etc/pymc_repeater/config.yamlCommon mistakes:
- Missing colons after keys
- Wrong indentation (use 2 spaces)
- Tabs instead of spaces
- Unquoted special characters
After editing config, restart service:
sudo systemctl restart pymc-repeaterVerify config loaded:
journalctl -u pymc-repeater -n 50 | grep -i configUse manage script for upgrades:
sudo bash manage.sh upgradeThis preserves your configuration while adding new options.
Check current usage:
top -u repeaterCommon causes:
-
DEBUG logging
logging: level: INFO # Change from DEBUG
-
High packet rate - Normal for busy networks
-
Database operations - Check SQLite file size
Monitor:
# CPU temperature
vcgencmd measure_temp
# Process stats
ps aux | grep repeaterCheck memory:
free -hSolutions:
- Reduce
repeater.cache_ttl - Clean up old database records
- Restart service periodically
Check disk usage:
df -h
du -sh /var/lib/pymc_repeater/*Clean up old data:
storage:
retention:
sqlite_cleanup_days: 7 # Reduce from 31Manual cleanup:
# Delete old SQLite records
sqlite3 /var/lib/pymc_repeater/repeater.db "DELETE FROM packets WHERE timestamp < strftime('%s', 'now', '-7 days')"
# Vacuum database
sqlite3 /var/lib/pymc_repeater/repeater.db "VACUUM"Symptoms: Configuration lost or broken after upgrade
Solution:
# Restore from backup
sudo cp /etc/pymc_repeater.backup.*/config.yaml /etc/pymc_repeater/
# Restart service
sudo systemctl restart pymc-repeaterManual merge:
# Compare old and new
diff /etc/pymc_repeater.backup.*/config.yaml /etc/pymc_repeater/config.yaml.exampleCheck Python dependencies:
cd /opt/pymc_repeater
sudo pip install --break-system-packages -e . --force-reinstallVerify systemd service:
sudo systemctl daemon-reload
sudo systemctl restart pymc-repeaterSymptoms: Service crashes, database errors in logs
Check integrity:
sqlite3 /var/lib/pymc_repeater/repeater.db "PRAGMA integrity_check"Backup and repair:
# Stop service
sudo systemctl stop pymc-repeater
# Backup
sudo cp /var/lib/pymc_repeater/repeater.db /var/lib/pymc_repeater/repeater.db.backup
# Repair
sqlite3 /var/lib/pymc_repeater/repeater.db ".recover" | sqlite3 /var/lib/pymc_repeater/repeater_new.db
sudo mv /var/lib/pymc_repeater/repeater_new.db /var/lib/pymc_repeater/repeater.db
# Restart
sudo systemctl start pymc-repeaterSymptoms: No RRD graphs, missing historical data
Check RRD files:
ls -lh /var/lib/pymc_repeater/*.rrdRecreate if missing:
# Service will auto-create on next start
sudo systemctl restart pymc-repeaterlogging:
level: DEBUGsudo systemctl restart pymc-repeater
journalctl -u pymc-repeater -f# System info
uname -a
cat /etc/os-release
# Service status
sudo systemctl status pymc-repeater
# Recent logs
journalctl -u pymc-repeater -n 200 > pymc-repeater.log
# Configuration
cat /etc/pymc_repeater/config.yaml > config.txt
# Hardware
gpio readall
ls -l /dev/spidev*When reporting issues on GitHub:
- Describe the problem clearly
- Include logs (use DEBUG level)
- Share configuration (remove sensitive data)
- List hardware (Pi model, LoRa module)
-
Mention version (
cat /opt/pymc_repeater/pyproject.toml)