HEMS – Hybrid Emergency Messaging System With Resilient Mesh Networking and Adaptive Relay Management

Computer Science

Description

HEMS (Hybrid Emergency Messaging System) is an Android application that lets people send messages and SOS alerts to each other without any internet or cellular network. Phones link up directly over Bluetooth and Wi-Fi and pass messages from phone to phone until they reach the recipient, like a note passed hand to hand along a line of people. If any phone in that chain has internet, it quietly forwards the message to a backend server. The app also works as a stand-alone offline first-aid and survival guide with over 50 topics, and lets a nearby contact confirm "I'm calling emergency services for you" so help isn't duplicated and isn't missed.

Objectives

To provide reliable emergency communication in situations where normal networks are down or overloaded — natural disasters, remote areas, infrastructure failure, or network congestion during a mass emergency — by: - letting any two phones in range talk directly, with no SIM, Wi-Fi router or server required; - letting messages hop through other people's phones to reach someone out of direct range; - letting an SOS reach a real backend and real responders the moment any phone nearby regains internet, without anyone configuring who that phone is in advance; - making sure none of this depends on a single phone, a single relay, or a working network at any one point.

Socio-economic benefit

- Keeps emergency communication alive when infrastructure fails — floods, earthquakes, blackouts and network outages are exactly when cell towers and internet go down first, and exactly when people most need to reach help. - No subscription, SIM or data plan needed — it works for anyone with a phone running the app, including guests with no account, which matters for displaced or underserved populations. - Community-based emergency response, not just messaging: a contact near someone's SOS can tell the app "I'm calling emergency services for them" — this is shared with the sender's other contacts in real time so the call isn't duplicated or missed, and the helper gets real (non-monetary) recognition toward a badge tier, encouraging bystanders to actually act rather than assume someone else will. - A built-in offline survival and first-aid guide (over 50 topics: bleeding, choking, CPR, animal bites, dehydration, gas leaks, fire escape, road accidents, childbirth and more), searchable with guided questions and synonym matching, usable with zero connectivity — turns a phone into a basic emergency reference when no help is immediately reachable. - Abuse and misuse safeguards: a per-device daily SOS limit for guest accounts (with a clear on-screen warning before it's hit) protects the shared network and responders from spam or false alarms, which matters if this were ever deployed to the public. - Low cost of entry: runs on budget Android phones (tested on sub-$100 devices), so the safety benefit isn't limited to people who can afford flagship hardware.

Methodologies

- Spec-first, then validate against reality. The project began from a written specification (modules such as SecureGate, MeshLink, PathFinder, PanicBeacon) and a one-month phased plan (foundation ? core mesh ? advanced features ? integration). Every claim about what the system does was then checked against actual code and real devices, and the project's own status document explicitly separates "proven on phones," "proven in simulation only," and "not proven" — nothing is claimed without evidence. - Two-person division of ownership, matching the module split: mobile app, mesh routing, and secure messaging on one side; backend, authentication, gateway logic, battery optimization and DevOps on the other, merged through reviewed Git branches into a shared main. - Test-driven, dual-layer verification: a simulation harness runs the real mesh/routing code against simulated radios to test scenarios that need many devices (route failure, battery-aware relay selection, long multi-hop chains, TTL expiry), while real-device tests on multiple budget Android phones confirm what simulation can't — actual Bluetooth/Wi-Fi behaviour, background-service survival under OS power management, and battery impact. - Continuous integration on every change: backend and app changes are automatically linted, built and tested (GitHub Actions and a self-hosted Jenkins pipeline) before being merged, including a security/secrets scan (gitleaks). - Iterative hardening: features go through staged passes — build, real-device rehearsal, fix every defect found, re-test, then deploy — documented commit-by-commit in a running changelog so every fix is traceable to the evidence that triggered it.

Outcome

- A working Android application demonstrating the full target flow: Phone A ? Phone B ? Phone C, with B acting as a pure relay, over Bluetooth/Wi-Fi with no internet or SIM — confirmed on real hardware, not just in simulation. - End-to-end encrypted messaging (text, photos, voice notes, replies) between phones that have never been in range of each other at the same time, via store-and-forward. - A working SOS pipeline proven on real phones: an offline sender's alert relays through another phone, bridges to the backend the instant that phone gets internet, and the backend sends back a cryptographically signed receipt so the original sender can confirm — on their own screen — that the alert genuinely reached the server, not just a neighbour. - Forged SOS alerts, fake "I'm safe" cancellations, and spoofed acknowledgements/heartbeats are all detectable and rejected, because every one of these packets is now digitally signed and verified, both phone-to-phone and by the server. - A self-healing network: automatic failure detection via heartbeats, alternate-path routing when a relay disappears, and battery-aware relay selection, validated in simulation across networks of up to 10 phones (100% delivery in the tested scenarios) and demonstrated in person across multiple live rehearsals with real devices. - A fully deployed, monitored production backend on AWS, built with the same infrastructure-as-code (Terraform/Ansible/Kubernetes) used in the DevOps coursework component, not a one-off script. - An extended, genuinely useful feature set beyond the original spec: the offline survival guide and the community-helper recognition system, both shipped and tested, which push the project from "a messaging demo" toward something that could plausibly help people in a real emergency.

Gallery

More from Computer Science

BoatMart Module A

Computer Science

BoatMart is a unified e-commerce platform designed to connect wholesalers, retailers, and customers in one dig…

Supervisor: DR. Saeed ur Rehman

Web-based ERP System for Young's Food (Pvt) Ltd

Computer Science

A web-based ERP for a biscuit and wafer manufacturer that connects purchasing, recipe-based production, invent…

Supervisor: Dr. Sulma Rashid

Ai Resume Screening System

Computer Science

The AI-Based Resume Screening System is an explainable and auditable decision-support platform designed t…

Supervisor: Dr Mamoona Fatima

Fixify: Home Services Marketplace with Agentic Admin Automation

Computer Science

Fixify is an AI-powered home services marketplace that connects customers with verified local professionals, i…

Supervisor: Hassan Sardar