SOS Mesh
press a button, your phone screams for help through every other phone nearby. no signal, no wifi, no problem bro.
Inspiration
after earthquakes and floods the phone network goes down for days, which is lwk the exact moment you need it most.
rescuers already have a workaround that needs zero comms: they spray-paint an X-code on every building saying who searched it, when, and what they found. the info lives on the building, not in anyone's radio. termites do the same thing, no leader, no group chat, just marks in the world and simple rules.
we started with a drone swarm sim (Swarm Search) that coordinated only through marks left in the world, and it worked. then we went "ok but what if the drones are just... everyone's phones". so we built that.
What it does
SOS Mesh is an Android app plus a web "field map" that shows it working at city scale.
I need help: name, medical info (blood type, injuries), how many people are with you, "2nd floor back room". hit SEND SOS. your phone attaches GPS (works offline) and starts gossiping. phone to phone, no internet: phones find each other over Bluetooth + Wi-Fi Direct and swap everything they know. your SOS hops A → B → C until it reaches a rescuer. no server. no phone is in charge. heartbeat: press "I'm still here" every 10 min. rescuers see you as ALIVE (<10 min), MISSED HEARTBEAT (10–30), LAST KNOWN (30+). old info fades instead of lying to you. rescuer view: who's out there, how many people, how fresh, how many hops away, medical info. tap "Reached them" and it spreads to every phone, including the person's, who gets "A rescuer has reached you." Bluetooth hot/cold: GPS indoors said "151 meters" when the phones were on the same desk. so every phone also broadcasts a tiny Bluetooth beacon and the rescuer gets a live closeness meter. real reading on our demo phones: ~2 m by Bluetooth. triangulation: walk around a building, the app logs signal strength + where you stood, readings spread through the mesh, and it estimates where they are ("12 m NE, ±6 m") plus which side to take the next reading from. AirTag-style finder, background relay, beacon mode (shipping as we type this): arrow + beeps that speed up as you get closer, keeps relaying with the screen off, and a spare phone can be dropped as a beacon. the field map is a browser sim on real OpenStreetMap buildings in Antakya (Feb 2023 earthquake). 150 phones, 5 rescuers, same gossip rules as the app. pheromone marks ("searched", "rescuer was here", "SOS that way →") live on physical things: trapped people's phones and beacons rescuers drop. click any phone to see a clone of its app.
How we built it
Kotlin, plain Android Views, no Compose, because it builds before the hackathon ends Google Nearby Connections (P2P_CLUSTER) for the mesh, advertising + discovering at once, auto-accept, only one side dials gossip with merge rules that don't care about clocks: each SOS has a seq that bumps on every heartbeat (newer wins), foundSeq/resetSeq so "reached" sticks through heartbeats but "I need help again" clears it everywhere, hops keep the minimum, age is sent relative so wrong phone clocks don't matter store-and-forward: every phone saves what it knows and passes it on, even after a restart BLE beacon + RSSI median over a few seconds (single packets jump ±10 dB), log-distance path loss with a calibrate button triangulation: grid search over 2 m cells in log-distance, with unit tests that find a hidden phone within 3 m from 6 noisy readings field map: plain JS + canvas, OpenStreetMap via Overpass, Antakya cached so wifi at the venue can't kill us design: our first look was neon green on black and was lwk vibe coded, so we went paper. IBM Plex, ink on paper, colour only when it means something (orange = SOS, navy = rescuer)
Challenges we ran into
one phone. then two phones. then plugging them in and out all day like a DJ. the A56 was locked mid-test. we cannot unlock your phone my guy. GPS indoors: ±242 m. distances were fiction until we added honest ranges ("~151 m, really 0–400 m") and Bluetooth. the "next reading from" suggestion pointed right next to where we'd already been. a unit test caught it. we were humbled. force-restarting the app left Google Play services convinced we were still advertising. fixed by clearing the old session on start. someone got marked "reached" and then couldn't ask for help again. that's bad. fixed with per-SOS reached marks. the light theme crashed on launch because we set the status bar colour before the window existed. classic.
Accomplishments we're proud of
two real Samsung phones linked with no internet, the SOS crossed over, the card decayed to MISSED HEARTBEAT on schedule, "Reached them" made it back to the other phone. Bluetooth said ~2 m when the phones were ~2 m apart. in the field map sim (1 hour, 3 seeds): physical marks: 65% of SOS calls known / 29% of people reached, virtual shared grid 56% / 27%, direct-only (no relaying) 20% / 15%. relaying is the big win. physical vs virtual is roughly a tie with a slight edge, and we're saying that out loud.
What we learned
the info has to live somewhere that survives. for drones it's the ground, for people it's their own phone sitting where they're trapped. old info should fade, not lie. unit test the maths, it will humble you.
What's next
AirTag finder, background relay and beacon mode, fully tested on device (shipping as we type this) iPhone support LoRa radios / cheap ESP32 tags as real beacons real damage maps (Copernicus) to place survivors where buildings actually collapsed
