Project: Bluetooth Mesh Messenger
Objective: Create an Android app that enables direct device-to-device messaging via Bluetooth without internet/WiFi, using a peer-to-peer mesh network approach.

Key Components:

  1. Bluetooth SPP Protocol

    • Using UUID 00001101-0000-1000-8000-00805F9B34FB
    • Classic Bluetooth for maximum compatibility
  2. Core Functionality:

    • Device discovery via Bluetooth scanning
    • Secure socket connections between devices
    • Message relay capability (basic mesh networking)
  3. Technical Stack:

    • Android BluetoothAdapter API
    • BroadcastReceiver for device discovery
    • ConnectedThread for socket I/O operations
    • ArrayAdapter for device list UI

Current Status:

  • Basic discovery and pairing works
  • Connection establishment partially functional
  • Message transmission needs debugging

Recent Challenges:

  1. Permission handling in BroadcastReceiver
    • Fixed by using MainActivity.this context
  2. Discovery reliability issues
    • Implemented proper scan lifecycle management
  3. Socket connection stability
    • Added better error handling and retry logic

Immediate Next Steps:

  1. Debug message transmission between connected devices
  2. Implement message forwarding (mesh capability)
  3. Add connection persistence/reconnection logic

Code Context:

  • Uses standard Android Bluetooth permissions
  • MainActivity handles all Bluetooth operations
  • ConnectedThread manages socket communication

Special Considerations:

  • Must work without WiFi/internet
  • Needs to handle Android 12+ Bluetooth restrictions
  • Target API level 31+ compatibility

Requested Assistance:

  1. Help debug message transmission issues
  2. Suggest improvements for mesh message routing
  3. Optimize Bluetooth discovery process

Built With

Share this project:

Updates