Android Studio project for a simple Bluetooth-based MANET proof of concept in Java.
- Accepts incoming classic Bluetooth RFCOMM connections.
- Discovers nearby devices and lets you tap to connect.
- Sends messages in the format
ID|SRC|DEST|TTL|DATA. - Delivers messages locally when
DESTmatches this phone's node ID. - Relays unseen messages to connected peers while decrementing TTL.
- Package:
com.devil1716.bluetoothmanet - Language: Java
- Min SDK: 21
- Target / Compile SDK: 34
- Current release:
v1.2.5 - Android Gradle Plugin:
8.5.2
- Open the project in Android Studio.
- Let Android Studio install the missing Android SDK / JDK if prompted.
- Build and run on at least 2 Android phones.
- On each phone:
- Tap
Enable Bluetooth - Tap
Make Discoverable - Give the phone a simple node ID like
A,B, orC - Tap
Start Listening - Tap
Discover Nearby Peers - Tap a device in the list to connect
- Tap
- Send a message from one node to another using the destination node ID.
- Phone A connects to Phone B
- Phone B connects to Phone C
- Send from A to
C - Phone B should forward automatically if TTL is still greater than 1
- Android Bluetooth discovery and classic RFCOMM behavior vary by device vendor.
- Phones usually need to be paired first for reliable RFCOMM sockets.
- This is a demo routing layer, not a production mesh protocol.
- The current environment could not build an APK because Java / Gradle / Android SDK were not installed locally.
If you want the Windows laptop to join the same MANET, use the Python CLI in windows-node.
- Improved Bluetooth discovery/discoverable reliability by centralizing adapter and permission prechecks.
- Added clearer logs for blocked Bluetooth operations (disabled adapter or missing runtime permissions).
If the app version is bumped but the GitHub "Releases" page still shows the old version, run the Android Release workflow manually:
- Open Actions → Android Release → Run workflow.
- Set
tagto the version tag (example:v1.0.3). - Run the workflow. It builds the APK and publishes/updates the GitHub release for that tag.