When Disasters Strike, Cell Towers Fall First. So I Built a Mesh Network for Coastal Communities
Ocean Sentinels from the side of the people it is for: why the network is the first thing a disaster takes, and how phones can carry a report without it.
More than 2 billion people live within 100 km of a coastline. Fishing families in Indonesia, the Philippines, Haiti and India live with cyclones, tsunamis and floods not as rare events but as part of life.
Every time a disaster hits, the same thing happens first: the cell towers go down.
I grew up in India, and this one is close to home. During Cyclone Ockhi in 2017, fishermen were lost at sea off the Tamil Nadu coast. Not because rescue teams didn't exist, but because the towers went down with the storm and no one knew where the boats were. Families waited on the shore for days. Rescue teams went out blind.
That stayed with me. People had phones and apps. It wasn't a technology failure. It was an infrastructure failure: the system meant to connect people in an emergency was the first thing the emergency destroyed.
It isn't only India's story. It belongs to every coastal community that has lived through a major disaster, and Ocean Sentinels is built for all of them.
What I built
Ocean Sentinels is an Android app that lets coastal communities report hazards, coordinate rescues and stay in touch, even with no internet at all.
The idea is to turn ordinary Android phones into a relay network over Bluetooth. When someone files a hazard report offline, it hops from phone to phone, up to about 400 metres per hop, until any phone in the chain finds internet and uploads it.
No cell towers. No Wi-Fi. No special hardware. Just phones.
What the app does:
- Report coastal hazards, such as high waves, flooding or a missing boat, with GPS and a photo
- Relay reports offline over the Bluetooth mesh, tested at about 400 m in open ground
- Show incidents on a live map
- Give citizens, rescue teams, authorities and admins their own roles
- Send push notifications even when the app is closed
There is also a web dashboard for authorities who need a bigger screen. But the Android app is the lifeline. The web needs internet. The mesh doesn't.
Tested in the field
Three phones, about 400 m apart in an open area, no internet. A report filed on the first phone was relayed through to the third.
The app
How I built it
The Android app is written in Kotlin with Jetpack Compose, with Hilt for dependency injection, Room for offline storage and Mapbox for the map. The mesh layer is Kotlin too, running as a foreground service so it keeps relaying reports when the app is in the background. Firebase sends push alerts, so rescue teams hear about incidents even with the app closed.
The authorities' dashboard runs on a FastAPI and PostgreSQL backend that handles reports, role-based access and live map updates over WebSockets.
The mesh was the hardest part. Three things I learned building it:
- Hop counts don't work in a disaster. A relay chain can run past 50 phones before it reaches the internet. I replaced the hop limit with a 72-hour expiry, so a message lives as long as the chain needs.
- Android hides Bluetooth MAC addresses from version 6 on, so you can't use them to identify a phone. Each device gets a SHA-256 fingerprint of its device ID instead, which is stable and doesn't expose anything personal.
- Every report is saved on the phone first. Even if relaying takes hours, nothing is lost, and the report uploads by itself when a connection comes back.
An iOS version is built too, but it isn't released.
Try it
Code on GitHubOcean-Sentinels on GitHubWhen the network goes down, the mesh goes up.
The full build is in the Ocean Sentinels case study.
An earlier version of this post appeared on DEV