DEV Community

Cover image for When Disasters Strike, Cell Towers Fall First — So I Built a Mesh Network for Coastal Communities
Gowshik S
Gowshik S

Posted on

When Disasters Strike, Cell Towers Fall First — So I Built a Mesh Network for Coastal Communities

DEV Weekend Challenge: Community

This is a submission for the DEV Weekend Challenge: Community

The Community

Over 2 billion people live within 100km of a coastline. Fishermen in Indonesia, families in the Philippines, communities in Haiti and India — people who face cyclones, tsunamis, and floods not as rare events, but as a way of life.

Every time disaster strikes, the same thing happens: the cell towers go down first.

I grew up in India, where this hit close to home. During Cyclone Ockhi in 2017, dozens of fishermen died at sea off the Tamil Nadu coast. Not because rescue teams didn't exist — because when the storm hit, towers went down and no one knew where they were. Families waited on shores for days. Rescue teams deployed blind.

That moment stuck with me. We had phones. We had apps. It wasn't a technology failure — it was an infrastructure failure. The system built to connect people in emergencies was the first thing the emergency destroyed.

This is not just India's story. It's every coastal community that has ever lived through a major disaster. 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 connected — even when there's no internet.

The core idea: turn ordinary Android phones into a disaster-proof relay network using Bluetooth. When a user submits a hazard report offline, it hops phone to phone through Bluetooth — up to ~400 metres per hop — until any device in the chain finds internet and uploads it to the server.
No cell towers. No WiFi. No special hardware. Just phones.

  [ Phone A ] ---BLE 400m---> [ Phone B ] ---BLE 400m---> [ Phone C: Has Internet ]
  No signal                   No signal                    Uploads to server ✓
Enter fullscreen mode Exit fullscreen mode

What the app does:

  • Report coastal hazards (high waves, flooding, lost boats) with GPS + photo
  • Relay reports offline via BLE mesh — tested at ~400m in open areas
  • Live map with real-time incident markers
  • Role-based access for Citizens, Rescue Teams, Authorities, and Admins
  • Push notifications via Firebase even with the app closed

There's also a web dashboard for authorities who need a larger screen — but the Android app is the real lifeline. The web requires internet. The mesh doesn't.

Demo

The cover video above gives a full walkthrough of the app.

Real-world BLE mesh test — three phones communicating at ~400m in open area,no internet, report relayed successfully:

BLE Mesh Live Test - Open Area ~400m

App walkthrough — reporting, map, and mesh screens:

App Walkthrough

Download Ocean Sentinels APK (Android)

Ocean Sentinels Web

iOS version is currently in development — coming soon.

Test Credentials

Role Email Password
Citizen sihcitizen@vi.com SIH@2025
Rescue sihrescue@vi.com Ocean@123
Admin OceanAdmin1 admin

Works on both the Android app and web dashboard.

Screenshots

Home Dashboard — quick action cards:

Home Dashboard

Report Incident — GPS, hazard type, photo upload:

Report Incident

BLE Mesh Screen — live peers and relay status:

BLE Mesh Screen

Live Map — real-time incident markers:

Live Map

Code

Ocean Sentinels -- India's Coastal Safety Network

A full-stack coastal safety and hazard reporting platform built for coastal communities worldwide. The system enables real-time maritime incident reporting, response coordination, and offline BLE mesh networking for areas with limited or no connectivity — keeping communities connected when disasters take down the infrastructure.


Table of Contents


Overview

Ocean Sentinels provides a unified platform for coastal hazard reporting across worldwide. It supports four user roles -- Public citizens, Authorities, Rescue Teams, and Administrators -- each with dedicated consoles and workflows.

Core capabilities:

  • Real-time incident reporting with GPS coordinates and photo evidence
  • Live interactive map (Mapbox) with incident markers and monitoring zones
  • Role-based dashboards for incident verification, response deployment, and analytics
  • BLE mesh networking for offline hazard report relay between Android devices
  • Weather…

How I Built It

The Android app is built with Kotlin and Jetpack Compose, with Hilt for dependency injection, Room for local offline storage, and Mapbox for the live map. The BLE mesh networking layer — the offline relay system — is also entirely written in Kotlin, running as a foreground service so it keeps relaying reports even when the app is in the background. Firebase handles push notifications so rescue teams are alerted even with the app closed.

The web dashboard for authorities and rescue teams is powered by a FastAPI + PostgreSQL backend — handling incident reports, role-based access control, and WebSocket live updates for real-time map monitoring.

The hardest part was the BLE mesh layer. A few things I learned:

Hop-count TTL doesn't work in disasters. A relay chain can be 50+ devices long before reaching internet. I switched to 72-hour time-based expiry so messages survive however long the chain needs to be.

Android 6+ hides MAC addresses. You can't use Bluetooth MACs to identify
devices. I generate a SHA-256 fingerprint from the device ID instead —
persistent and privacy-safe.

Reports are stored in Room first. Even if mesh relay takes hours, the report
is never lost. It uploads automatically when connectivity returns.

When the network goes down, the mesh goes up.

Top comments (0)