Inspiration
SonicMesh was born from a simple, sobering realization: our most critical communication tools are often the first to fail when we need them most. During natural disasters, humanitarian crises, or in regions with zero digital infrastructure, the loss of cellular and Wi-Fi service isn't just an inconvenience—it's a total blackout of help. We wanted to build a solution that turns the smartphone in your pocket from a brick into a beacon, ensuring that no one is ever truly disconnected when lives are on the line.
What it does
SonicMesh is a decentralized, peer-to-peer (P2P) communication platform that operates entirely without internet or cellular service. It allows users to:
• Mesh Chat: Send text and data across a network of devices where each phone acts as a relay node.
• Live Audio Streaming: Transmit real-time voice updates between rescuers or family members using low-latency P2P audio streams.
• File Exchange: Share critical documents, such as maps or medical records, directly over-the-air.
• Hybrid Discovery: Utilize Bluetooth, Wi-Fi Direct, and high-frequency ultrasound to discover and connect to nearby "nodes" automatically.
How we built it
The core of SonicMesh is built on React Native, allowing for a responsive UI while leveraging heavy-duty native Android capabilities. We implemented a custom Java Native Module to interface with the Google Nearby Connections API, managing the complex state of P2P_CLUSTER strategies.
• Audio Pipeline: We built a custom streaming engine using ParcelFileDescriptor pipes to feed live microphone data into the P2P payload stream.
• State Management: We used a robust map-based system to track multiple concurrent endpoints and payload transfers, ensuring the mesh remains stable as users move in and out of range.
Challenges we ran into
The biggest hurdle was the Android Permission Matrix. Navigating the requirements for ACCESS_FINE_LOCATION, BLUETOOTH_SCAN, and NEARBY_DEVICES across different Android API levels was a constant battle. Additionally, we faced significant latency issues when streaming audio. We had to optimize our AudioRecorder and AudioPlayer buffers to prevent "stuttering" while the device was simultaneously searching for new nodes. Solving the math for signal attenuation in noisy environments required us to iterate heavily on our discovery logic: $$ P_r = P_t + G_t + G_r - 20\log_{10}(d) - 20\log_{10}(f) + 147.56 $$ (Where Pr is the received power, helping us determine the "edge" of our mesh connectivity.)
Accomplishments that we're proud of
We successfully achieved a "Zero-UI" connection. Once the app is active, it can discover and bridge to a nearby device in under 5 seconds without requiring the user to navigate complex pairing menus. We also managed to maintain a stable voice stream between three devices in a "daisy-chain" configuration, proving that our mesh relay logic works in practice, not just in theory.
What we learned
This project was a deep dive into the world of Decentralized Networking. We learned that P2P communication is as much about managing energy and radio interference as it is about code. We gained extensive experience in:
•Concurrent Native Threading: Managing discovery, advertising, and payload transfers without blocking the UI thread.
•Hardware Abstraction: Interfacing directly with microphone hardware and radio chipsets via the Android NDK.
•User Privacy: Designing a system that is anonymous by default, as no central server ever sees the data being transmitted.
What's next for Sonic Mesh
Our goal is to make SonicMesh the "Gold Standard" for emergency communication.
- iOS Integration: Developing the Multi-Peer Connectivity Framework bridge to allow Android-to-iOS mesh networking.
- Solar Beacon Nodes: Creating low-cost, 3D-printed solar-powered repeaters that can be dropped into disaster zones to extend the range of the mesh.
- Signal Mapping: A "Heat Map" feature that shows users where the mesh is strongest, helping communities organize their physical placement for better connectivity.
Built With
- android
- gemini
- google-nearby
- java
- jetpack
- kotlin
- metro
- react-native
- watermelon
Log in or sign up for Devpost to join the conversation.