Problem: CMake 3.20 or higher is required
Solution:
# macOS
brew install cmake
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install cmake
# Windows
# Download from https://cmake.org/download/Problem: Could not find OpenSSL
Solution:
# macOS
brew install openssl
# Ubuntu/Debian
sudo apt-get install libssl-dev
# Windows (with vcpkg)
vcpkg install opensslProblem: C++20 features not supported
Solution:
# Update GCC (Linux)
sudo apt-get install g++-11
# Update Clang (macOS)
brew install llvm
# Windows: Use Visual Studio 2019 or laterProblem: Build fails due to missing libraries
Solution:
# Install all required dependencies
# macOS
brew install cmake openssl
# Ubuntu/Debian
sudo apt-get install pkg-config cmake libssl-dev libbluetooth-dev
# Windows (with vcpkg)
vcpkg install opensslProblem: Application fails to initialize Bluetooth
Symptoms:
- "Bluetooth not available" error
- No peer discovery
- Connection failures
Solutions:
-
Check Bluetooth Status:
# macOS system_profiler SPBluetoothDataType # Linux bluetoothctl show # Windows # Check Device Manager > Bluetooth
-
Enable Bluetooth:
- macOS: System Preferences > Bluetooth
- Linux:
sudo systemctl start bluetooth - Windows: Settings > Devices > Bluetooth
-
Check Permissions:
- macOS: System Preferences > Security & Privacy > Privacy > Bluetooth
- Linux: Ensure user is in
bluetoothgroup - Windows: Allow app through firewall
Problem: No other devices appear in peer list
Solutions:
-
Verify Other Devices:
- Ensure other devices are running Bitchat
- Check that devices are within Bluetooth range (10-30 meters)
- Verify Bluetooth is enabled on all devices
-
Check Signal Strength:
# Use /w command to see RSSI values /w -
Restart Discovery:
# Restart the application /exit # Then restart
-
Check for Interference:
- Move away from WiFi routers
- Close other Bluetooth applications
- Check for physical obstacles
Problem: Messages appear to send but aren't received
Solutions:
-
Check Connection Quality:
/w # Look for RSSI values above -70 dBm -
Verify Channel Membership:
# Ensure you're in the same channel as recipients /j #random
-
Check Message Size:
- Large messages may fail to transmit
- Try shorter messages first
-
Restart Connections:
/exit # Restart application
Problem: Messages take a long time to deliver
Solutions:
-
Improve Signal Quality:
- Move devices closer together
- Remove physical obstacles
- Reduce interference from other devices
-
Check Network Load:
- Fewer connected peers = lower latency
- Consider disconnecting from distant peers
-
Optimize Message Size:
- Use shorter messages
- Avoid sending large files
Problem: Secure sessions fail to establish
Symptoms:
- "Noise handshake failed" errors
- Messages not being encrypted
- Connection timeouts during handshake
Solutions:
-
Restart Application:
/exit # Restart to clear session state -
Check Key Generation:
- Ensure CryptoService initialized properly
- Check for key file permissions
-
Verify Protocol Compatibility:
- Ensure all devices are running compatible versions
- Check for protocol version mismatches
Problem: Messages fail to encrypt or decrypt
Solutions:
-
Clear Session State:
/exit # Restart to establish new sessions -
Check Key Integrity:
- Verify key files are not corrupted
- Regenerate keys if necessary
-
Monitor Session Status:
- Check if sessions are properly established
- Look for session timeout errors
Problem: Message signatures fail to verify
Solutions:
-
Check Clock Synchronization:
- Ensure device clocks are reasonably synchronized
- Check for timestamp validation errors
-
Verify Key Exchange:
- Ensure public keys were properly exchanged
- Check for key verification errors
-
Restart Secure Sessions:
/exit # Restart to re-establish secure sessions
Problem: CoreBluetooth permissions denied
Solution:
- Go to System Preferences > Security & Privacy > Privacy > Bluetooth
- Add your terminal application (Terminal.app or iTerm2)
- Restart the application
Problem: Bluetooth not available in terminal
Solution:
# Check if Bluetooth is enabled
system_profiler SPBluetoothDataType | grep "State:"
# Should show "State: On"
# Reset Bluetooth if needed
sudo pkill bluetoothdProblem: BlueZ not installed or outdated
Solution:
# Install BlueZ
sudo apt-get install bluez bluez-tools
# Start Bluetooth service
sudo systemctl start bluetooth
sudo systemctl enable bluetooth
# Add user to bluetooth group
sudo usermod -a -G bluetooth $USER
# Log out and back inProblem: Permission denied for Bluetooth
Solution:
# Check if user is in bluetooth group
groups $USER
# Add to group if not present
sudo usermod -a -G bluetooth $USER
# Check Bluetooth service status
sudo systemctl status bluetoothProblem: Windows Bluetooth APIs not available
Solution:
- Ensure Windows 10 version 1803 or later
- Update Bluetooth drivers
- Enable Bluetooth in Device Manager
Problem: Application blocked by firewall
Solution:
- Windows Security > Firewall & network protection
- Allow app through firewall
- Check antivirus software settings
Problem: Application uses excessive CPU
Solutions:
-
Reduce Scan Frequency:
- Modify scan intervals in code
- Use less aggressive discovery
-
Optimize Compression:
- Disable compression for short messages
- Use faster compression settings
-
Limit Peer Connections:
- Reduce maximum number of simultaneous connections
- Disconnect from distant peers
-
Monitor Service Performance:
- Check NoiseService session management
- Monitor CryptoService operations
Problem: Application uses excessive memory
Solutions:
-
Clear Message History:
/clear
-
Restart Application:
/exit # Restart to clear memory -
Check for Memory Leaks:
- Use debug build for profiling
- Monitor memory usage over time
- Check service memory usage
Problem: Application drains device battery quickly
Solutions:
-
Reduce Scan Power:
- Increase scan intervals
- Use lower power scanning modes
-
Optimize Transmission:
- Send fewer messages
- Use shorter messages
- Batch multiple messages
-
Close When Not in Use:
/exit # Close application when not chatting -
Monitor Encryption Overhead:
- Noise protocol operations are optimized
- Session caching reduces repeated handshakes
# Set environment variable for debug output
export BITCHAT_LOG_LEVEL=debug
# Run application
./bin/bitchat[INFO] Bluetooth initialized successfully
[INFO] CryptoService initialized
[INFO] NoiseService initialized
[WARN] Connection quality poor: -75 dBm
[ERROR] Failed to send message: Connection timeout
[DEBUG] Packet received: 256 bytes from peer 12345
[DEBUG] Noise handshake completed with peer 12345
[DEBUG] Message encrypted successfully
# Check peer status
/w
# View all discovered peers
/peers
# Check application status
/status
# Monitor connection quality
# Look for RSSI values in output# Check if sessions are established
# Look for Noise handshake messages in debug logs
# Monitor encryption status
# Check for encryption/decryption errors in logs
# Verify key exchange
# Look for key exchange completion messages- Check This Guide 📖: Look for your issue in this troubleshooting guide
- Enable Debug Logging 🔍: Set
BITCHAT_LOG_LEVEL=debug - Gather Information 📋:
- Platform and version
- Error messages
- Debug logs
- Steps to reproduce
- Security-related errors
When reporting issues, include:
- Platform: macOS/Linux/Windows version
- Bitchat Version: Git commit hash or version
- Error Messages: Complete error output
- Steps to Reproduce: Detailed steps
- Expected vs Actual Behavior: What you expected vs what happened
- Debug Logs: Output with debug logging enabled
- Security Context: Any encryption or authentication errors
- GitHub Issues: Report bugs and feature requests
- Discussions: Ask questions and share solutions
- Documentation: Check the docs folder for detailed guides