{"id":37227312,"url":"https://github.com/umercodez/littlerelay","last_synced_at":"2026-02-04T18:00:33.724Z","repository":{"id":331624930,"uuid":"1131633223","full_name":"UmerCodez/LittleRelay","owner":"UmerCodez","description":"An Android app that bridges BLE devices and MQTT broker with bidirectional data flow.","archived":false,"fork":false,"pushed_at":"2026-01-28T16:42:08.000Z","size":3199,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T07:25:28.246Z","etag":null,"topics":["android-app","android-application","android-iot","ble","ble-device","ble-mqtt-bridge","bluetooth-low-energy","communication-bridge","data-bridge","internet-of-things","internet-of-things-networks","iot","iot-bridge","iot-gateway","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UmerCodez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T11:57:44.000Z","updated_at":"2026-01-28T16:35:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/UmerCodez/LittleRelay","commit_stats":null,"previous_names":["umercodez/littlerelay"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/UmerCodez/LittleRelay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FLittleRelay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FLittleRelay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FLittleRelay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FLittleRelay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UmerCodez","download_url":"https://codeload.github.com/UmerCodez/LittleRelay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UmerCodez%2FLittleRelay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29092694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-app","android-application","android-iot","ble","ble-device","ble-mqtt-bridge","bluetooth-low-energy","communication-bridge","data-bridge","internet-of-things","internet-of-things-networks","iot","iot-bridge","iot-gateway","mqtt"],"created_at":"2026-01-15T03:20:16.964Z","updated_at":"2026-02-04T18:00:33.719Z","avatar_url":"https://github.com/UmerCodez.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \n# Little Relay\n \n\u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/assets/app-icon.png\" width=\"150\"\u003e\n\n![GitHub License](https://img.shields.io/github/license/UmerCodez/LittleRelay?style=for-the-badge) ![Android Badge](https://img.shields.io/badge/Android-6.0+-34A853?logo=android\u0026logoColor=fff\u0026style=for-the-badge) ![Jetpack Compose Badge](https://img.shields.io/badge/Jetpack%20Compose-4285F4?logo=jetpackcompose\u0026logoColor=fff\u0026style=for-the-badge) ![Material 3](https://img.shields.io/badge/Material%203-ebe89d?style=for-the-badge\u0026logo=materialdesign\u0026logoColor=white) ![GitHub Release](https://img.shields.io/github/v/release/UmerCodez/LittleRelay?include_prereleases\u0026style=for-the-badge)\n\n[\u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/assets/gio-github.png\" height=\"80\"\u003e](https://github.com/UmerCodez/LittleRelay/releases) [\u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/assets/gio-fdroid.png\" height=\"80\"\u003e](https://f-droid.org/packages/app.umerfarooq.littlerelay) [\u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/assets/gio-obtainium.png\" height=\"80\"\u003e](https://github.com/ImranR98/Obtainium)\n\n### An Android application that acts as a bidirectional bridge between BLE devices and an MQTT broker, supporting both Central and Peripheral roles.\n\n\u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/7.jpg\" width=\"250\" heigth=\"250\"\u003e \u003cimg src=\"https://github.com/UmerCodez/LittleRelay/blob/main/fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg\" width=\"250\" heigth=\"250\"\u003e\n\n\u003c/div\u003e\n\n\n# BLE ↔ MQTT Bridge for Android\n\nAn Android application that acts as a **bidirectional data bridge between Bluetooth Low Energy (BLE) devices and an MQTT broker**.\n\nThe app supports **both BLE roles**:\n\n* **Peripheral (GATT Server)**\n* **Central (GATT Client)**\n\nThis allows BLE devices to **publish data to MQTT topics** and **receive MQTT data back over BLE**, with the Android device acting as the intermediary.\n\n## Architecture Overview\n\n```\n+-------------+       BLE        +----------------+       MQTT       +--------------+\n| BLE Device  | \u003c--------------\u003e | Android Bridge | \u003c--------------\u003e | MQTT Broker |\n+-------------+                  +----------------+                  +--------------+\n```\n\nThe Android app:\n\n* Translates BLE writes \u0026 notifications into MQTT messages\n* Translates MQTT messages into BLE notifications or writes\n\n\n## BLE Roles\n\nThe app can operate in **one BLE role at a time**.\n\n\n# Peripheral Role (GATT Server)\n\nIn **Peripheral Mode**, the Android app **advertises itself** and allows other BLE devices to connect to it.\n\n```mermaid\ngraph LR\n    BLE[BLE Device]\n    APP[Android App]\n    MQTT[MQTT Broker]\n\n    BLE --\u003e|WRITE or WRITE_NO_RESPONSE| APP\n    APP --\u003e|Publish| MQTT\n\n    MQTT --\u003e|Subscribed Data| APP\n    APP --\u003e|NOTIFY| BLE\n```\n\n## Advertised BLE Service\n\n**Service UUID**\n\n```\nd2dfc1a2-9f53-494b-a2a1-1efd6148aa81\n```\n\n### Characteristics\n\n| Purpose    | UUID                                   | Properties               |\n| ---------- | -------------------------------------- | ------------------------ |\n| MQTT → BLE | `007a7899-dc76-4778-b33b-3460bf250eed` | NOTIFY                   |\n| BLE → MQTT | `eeb6d18b-863b-4fb5-81b6-a38902b985df` | WRITE, WRITE_NO_RESPONSE |\n\n\n\n## Data Flow (Peripheral Role)\n\n### BLE Device → MQTT Broker\n\n1. Remote BLE device connects to the app\n2. Remote BLE device writes data to following characteristic exposed by the app\n\n```\neeb6d18b-863b-4fb5-81b6-a38902b985df\n```\n\n3. App publishes the received payload to the configured MQTT topic(s)\n\n✔ Supported write types:\n\n* `WRITE`\n* `WRITE_NO_RESPONSE`\n\n\n\n### MQTT Broker → BLE Device\n\n1. Remote BLE device subscribes to notifications on:\n\n```\n007a7899-dc76-4778-b33b-3460bf250eed\n```\n\n2. App subscribes to MQTT topic(s)\n3. When MQTT data arrives:\n\n   * App sends it via **BLE Notification**\n   * Device receives data instantly\n\nℹ️ **Indications are not supported** (for now) , only Notifications.\n\n\n\n## Peripheral Role Summary\n\n| Direction  | Mechanism                                 |\n| ---------- | ----------------------------------------- |\n| BLE → MQTT | Write to writable characteristic          |\n| MQTT → BLE | Notification on notifiable characteristic |\n\n\n\n# Central Role (GATT Client)\n\nIn **Central Mode**, the Android app scans for nearby BLE devices and connects to them.\n\nThis mode is ideal when:\n\n* BLE devices already advertise services\n* Android initiates and manages connections\n\n```mermaid\ngraph LR\n    BLE[BLE Device]\n    APP[Android App]\n    MQTT[MQTT Broker]\n\n    BLE --\u003e|NOTIFY or INDICATE| APP\n    APP --\u003e|Publish| MQTT\n\n    MQTT --\u003e|Subscribed Data| APP\n    APP --\u003e|WRITE_NO_RESPONSE| BLE\n```\n\n\n## Device Requirements (Central Role)\n\n### BLE Device → MQTT Broker\n\nThe BLE device must expose **at least one characteristic** with:\n\n* `NOTIFY` **or**\n* `INDICATE`\n\nOnce found, the app UI allows enabling notifications/indications.\n\nWhen data arrives:\n\n* App publishes it to the configured MQTT topic(s)\n\n\n\n### MQTT Broker → BLE Device\n\nThe BLE device must expose a characteristic supporting:\n\n* `WRITE_NO_RESPONSE`\n\nWhen MQTT data arrives:\n\n* App writes the payload to the selected characteristic\n\n\n\n## Central Role Summary\n\n| Direction  | Requirement                            |\n| ---------- | -------------------------------------- |\n| BLE → MQTT | Characteristic with NOTIFY or INDICATE |\n| MQTT → BLE | Characteristic with WRITE_NO_RESPONSE  |\n\n\n\n## MQTT Configuration\n\nThe app allows configuring:\n\n* Broker URL\n* Port\n* Credentials (if required)\n* Publish topics\n* Subscribe topics\n\n### Topic Mapping\n\n| Source                   | Destination        |\n| ------------------------ | ------------------ |\n| BLE Write / Notification | MQTT Publish       |\n| MQTT Subscribe           | BLE Notify / Write |\n\n\n\n## Payload Handling\n\n* Payloads are forwarded as **bytes**\n* No transformation is applied\n\n\n### Android 11 and Lower – Location Permission Requirement\n\nOn devices running **Android 11 (API level 30) or lower**, the system requires **location permission** to perform Bluetooth Low Energy (BLE) scans. This is an Android platform restriction, as BLE scanning can potentially be used to infer a user’s location. To use the app in **Central role** and scan for nearby BLE devices, you must grant the appropriate location permission (typically **ACCESS_FINE_LOCATION**) and ensure that **location services are turned ON** on the device. If location permission is denied or location services are disabled, BLE scanning will not return any results, even if Bluetooth is enabled.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumercodez%2Flittlerelay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumercodez%2Flittlerelay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumercodez%2Flittlerelay/lists"}