{"id":51241968,"url":"https://github.com/oldrev/esp-ble-prov-dart","last_synced_at":"2026-06-29T01:03:03.468Z","repository":{"id":366790777,"uuid":"1277868872","full_name":"oldrev/esp-ble-prov-dart","owner":"oldrev","description":"A pure Dart implementation of the Espressif network provisioning protocol for Flutter.","archived":false,"fork":false,"pushed_at":"2026-06-23T10:56:53.000Z","size":438,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-23T12:14:32.380Z","etag":null,"topics":["ble","bluetooth","bluetooth-low-energy","esp","esp-idf","esp32","espressif","provisioner","provisioning","wifi"],"latest_commit_sha":null,"homepage":"https://www.borneoiot.com","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oldrev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"oldrev","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":["https://paypal.me/oldrev"]}},"created_at":"2026-06-23T09:01:59.000Z","updated_at":"2026-06-23T10:56:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oldrev/esp-ble-prov-dart","commit_stats":null,"previous_names":["oldrev/esp-ble-prov-dart"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/oldrev/esp-ble-prov-dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldrev%2Fesp-ble-prov-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldrev%2Fesp-ble-prov-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldrev%2Fesp-ble-prov-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldrev%2Fesp-ble-prov-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oldrev","download_url":"https://codeload.github.com/oldrev/esp-ble-prov-dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oldrev%2Fesp-ble-prov-dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34909142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ble","bluetooth","bluetooth-low-energy","esp","esp-idf","esp32","espressif","provisioner","provisioning","wifi"],"created_at":"2026-06-29T01:03:02.674Z","updated_at":"2026-06-29T01:03:03.461Z","avatar_url":"https://github.com/oldrev.png","language":"Dart","funding_links":["https://ko-fi.com/oldrev","https://paypal.me/oldrev"],"categories":[],"sub_categories":[],"readme":"# esp_ble_prov_dart\n[![pub package](https://img.shields.io/pub/v/esp_ble_prov_dart.svg)](https://pub.dev/packages/esp_ble_prov_dart)\n[![pub points](https://img.shields.io/pub/points/esp_ble_prov_dart)](https://pub.dev/packages/esp_ble_prov_dart/score)\n[![likes](https://img.shields.io/pub/likes/esp_ble_prov_dart)](https://pub.dev/packages/esp_ble_prov_dart/score)\n[![popularity](https://img.shields.io/pub/popularity/esp_ble_prov_dart)](https://pub.dev/packages/esp_ble_prov_dart/score)\n[![platforms](https://img.shields.io/badge/platforms-android%20%7C%20ios%20%7C%20linux%20%7C%20macos%20%7C%20web%20%7C%20windows-blue)](https://pub.dev/packages/esp_ble_prov_dart)\n\nA **pure Dart** implementation of the Espressif network provisioning protocol for Flutter.\n\nThis package is a Dart port of the open-source JavaScript implementation [`esp-ble-prov`](https://github.com/nikas-belogolov/esp-ble-prov). By rewriting the protocol logic entirely in Dart and leveraging [`universal_ble`](https://pub.dev/packages/universal_ble) for cross-platform BLE access, it eliminates any dependency on Espressif's official native SDKs.\n\nThe result is a unified, lightweight, and truly multi-platform provisioning solution without the headache of managing native bindings or platform-specific builds.\n\nIf this project saved you time, native binding headaches, or lines of code, consider buying me a coffee. Your support helps keep this project maintained, thank you!\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ko-fi.com/oldrev\"\u003e\n    \u003cimg src=\"https://ko-fi.com/img/githubbutton_sm.svg\" alt=\"Buy me a coffee\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n## Supported Platforms\n\nSince it is written in pure Dart and uses `universal_ble`, this package works seamlessly across **all Flutter-supported platforms**:\n\n| Android |  iOS  | macOS |  Web  | Linux | Windows |\n| :-----: | :---: | :---: | :---: | :---: | :-----: |\n|✅|✅|✅|✅|✅|✅|\n\n\n![Screen-shots](.github/assets/screenshots.png)\n\n## Features\n\n* **Zero Native Dependencies:** 100% pure Dart implementation of Espressif's provisioning protocol.\n* **ESP BLE Provisioning over GATT:** Full control over the provisioning state machine.\n* **Dynamic Endpoint Mapping:** Automatically derives built-in characteristic UUIDs; supports custom application endpoints.\n* **Wi-Fi Utilities:** Scan for nearby networks, configure credentials, and apply Wi-Fi logic.\n* **Protobuf-Powered:** Leverages structured ESP provisioning messages.\n* **Security Support:** Fully implements `Security0` (no security) and `Security1` (Curve25519 key exchange + AES-CTR).\n\u003e *Note: `Security2` (SRP6a/AES-GCM) is currently exposed as an API placeholder and will throw a `ProvisionerError` until verification is complete.*\n\n\n\n## Status \u0026 Architecture\n\nThis package is a Dart port of the open-source JavaScript implementation [`esp-ble-prov`](https://github.com/nikas-belogolov/esp-ble-prov)) (originally targeting Web Bluetooth).\n\nThe built-in BLE endpoint UUIDs follow ESP-IDF's default `wifi_prov_mgr` mapping:\n\n| Endpoint | Short UUID | Description |\n| --- | --- | --- |\n| `prov-ctrl` | `0xFF4F` | Control session and state |\n| `prov-scan` | `0xFF50` | Trigger and fetch Wi-Fi scan results |\n| `prov-session` | `0xFF51` | Security handshake / session establishment |\n| `prov-config` | `0xFF52` | Apply/Get Wi-Fi configurations |\n| `proto-ver` | `0xFF53` | Protocol version check |\n\n### Custom Endpoints\n\nESP-IDF assigns application-defined provisioning endpoints sequentially after the built-in ones (`0xFF54`, `0xFF55`, etc.). You can register them by index:\n\n```dart\nprovisioner.registerCustomEndpoint('device-id'); // Index 0 -\u003e 0xFF54\nprovisioner.registerCustomEndpoint('factory-info', index: 1); // Index 1 -\u003e 0xFF55\n\n```\n\n## Installation\n\nAdd the package to your Flutter project:\n\n```yaml\ndependencies:\n  esp_ble_prov_dart: ^0.1.1\n\n```\n\nThen run:\n\n```bash\nflutter pub get\n\n```\n\n### Platform Permissions\n\nEnsure you configure the specific Bluetooth permissions required by your target operating systems (e.g., `Info.plist` for iOS/macOS, `AndroidManifest.xml` for Android). Refer to the [`universal_ble`](https://pub.dev/packages/universal_ble) documentation for setup details.\n\n## Basic Usage\n\n```dart\nimport 'package:esp_ble_prov_dart/esp_ble_prov_dart.dart';\n\nFuture\u003cvoid\u003e provisionDevice() async {\n  final provisioner = EspBleProvisioner(\n    deviceNamePrefix: 'PROV_',\n    security: Security1(pop: 'your_proof_of_possession'),\n  );\n\n  // 1. Connect and establish an encrypted session\n  await provisioner.connect();\n  await provisioner.establishSession();\n\n  // 2. Scan for Wi-Fi networks via the ESP device\n  final networks = await provisioner.scan();\n\n  // 3. Send and apply credentials\n  await provisioner.sendCredentials(\n    WiFiConfig(\n      ssid: 'Your Wi-Fi SSID',\n      passphrase: 'Your Wi-Fi Password',\n      channel: networks.isNotEmpty ? networks.first.channel : 0,\n    ),\n  );\n\n  await provisioner.disconnect();\n}\n\n```\n\n## Protobuf Generation\n\nProtocol messages live in the [`protos`](./protos) directory. If you modify or need to regenerate the Dart protobuf definitions:\n\n```powershell\ndart pub global activate protoc_plugin\n.\\tool\\generate_protos.ps1\n\n```\n\n*(Generated files are output to `lib/src/proto/generated`)*\n\n## Debugging\n\nIf you need to inspect raw encrypted/decrypted communication during development, enable payload logging:\n\n```dart\nfinal provisioner = EspBleProvisioner(\n  deviceNamePrefix: 'PROV_',\n  security: Security1(pop: 'pop'),\n  logPayloads: true, // Prints hex dumps of communication to log callback\n);\n\n```\n\n---\n\n## License\n\nThis Flutter port is released under the **MIT License**. See [`LICENSE`](./LICENSE).\n\nUpstream JavaScript reference project [`esp-ble-prov`](https://github.com/nikas-belogolov/esp-ble-prov) is also MIT licensed.\n\n- Copyright © 2026 Nikas Belogolov\n- Copyright © 2026 Wei Li\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foldrev%2Fesp-ble-prov-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foldrev%2Fesp-ble-prov-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foldrev%2Fesp-ble-prov-dart/lists"}