🔧 Troubleshooting Guide

Common Issues & Solutions

This guide covers the most common issues you might encounter with YateBTS on Raspberry Pi 4 and provides step-by-step solutions.

💻 Installation Issues

Installation Script Fails Critical

Symptoms: Installation script exits with error, dependencies not installed

Check System Requirements
# Check Ubuntu version lsb_release -a # Check available memory free -h # Check disk space df -h
Update System Packages
# Update package lists sudo apt update # Upgrade system sudo apt upgrade -y # Install essential tools sudo apt install -y git curl wget
Re-run Installation
# Make script executable chmod +x install/install.sh # Run with verbose output ./install/install.sh 2>&1 | tee install.log

BladeRF Not Detected High

Symptoms: Installation completes but BladeRF Mini A4 not recognized

Check USB Connection
# List USB devices lsusb # Check for BladeRF lsusb | grep -i blade
Install BladeRF Drivers
# Install BladeRF tools sudo apt install -y bladerf # Check device bladeRF-cli --probe
Add udev Rules
# Create udev rule sudo tee /etc/udev/rules.d/88-bladerf.rules << EOF SUBSYSTEM=="usb", ATTRS{idVendor}=="2cf0", ATTRS{idProduct}=="5246", MODE="0666" EOF # Reload udev rules sudo udevadm control --reload-rules sudo udevadm trigger

Permission Denied Errors Medium

Symptoms: Script fails with permission errors, cannot write to system directories

Check User Permissions
# Check current user whoami # Check sudo access sudo -l # Add user to required groups sudo usermod -a -G dialout $USER sudo usermod -a -G plugdev $USER
Fix File Permissions
# Make scripts executable chmod +x install/*.sh # Fix ownership sudo chown -R $USER:$USER .

🔧 Hardware Issues

BladeRF Mini A4 Not Responding Critical

Symptoms: Device not detected, no LED activity, USB connection issues

Check Physical Connection
  • Ensure USB 3.0 cable is properly connected
  • Try different USB port (preferably USB 3.0)
  • Check for loose connections
  • Verify power LED is on
Test on Different System
# Test on another computer # Install BladeRF tools and check detection bladeRF-cli --probe
Reset Device
# Power cycle the device # Unplug USB cable, wait 10 seconds, reconnect # Check dmesg for errors dmesg | tail -20

High CPU Temperature High

Symptoms: System throttling, fan running constantly, performance degradation

Check Temperature
# Check current temperature vcgencmd measure_temp # Monitor temperature watch -n 1 vcgencmd measure_temp
Enable PWM Fan Control
# Check if fan control script exists ls -la /usr/local/bin/deskpi-fan-control.sh # Start fan control service sudo systemctl start deskpi-fan-control sudo systemctl enable deskpi-fan-control
Optimize System Load
# Check running processes htop # Stop unnecessary services sudo systemctl stop bluetooth sudo systemctl disable bluetooth

M.2 SSD Not Detected Medium

Symptoms: System boots from MicroSD instead of M.2 SSD, slow performance

Check SSD Detection
# List all storage devices lsblk # Check for NVMe devices ls /dev/nvme* # Check dmesg for SSD messages dmesg | grep -i nvme
Check Physical Connection
  • Ensure M.2 SSD is properly seated
  • Check M.2 screw is tight
  • Verify power and data cables
Format and Mount SSD
# Format SSD (WARNING: This will erase data) sudo mkfs.ext4 /dev/nvme0n1 # Create mount point sudo mkdir -p /mnt/ssd # Mount SSD sudo mount /dev/nvme0n1 /mnt/ssd

LimeSDR Mini Not Detected Critical

Symptoms: LimeSDR Mini not recognized by system, driver issues, USB enumeration failures

Check USB Connection and Power
# Check USB device enumeration lsusb | grep -i lime # Check dmesg for USB events dmesg | grep -i usb | tail -20 # Check power requirements (LimeSDR Mini needs 1.5A) lsusb -v -d 1d50:6108 | grep MaxPower
Install/Reinstall LimeSuite Drivers
# Remove existing installation sudo apt remove --purge limesuite* sudo rm -rf /usr/local/lib/libLimeSuite* # Reinstall from source git clone https://github.com/myriadrf/LimeSuite.git cd LimeSuite git checkout stable mkdir builddir && cd builddir cmake ../ -DENABLE_QUICKTEST=OFF make -j$(nproc) sudo make install sudo ldconfig
Configure udev Rules
# Create comprehensive udev rules sudo tee /etc/udev/rules.d/64-limesuite.rules << 'EOF' # LimeSDR Mini SUBSYSTEM=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6108", MODE="666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="601f", MODE="666", GROUP="plugdev" # LimeSDR USB SUBSYSTEM=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6109", MODE="666", GROUP="plugdev" EOF sudo udevadm control --reload-rules sudo udevadm trigger sudo usermod -a -G plugdev $USER

LimeSDR Mini Poor Performance High

Symptoms: High error rates, poor signal quality, frequent disconnections

Check Sample Rate Compatibility
# Test different sample rates SoapySDRUtil --probe="driver=lime" SoapySDRUtil --info="driver=lime" # Check supported sample rates LimeUtil --make=LimeSDR-Mini --info | grep -i rate # Set appropriate sample rate for GSM # Recommended: 13 MHz or 26 MHz for GSM
Optimize Gain Settings
# Check current gain ranges SoapySDRUtil --probe="driver=lime" | grep -i gain # Test gain settings (start conservative) # TX Gain: 20-40 dB typical # RX Gain: 30-50 dB typical # Monitor for gain compression LimeUtil --make=LimeSDR-Mini --test
USB Performance Optimization
# Check USB connection speed lsusb -v -d 1d50:6108 | grep -E "(bcdUSB|bMaxPacketSize0)" # Optimize USB buffer sizes echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6108", RUN+="/bin/sh -c \"echo 128 > /sys$devpath/../../../power/autosuspend_delay_ms\""' | sudo tee -a /etc/udev/rules.d/64-limesuite.rules # Disable USB autosuspend echo 'blacklist btusb' | sudo tee -a /etc/modprobe.d/blacklist.conf

LimeSDR Mini Calibration Issues Medium

Symptoms: Poor TX/RX isolation, frequency offset, DC imbalance

Manual Calibration
# Run comprehensive calibration LimeUtil --make=LimeSDR-Mini --cal # Check calibration status LimeUtil --make=LimeSDR-Mini --info | grep -i cal # Test specific frequency calibration LimeQuickTest --module=LimeSDR-Mini --test=BOARD
Temperature Stabilization
# Allow warm-up time (5-10 minutes) # Monitor device temperature during operation watch -n 5 'LimeUtil --make=LimeSDR-Mini --info | grep -i temp' # Ensure adequate cooling and air circulation
Antenna Matching
# Check antenna connection # Use proper uFL to SMA adapters # Ensure 50Ω impedance matching # Check VSWR < 2:1 for optimal performance # Test with dummy load # Connect 50Ω terminator for testing

⚙️ Service Issues

YateBTS Service Won't Start Critical

Symptoms: Service fails to start, systemd shows failed status

Check Service Status
# Check service status sudo systemctl status yatebts # Check service logs sudo journalctl -u yatebts -f
Check Configuration
# Validate configuration sudo yatebts -c /etc/yate/ybts.conf --validate # Check for syntax errors sudo yatebts -c /etc/yate/ybts.conf --check
Restart Service
# Stop service sudo systemctl stop yatebts # Start service sudo systemctl start yatebts # Enable auto-start sudo systemctl enable yatebts

Web Interface Not Accessible High

Symptoms: Cannot access web interface, Apache not responding

Check Apache Status
# Check Apache status sudo systemctl status apache2 # Check Apache logs sudo tail -f /var/log/apache2/error.log
Test Local Access
# Test local access curl http://localhost/yatebts # Check if port 80 is listening sudo netstat -tlnp | grep :80
Restart Apache
# Restart Apache sudo systemctl restart apache2 # Check configuration sudo apache2ctl configtest

🌐 Network Issues

No GSM Signal Critical

Symptoms: Phones cannot find network, no signal strength

Check Frequency Configuration
# Check current frequency grep arfcn /etc/yate/ybts.conf # Verify frequency is correct for your region # GSM 900: ARFCN 975 (example) # GSM 1800: ARFCN 512 (example)
Check Antenna Connection
  • Ensure antenna is properly connected
  • Check antenna is compatible with frequency
  • Try different antenna if available
Adjust Power Settings
# Check power settings grep tx_power /etc/yate/ybts.conf # Increase power (be careful with regulations) # Edit /etc/yate/ybts.conf # tx_power=30

SIM Cards Not Registering High

Symptoms: SIM cards not detected, authentication failures

Check SIM Configuration
# Check SIM configuration cat /etc/yate/sims.conf # Verify IMSI format # Should be 15 digits starting with MCC
Validate SIM Data
# Check for valid KI and OPC # KI should be 32 hex characters # OPC should be 32 hex characters # Test SIM with PySIM pysim-reader --device /dev/ttyUSB0
Check SIM Reader
# Check SIM reader connection ls /dev/ttyUSB* # Test SIM reader sudo pysim-reader --device /dev/ttyUSB0 --list

🔍 Diagnostic Commands

System Diagnostics

System Information

# System info uname -a lsb_release -a cat /proc/cpuinfo | grep "model name" free -h df -h

Hardware Status

# Temperature vcgencmd measure_temp # USB devices lsusb # Storage devices lsblk # Network interfaces ip addr show

Service Status

# All services systemctl list-units --type=service # YateBTS specific systemctl status yatebts systemctl status apache2 systemctl status bladerf

BladeRF Diagnostics

# BladeRF info bladeRF-cli --probe bladeRF-cli --version # Check firmware bladeRF-cli --flash-firmware --help

LimeSDR Mini Diagnostics

# LimeSDR Mini device info LimeUtil --find LimeUtil --make=LimeSDR-Mini --info # Check device status SoapySDRUtil --probe="driver=lime" SoapySDRUtil --info="driver=lime" # Run device tests LimeUtil --make=LimeSDR-Mini --test LimeQuickTest --module=LimeSDR-Mini

Network Diagnostics

# Network status ip route show ss -tuln # Test connectivity ping -c 4 8.8.8.8 curl -I http://localhost/yatebts

Log Analysis

# System logs sudo journalctl -f # YateBTS logs sudo journalctl -u yatebts -f # Apache logs sudo tail -f /var/log/apache2/error.log # Error pattern analysis sudo journalctl -u yatebts --since "1 hour ago" | grep -E "error|fail|critical"

Advanced RF Diagnostics

# BladeRF calibration check bladeRF-cli -e "cal lms" bladeRF-cli -e "print cal" # RF performance test bladeRF-cli -e "set frequency tx 900e6; set frequency rx 900e6; set txvga1 -10; tx start; rx start" # Check FPGA status bladeRF-cli -e "version"

Performance Monitoring

# CPU and memory monitoring top -b -n1 | head -20 iostat -x 1 3 # Network statistics ss -s netstat -i # YateBTS performance metrics sudo yatebts -c /etc/yate/ybts.conf --stats

Security Audit

# Check open ports nmap -sT -O localhost # Review system users cat /etc/passwd | grep -E "sh$|bash$" # Check file permissions find /etc/yate -ls find /var/www -name "*.php" -ls

💡 Pro Tips

  • Save Logs: Always save diagnostic output before making changes
  • One Change at a Time: Make one change and test before proceeding
  • Document Changes: Keep track of what you've tried
  • Backup Config: Always backup configuration files before editing
  • Test Environment: Test changes in a safe environment first

🛡️ Professional System Monitoring & Compliance

Automated monitoring and compliance management for telecommunications infrastructure

80% Less Compliance Work

Automate evidence collection for DORA, NIS2, ISO 27001, and SOC 2 frameworks

💰

Save €60K+ Annually

Cut compliance costs without compromising security standards

🔄

24/7 Audit Ready

Continuous monitoring and automated reporting for GSM infrastructure

Why CyberUpgrade for YateBTS Troubleshooting?

  • ✅ Automated system monitoring and alerting
  • ✅ Compliance management for telecommunications regulations
  • ✅ Expert CISO guidance for infrastructure security
  • ✅ Risk management for BladeRF and Raspberry Pi systems

⚡ Performance Issues

High Latency/Dropped Calls High

Symptoms: Call drops, poor audio quality, registration delays

Check System Load
# Monitor system resources htop iostat 1 5 # Check CPU frequency scaling cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor # Set performance mode sudo cpufreq-set -g performance
Optimize YateBTS Configuration
# Edit YateBTS configuration sudo nano /etc/yate/ybts.conf # Key settings to check: # Radio.PowerManager.MaxAttenDB=10 # GSM.Timer.T3212=24 # Control.LUR.AttachDetach=1 # Restart service sudo systemctl restart yatebts
Check RF Environment
# Monitor signal quality bladeRF-cli -e "print rssi" # Check for interference bladeRF-cli -i set frequency rx 900e6 set samplerate rx 2e6 rx start print samples

Memory Issues/System Crashes Critical

Symptoms: System freezes, out of memory errors, kernel panics

Monitor Memory Usage
# Check memory usage free -h vmstat 1 5 # Check for memory leaks sudo cat /proc/meminfo ps aux --sort=-%mem | head # Monitor over time watch -n 2 'free -h && echo && ps aux --sort=-%mem | head -5'
Configure Swap
# Check current swap swapon --show # Create swap file if needed sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile # Make permanent echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Optimize System Settings
# Reduce memory pressure echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf # Apply changes sudo sysctl -p # Disable unnecessary services sudo systemctl disable bluetooth sudo systemctl disable cups

Storage Performance Issues Medium

Symptoms: Slow file operations, database timeouts, log delays

Test Storage Performance
# Test read/write speed sudo hdparm -t /dev/nvme0n1 sudo hdparm -T /dev/nvme0n1 # Comprehensive I/O test sudo fio --name=random-rw --ioengine=posixaio --rw=randrw --bs=4k --numjobs=1 --size=1g --runtime=60 --time_based --end_fsync=1
Optimize Mount Options
# Check current mount options mount | grep nvme # Edit fstab for performance sudo nano /etc/fstab # Add: noatime,data=writeback,barrier=0,nobh,errors=remount-ro # Remount with new options sudo mount -o remount /
Enable Write Caching
# Check write cache status sudo hdparm -W /dev/nvme0n1 # Enable write cache sudo hdparm -W1 /dev/nvme0n1 # Make permanent echo 'ACTION=="add|change", KERNEL=="nvme0n1", ATTR{queue/scheduler}="mq-deadline"' | sudo tee /etc/udev/rules.d/60-scheduler.rules

🔐 Security Issues

Unauthorized Access Attempts Critical

Symptoms: Unknown devices connecting, suspicious log entries, unauthorized SIM usage

Monitor Access Logs
# Check YateBTS logs for suspicious activity sudo journalctl -u yatebts | grep -E "IMSI|authentication|failed" # Check Apache access logs sudo tail -f /var/log/apache2/access.log | grep -v "127.0.0.1" # Monitor system authentication sudo tail -f /var/log/auth.log
Implement Access Controls
# Change default passwords sudo passwd pi # Configure firewall sudo ufw enable sudo ufw default deny incoming sudo ufw allow ssh sudo ufw allow 80/tcp # Restrict SSH access sudo nano /etc/ssh/sshd_config # Set: PermitRootLogin no # Set: PasswordAuthentication no
Secure YateBTS Configuration
# Set proper file permissions sudo chmod 600 /etc/yate/ybts.conf sudo chmod 600 /etc/yate/sims.conf # Enable authentication logging sudo nano /etc/yate/ybts.conf # Add: Control.LUR.QueryClassic=1 # Add: Control.LUR.QueryRRLP=1 # Restart service sudo systemctl restart yatebts

Weak Encryption/Authentication High

Symptoms: A5/0 cipher active, weak authentication keys, plaintext communications

Enable Strong Encryption
# Configure strong cipher in ybts.conf sudo nano /etc/yate/ybts.conf # Set encryption parameters: # GSM.Cipher.CCCH.Conf=1 # GSM.Cipher.SDCCH.Conf=1 # GSM.Cipher.TCH.Conf=1 # Force A5/1 minimum (disable A5/0) # GSM.MS.Power.Damping=1
Validate SIM Authentication
# Check SIM authentication strength cat /etc/yate/sims.conf | grep -E "Ki|OP|OPC" # Ensure strong Ki values (32 hex chars) # Verify OP/OPC parameters are set # Test authentication sudo yatebts -c /etc/yate/ybts.conf --test-auth
Monitor Cipher Usage
# Monitor active ciphers sudo journalctl -u yatebts | grep -i cipher # Check for A5/0 usage (should be avoided) sudo journalctl -u yatebts | grep "A5/0" # Monitor authentication failures sudo journalctl -u yatebts | grep "auth.*fail"

🔄 Recovery Procedures

⚠️ Emergency Recovery

If your system is completely unresponsive, follow these steps:

Complete System Failure Critical

Symptoms: System won't boot, no network access, hardware unresponsive

Power Cycle and Hardware Check
# Complete power cycle # 1. Disconnect all USB devices # 2. Power off system using button # 3. Wait 30 seconds # 4. Reconnect power and essential devices only # Check hardware indicators # - Power LED should be solid red # - Activity LED should flash during boot
Boot from Recovery Media
# Create Ubuntu recovery USB/SD # Download Ubuntu 22.04 LTS ARM64 # Flash to USB/MicroSD using Balena Etcher # Boot priorities: # 1. USB drive (if available) # 2. M.2 SSD # 3. MicroSD card
Diagnose Storage Issues
# From recovery system, check storage sudo fdisk -l sudo lsblk -f # Test M.2 SSD sudo fsck -v /dev/nvme0n1p1 # Check for bad sectors sudo badblocks -v /dev/nvme0n1

Configuration Recovery High

Symptoms: System boots but YateBTS won't start, corrupted config files

Backup Current State
# Create backup directory sudo mkdir -p /backup/$(date +%Y%m%d_%H%M%S) BACKUP_DIR="/backup/$(date +%Y%m%d_%H%M%S)" # Backup configurations sudo cp -r /etc/yate/ $BACKUP_DIR/ sudo cp -r /var/www/html/ $BACKUP_DIR/ sudo cp /var/log/yatebts.log $BACKUP_DIR/
Reset to Default Configuration
# Stop all services sudo systemctl stop yatebts sudo systemctl stop apache2 # Reset YateBTS configuration cd /path/to/RFS-Portable-BTS sudo cp config/ybts.conf /etc/yate/ sudo cp config/sims.conf /etc/yate/ # Fix permissions sudo chown -R yate:yate /etc/yate/ sudo chmod 640 /etc/yate/*.conf
Gradual Service Restart
# Start services one by one sudo systemctl start yatebts sudo systemctl status yatebts # Wait and check logs sudo journalctl -u yatebts --since "1 minute ago" # If successful, start web interface sudo systemctl start apache2 sudo systemctl status apache2

Data Recovery Medium

Symptoms: Lost subscriber data, missing logs, database corruption

Database Recovery
# Check database integrity sudo sqlite3 /var/lib/yatebts/subscribers.db "PRAGMA integrity_check;" # Dump current data sudo sqlite3 /var/lib/yatebts/subscribers.db .dump > subscribers_backup.sql # Restore from backup (if available) sudo sqlite3 /var/lib/yatebts/subscribers.db < subscribers_backup.sql
Log File Recovery
# Recover from journal sudo journalctl -u yatebts --since "7 days ago" > yatebts_recovery.log # Check for archived logs sudo find /var/log -name "*yate*" -o -name "*bts*" # Restore log rotation sudo logrotate -f /etc/logrotate.d/yatebts
Automatic Backup Setup
# Create backup script sudo tee /usr/local/bin/yatebts-backup.sh << 'EOF' #!/bin/bash BACKUP_DIR="/backup/auto/$(date +%Y%m%d)" mkdir -p $BACKUP_DIR cp -r /etc/yate/ $BACKUP_DIR/ sqlite3 /var/lib/yatebts/subscribers.db .dump > $BACKUP_DIR/subscribers.sql EOF sudo chmod +x /usr/local/bin/yatebts-backup.sh # Setup daily cron echo "0 2 * * * root /usr/local/bin/yatebts-backup.sh" | sudo tee -a /etc/crontab

🚨 Emergency Contact Information

  • System Critical: Document all steps taken and error messages
  • Hardware Issues: Check warranty status before opening case
  • Data Loss: Stop all operations to prevent further damage
  • Security Incident: Isolate system from network immediately
  • Community Support: Join Discord for real-time help