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:
Bluetooth SPP Protocol
- Using UUID 00001101-0000-1000-8000-00805F9B34FB
- Classic Bluetooth for maximum compatibility
Core Functionality:
- Device discovery via Bluetooth scanning
- Secure socket connections between devices
- Message relay capability (basic mesh networking)
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:
- Permission handling in BroadcastReceiver
- Fixed by using MainActivity.this context
- Discovery reliability issues
- Implemented proper scan lifecycle management
- Socket connection stability
- Added better error handling and retry logic
Immediate Next Steps:
- Debug message transmission between connected devices
- Implement message forwarding (mesh capability)
- 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:
- Help debug message transmission issues
- Suggest improvements for mesh message routing
- Optimize Bluetooth discovery process
Built With
- android
- kotlin
Log in or sign up for Devpost to join the conversation.