{"id":33510048,"url":"https://github.com/munimtechnologies/munim-bluetooth","last_synced_at":"2026-04-01T18:26:05.060Z","repository":{"id":323889088,"uuid":"1095118429","full_name":"munimtechnologies/munim-bluetooth","owner":"munimtechnologies","description":"React Native Bluetooth (BLE) - Peripheral \u0026 Central","archived":false,"fork":false,"pushed_at":"2026-04-01T10:19:50.000Z","size":1379,"stargazers_count":4,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-01T10:24:18.154Z","etag":null,"topics":["ble","ble-central","ble-peripheral","bluetooth","bluetooth-low-energy","bluetooth-peripheral","expo","nitro-modules","react-native","react-native-bluetooth","react-native-bluetooth-manager","react-native-bluetooth-peripheral"],"latest_commit_sha":null,"homepage":"https://www.munimtech.com/opensource/munim-bluetooth","language":"Kotlin","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/munimtechnologies.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":"2025-11-12T16:04:45.000Z","updated_at":"2026-04-01T09:00:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1460206-16af-4d91-b0f4-892136b109c8","html_url":"https://github.com/munimtechnologies/munim-bluetooth","commit_stats":null,"previous_names":["munimtechnologies/munim-bluetooth"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/munimtechnologies/munim-bluetooth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munimtechnologies%2Fmunim-bluetooth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munimtechnologies%2Fmunim-bluetooth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munimtechnologies%2Fmunim-bluetooth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munimtechnologies%2Fmunim-bluetooth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/munimtechnologies","download_url":"https://codeload.github.com/munimtechnologies/munim-bluetooth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/munimtechnologies%2Fmunim-bluetooth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: 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":["ble","ble-central","ble-peripheral","bluetooth","bluetooth-low-energy","bluetooth-peripheral","expo","nitro-modules","react-native","react-native-bluetooth","react-native-bluetooth-manager","react-native-bluetooth-peripheral"],"created_at":"2025-11-26T04:03:19.849Z","updated_at":"2026-04-01T18:26:05.030Z","avatar_url":"https://github.com/munimtechnologies.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Banner Image --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/munimtechnologies/munim-bluetooth\"\u003e\n    \u003cimg alt=\"Munim Technologies Bluetooth\" height=\"128\" src=\"./.github/resources/banner.png?v=3\"\u003e\n    \u003ch1 align=\"center\"\u003emunim-bluetooth\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca aria-label=\"Package version\" href=\"https://www.npmjs.com/package/munim-bluetooth\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Package version\" src=\"https://img.shields.io/npm/v/munim-bluetooth.svg?style=flat-square\u0026label=Version\u0026labelColor=000000\u0026color=0066CC\" /\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"Package is free to use\" href=\"https://github.com/munimtechnologies/munim-bluetooth/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-success.svg?style=flat-square\u0026color=33CC12\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"package downloads\" href=\"https://www.npmtrends.com/munim-bluetooth\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/npm/dm/munim-bluetooth.svg?style=flat-square\u0026labelColor=gray\u0026color=33CC12\u0026label=Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"total package downloads\" href=\"https://www.npmjs.com/package/munim-bluetooth\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/npm/dt/munim-bluetooth.svg?style=flat-square\u0026labelColor=gray\u0026color=0066CC\u0026label=Total%20Downloads\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"try with expo\" href=\"https://docs.expo.dev/\"\u003e\u003cb\u003eWorks with Expo\u003c/b\u003e\u003c/a\u003e\n\u0026ensp;•\u0026ensp;\n  \u003ca aria-label=\"documentation\" href=\"https://github.com/munimtechnologies/munim-bluetooth#readme\"\u003eRead the Documentation\u003c/a\u003e\n\u0026ensp;•\u0026ensp;\n  \u003ca aria-label=\"report issues\" href=\"https://github.com/munimtechnologies/munim-bluetooth/issues\"\u003eReport Issues\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch6 align=\"center\"\u003eFollow Munim Technologies\u003c/h6\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"Follow Munim Technologies on GitHub\" href=\"https://github.com/munimtechnologies\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Munim Technologies on GitHub\" src=\"https://img.shields.io/badge/GitHub-222222?style=for-the-badge\u0026logo=github\u0026logoColor=white\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\n  \u003ca aria-label=\"Follow Munim Technologies on LinkedIn\" href=\"https://linkedin.com/in/sheehanmunim\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Munim Technologies on LinkedIn\" src=\"https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\u0026nbsp;\n  \u003ca aria-label=\"Visit Munim Technologies Website\" href=\"https://munimtech.com\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Munim Technologies Website\" src=\"https://img.shields.io/badge/Website-0066CC?style=for-the-badge\u0026logo=globe\u0026logoColor=white\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\n**munim-bluetooth** is a comprehensive React Native library for all your Bluetooth Low Energy (BLE) needs, supporting both peripheral and central roles. This library allows your React Native app to act as a BLE peripheral (advertising services and characteristics) or as a BLE central (scanning, connecting, and communicating with devices).\n\n**Fully compatible with Expo!** Works seamlessly with both Expo managed and bare workflows.\n\n**Built with React Native's Nitro modules architecture** for high performance and reliability.\n\n**Note**: This library focuses on reliability and platform compatibility. It supports the core BLE features that work consistently across both Android and iOS platforms.\n\n## Table of contents\n\n- [📚 Documentation](#-documentation)\n- [🚀 Features](#-features)\n- [📦 Installation](#-installation)\n- [⚡ Quick Start](#-quick-start)\n- [🔧 API Reference](#-api-reference)\n- [📖 Usage Examples](#-usage-examples)\n- [🔍 Troubleshooting](#-troubleshooting)\n- [👏 Contributing](#-contributing)\n- [📄 License](#-license)\n\n## 📚 Documentation\n\n\u003cp\u003eLearn about building BLE apps \u003ca aria-label=\"documentation\" href=\"https://github.com/munimtechnologies/munim-bluetooth#readme\"\u003ein our documentation!\u003c/a\u003e\u003c/p\u003e\n\n- [Getting Started](#-installation)\n- [API Reference](#-api-reference)\n- [Usage Examples](#-usage-examples)\n- [Troubleshooting](#-troubleshooting)\n\n## 🚀 Features\n\n### Peripheral Mode\n\n- 🔵 **BLE Peripheral Mode**: Transform your React Native app into a BLE peripheral device\n- 📡 **Service Advertising**: Advertise custom GATT services with multiple characteristics\n- 🔄 **Real-time Communication**: Support for read, write, and notify operations\n- ✅ **Platform-Supported BLE Advertising**: Support for core BLE advertising data types that work reliably on both platforms\n- 🔧 **Dynamic Updates**: Update advertising data while advertising is active\n\n### Central Mode\n\n- 🔍 **Device Scanning**: Scan for BLE devices with filtering options\n- 🔗 **Device Connection**: Connect and disconnect from BLE devices\n- 📊 **GATT Operations**: Discover services, read/write characteristics\n- 🔔 **Notifications**: Subscribe to characteristic notifications/indications\n- 📶 **RSSI Monitoring**: Read signal strength for connected devices\n\n### Additional Features\n\n- 📱 **Cross-platform**: Works on both iOS and Android\n- 🎯 **TypeScript Support**: Full TypeScript definitions included\n- ⚡ **High Performance**: Built with React Native's Nitro modules architecture\n- 🚀 **Expo Compatible**: Works seamlessly with Expo managed and bare workflows\n- 🔐 **Permission Handling**: Built-in permission request helpers\n\n## 📦 Installation\n\n### React Native CLI\n\n```bash\nnpm install munim-bluetooth react-native-nitro-modules\n# or\nyarn add munim-bluetooth react-native-nitro-modules\n```\n\n### Expo\n\n```bash\nnpx expo install munim-bluetooth react-native-nitro-modules\n```\n\n\u003e **Note**: This library requires Expo SDK 50+ and works with both managed and bare workflows. To support Nitro modules, you need React Native version v0.78.0 or higher.\n\n### iOS Setup\n\nFor iOS, the library is automatically linked. However, you need to add the following to your `Info.plist`:\n\n```xml\n\u003ckey\u003eNSBluetoothAlwaysUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app uses Bluetooth for BLE communication\u003c/string\u003e\n\u003ckey\u003eNSBluetoothPeripheralUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app uses Bluetooth to create a peripheral device\u003c/string\u003e\n```\n\n**For Expo projects**, add these permissions to your `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"ios\": {\n      \"infoPlist\": {\n        \"NSBluetoothAlwaysUsageDescription\": \"This app uses Bluetooth for BLE communication\",\n        \"NSBluetoothPeripheralUsageDescription\": \"This app uses Bluetooth to create a peripheral device\"\n      }\n    }\n  }\n}\n```\n\n### Android Setup\n\nFor Android, add the following permissions to your `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH\" /\u003e\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\" /\u003e\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH_ADVERTISE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH_SCAN\" /\u003e\n\u003cuses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\" /\u003e\n\u003cuses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /\u003e\n\u003cuses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /\u003e\n```\n\n**For Expo projects**, add these permissions to your `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"android\": {\n      \"permissions\": [\n        \"android.permission.BLUETOOTH\",\n        \"android.permission.BLUETOOTH_ADMIN\",\n        \"android.permission.BLUETOOTH_ADVERTISE\",\n        \"android.permission.BLUETOOTH_SCAN\",\n        \"android.permission.BLUETOOTH_CONNECT\",\n        \"android.permission.ACCESS_FINE_LOCATION\",\n        \"android.permission.ACCESS_COARSE_LOCATION\"\n      ]\n    }\n  }\n}\n```\n\n## ⚡ Quick Start\n\n### Basic Usage - Peripheral Mode\n\n```typescript\nimport { startAdvertising, stopAdvertising, setServices } from 'munim-bluetooth'\n\n// Start advertising with basic options\nstartAdvertising({\n  serviceUUIDs: ['180D', '180F'],\n  localName: 'My Device',\n  manufacturerData: '0102030405',\n})\n\n// Set GATT services\nsetServices([\n  {\n    uuid: '180D',\n    characteristics: [\n      {\n        uuid: '2A37',\n        properties: ['read', 'notify'],\n        value: 'Hello World',\n      },\n    ],\n  },\n])\n\n// Stop advertising\nstopAdvertising()\n```\n\n### Basic Usage - Central Mode\n\n```typescript\nimport {\n  startScan,\n  stopScan,\n  connect,\n  discoverServices,\n  readCharacteristic,\n  subscribeToCharacteristic,\n} from 'munim-bluetooth'\n\n// Start scanning\nstartScan({\n  serviceUUIDs: ['180D'],\n  allowDuplicates: false,\n  scanMode: 'balanced',\n})\n\n// Connect to a device (deviceId from deviceFound event)\nawait connect('device-id-here')\n\n// Discover services\nconst services = await discoverServices('device-id-here')\n\n// Read a characteristic\nconst value = await readCharacteristic('device-id-here', '180D', '2A37')\n\n// Subscribe to notifications\nsubscribeToCharacteristic('device-id-here', '180D', '2A37')\n```\n\n### Advanced Usage with Supported Advertising Data Types\n\n```typescript\nimport {\n  startAdvertising,\n  updateAdvertisingData,\n  getAdvertisingData,\n  type AdvertisingDataTypes,\n} from 'munim-bluetooth'\n\n// Platform-supported advertising data configuration\nconst advertisingData: AdvertisingDataTypes = {\n  // 0x01 - Flags (LE General Discoverable Mode, BR/EDR Not Supported)\n  flags: 0x06,\n\n  // 0x02-0x07 - Service UUIDs (fully supported)\n  completeServiceUUIDs16: ['180D', '180F'],\n  incompleteServiceUUIDs128: ['0000180D-0000-1000-8000-00805F9B34FB'],\n\n  // 0x08-0x09 - Local Name (fully supported)\n  completeLocalName: 'My Smart Device',\n  shortenedLocalName: 'SmartDev',\n\n  // 0x0A - Tx Power Level (fully supported)\n  txPowerLevel: -12,\n\n  // 0x14-0x15 - Service Solicitation (fully supported)\n  serviceSolicitationUUIDs16: ['180D'],\n  serviceSolicitationUUIDs128: ['0000180D-0000-1000-8000-00805F9B34FB'],\n\n  // 0x16, 0x20, 0x21 - Service Data (fully supported)\n  serviceData16: [\n    { uuid: '180D', data: '0102030405' },\n    { uuid: '180F', data: '060708090A' },\n  ],\n  serviceData32: [\n    { uuid: '0000180D-0000-1000-8000-00805F9B34FB', data: '0B0C0D0E0F' },\n  ],\n\n  // 0x19 - Appearance (partial support)\n  appearance: 0x03c0, // Generic Watch\n\n  // 0x1F - Service Solicitation (32-bit) (fully supported)\n  serviceSolicitationUUIDs32: ['0000180D'],\n\n  // 0xFF - Manufacturer Specific Data (fully supported)\n  manufacturerData: '4C000215FDA50693A4E24FB1AFCFC6EB0764782500010001C5',\n}\n\n// Start advertising with supported data\nstartAdvertising({\n  serviceUUIDs: ['180D', '180F'],\n  advertisingData: advertisingData,\n})\n\n// Update advertising data dynamically\nupdateAdvertisingData({\n  flags: 0x04,\n  completeLocalName: 'Updated Device Name',\n  txPowerLevel: -8,\n})\n\n// Get current advertising data\nconst currentData = await getAdvertisingData()\nconsole.log('Current advertising data:', currentData)\n```\n\n## 🔧 API Reference\n\n### Peripheral Functions\n\n#### `startAdvertising(options)`\n\nStarts BLE advertising with the specified options.\n\n**Parameters:**\n\n- `options` (object):\n  - `serviceUUIDs` (string[]): Array of service UUIDs to advertise\n  - `localName?` (string): Device name (legacy support)\n  - `manufacturerData?` (string): Manufacturer data in hex format (legacy support)\n  - `advertisingData?` (AdvertisingDataTypes): Platform-supported advertising data\n\n#### `updateAdvertisingData(advertisingData)`\n\nUpdates the advertising data while advertising is active.\n\n**Parameters:**\n\n- `advertisingData` (AdvertisingDataTypes): New advertising data\n\n#### `getAdvertisingData()`\n\nReturns a Promise that resolves to the current advertising data.\n\n**Returns:** Promise\u003cAdvertisingDataTypes\u003e\n\n#### `stopAdvertising()`\n\nStops BLE advertising.\n\n#### `setServices(services)`\n\nSets GATT services and characteristics.\n\n**Parameters:**\n\n- `services` (array): Array of service objects\n\n### Central Functions\n\n#### `isBluetoothEnabled()`\n\nChecks if Bluetooth is enabled on the device.\n\n**Returns:** Promise\u003cboolean\u003e\n\n#### `requestBluetoothPermission()`\n\nRequests Bluetooth permissions (Android) or checks authorization status (iOS).\n\n**Returns:** Promise\u003cboolean\u003e\n\n#### `startScan(options?)`\n\nStarts scanning for BLE devices.\n\n**Parameters:**\n\n- `options?` (object):\n  - `serviceUUIDs?` (string[]): Filter by service UUIDs\n  - `allowDuplicates?` (boolean): Allow duplicate scan results\n  - `scanMode?` ('lowPower' | 'balanced' | 'lowLatency'): Scan mode\n\n#### `stopScan()`\n\nStops scanning for BLE devices.\n\n#### `connect(deviceId)`\n\nConnects to a BLE device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the device\n\n**Returns:** Promise\u003cvoid\u003e\n\n#### `disconnect(deviceId)`\n\nDisconnects from a BLE device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the device\n\n#### `discoverServices(deviceId)`\n\nDiscovers GATT services for a connected device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n\n**Returns:** Promise\u003cGATTService[]\u003e\n\n#### `readCharacteristic(deviceId, serviceUUID, characteristicUUID)`\n\nReads a characteristic value from a connected device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n- `serviceUUID` (string): The UUID of the service\n- `characteristicUUID` (string): The UUID of the characteristic\n\n**Returns:** Promise\u003cCharacteristicValue\u003e\n\n#### `writeCharacteristic(deviceId, serviceUUID, characteristicUUID, value, writeType?)`\n\nWrites a value to a characteristic on a connected device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n- `serviceUUID` (string): The UUID of the service\n- `characteristicUUID` (string): The UUID of the characteristic\n- `value` (string): The value to write (hex string)\n- `writeType?` ('write' | 'writeWithoutResponse'): Write type\n\n**Returns:** Promise\u003cvoid\u003e\n\n#### `subscribeToCharacteristic(deviceId, serviceUUID, characteristicUUID)`\n\nSubscribes to notifications/indications from a characteristic.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n- `serviceUUID` (string): The UUID of the service\n- `characteristicUUID` (string): The UUID of the characteristic\n\n#### `unsubscribeFromCharacteristic(deviceId, serviceUUID, characteristicUUID)`\n\nUnsubscribes from notifications/indications from a characteristic.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n- `serviceUUID` (string): The UUID of the service\n- `characteristicUUID` (string): The UUID of the characteristic\n\n#### `getConnectedDevices()`\n\nGets list of currently connected devices.\n\n**Returns:** Promise\u003cstring[]\u003e\n\n#### `readRSSI(deviceId)`\n\nReads RSSI (signal strength) for a connected device.\n\n**Parameters:**\n\n- `deviceId` (string): The unique identifier of the connected device\n\n**Returns:** Promise\u003cnumber\u003e\n\n### Types\n\n#### `AdvertisingDataTypes`\n\nPlatform-supported interface for BLE advertising data types:\n\n```typescript\ninterface AdvertisingDataTypes {\n  // 0x01 - Flags (partial support)\n  flags?: number\n\n  // 0x02-0x07 - Service UUIDs (fully supported)\n  incompleteServiceUUIDs16?: string[]\n  completeServiceUUIDs16?: string[]\n  incompleteServiceUUIDs32?: string[]\n  completeServiceUUIDs32?: string[]\n  incompleteServiceUUIDs128?: string[]\n  completeServiceUUIDs128?: string[]\n\n  // 0x08-0x09 - Local Name (fully supported)\n  shortenedLocalName?: string\n  completeLocalName?: string\n\n  // 0x0A - Tx Power Level (fully supported)\n  txPowerLevel?: number\n\n  // 0x14-0x15 - Service Solicitation (fully supported)\n  serviceSolicitationUUIDs16?: string[]\n  serviceSolicitationUUIDs128?: string[]\n\n  // 0x16, 0x20, 0x21 - Service Data (fully supported)\n  serviceData16?: Array\u003c{\n    uuid: string\n    data: string\n  }\u003e\n  serviceData32?: Array\u003c{\n    uuid: string\n    data: string\n  }\u003e\n  serviceData128?: Array\u003c{\n    uuid: string\n    data: string\n  }\u003e\n\n  // 0x19 - Appearance (partial support)\n  appearance?: number\n\n  // 0x1F - Service Solicitation (32-bit) (fully supported)\n  serviceSolicitationUUIDs32?: string[]\n\n  // 0xFF - Manufacturer Specific Data (fully supported)\n  manufacturerData?: string\n}\n```\n\n## Supported BLE Advertising Data Types\n\n| Hex              | Type Name                     | Description                     | Support Level | Example                                           |\n| ---------------- | ----------------------------- | ------------------------------- | ------------- | ------------------------------------------------- |\n| 0x01             | Flags                         | Basic device capabilities       | Partial       | `flags: 0x06`                                     |\n| 0x02-0x07        | Service UUIDs                 | Service UUIDs offered           | Full          | `completeServiceUUIDs16: ['180D']`                |\n| 0x08-0x09        | Local Name                    | Device name                     | Full          | `completeLocalName: 'My Device'`                  |\n| 0x0A             | Tx Power Level                | Transmit power in dBm           | Full          | `txPowerLevel: -12`                               |\n| 0x14-0x15        | Service Solicitation          | Services being sought           | Full          | `serviceSolicitationUUIDs16: ['180D']`            |\n| 0x16, 0x20, 0x21 | Service Data                  | Data associated with services   | Full          | `serviceData16: [{uuid: '180D', data: '010203'}]` |\n| 0x19             | Appearance                    | Appearance category             | Partial       | `appearance: 0x03C0`                              |\n| 0x1F             | Service Solicitation (32-bit) | 32-bit services being solicited | Full          | `serviceSolicitationUUIDs32: ['0000180D']`        |\n| 0xFF             | Manufacturer Specific Data    | Vendor-defined data             | Full          | `manufacturerData: '4748494A4B4C4D4E'`            |\n\n**Note**: This library focuses on reliability and platform compatibility. Advanced BLE features like mesh networking, LE Audio, indoor positioning, etc., are not supported due to platform limitations.\n\n## 📖 Usage Examples\n\n### Health Device Example\n\n```typescript\nimport { startAdvertising, setServices } from 'munim-bluetooth'\n\n// Health device advertising\nstartAdvertising({\n  serviceUUIDs: ['180D', '180F'], // Heart Rate, Battery Service\n  advertisingData: {\n    flags: 0x06, // LE General Discoverable Mode, BR/EDR Not Supported\n    completeLocalName: 'Health Monitor',\n    appearance: 0x03c0, // Generic Watch\n    txPowerLevel: -8,\n    manufacturerData: '0102030405', // Custom health data\n    serviceData16: [\n      { uuid: '180D', data: '6400' }, // Heart rate: 100 bpm\n      { uuid: '180F', data: '64' }, // Battery: 100%\n    ],\n  },\n})\n\n// Set up GATT services\nsetServices([\n  {\n    uuid: '180D', // Heart Rate Service\n    characteristics: [\n      {\n        uuid: '2A37', // Heart Rate Measurement\n        properties: ['read', 'notify'],\n        value: '6400', // 100 bpm\n      },\n    ],\n  },\n  {\n    uuid: '180F', // Battery Service\n    characteristics: [\n      {\n        uuid: '2A19', // Battery Level\n        properties: ['read', 'notify'],\n        value: '64', // 100%\n      },\n    ],\n  },\n])\n```\n\n### Smart Home Device Example\n\n```typescript\nimport { startAdvertising, updateAdvertisingData } from 'munim-bluetooth'\n\n// Smart home device\nstartAdvertising({\n  serviceUUIDs: ['1812', '180F'], // HID, Battery Service\n  advertisingData: {\n    flags: 0x04, // LE General Discoverable Mode\n    completeLocalName: 'Smart Light Bulb',\n    appearance: 0x03c1, // Generic Light Fixture\n    manufacturerData: '0102030405', // Custom light data\n    serviceData16: [\n      { uuid: '1812', data: '01' }, // HID: Keyboard\n      { uuid: '180F', data: '64' }, // Battery: 100%\n    ],\n  },\n})\n\n// Update advertising data when light state changes\nupdateAdvertisingData({\n  manufacturerData: '0102030406', // Updated light data\n  serviceData16: [\n    { uuid: '1812', data: '02' }, // HID: Mouse\n    { uuid: '180F', data: '50' }, // Battery: 80%\n  ],\n})\n```\n\n### Basic Peripheral Setup\n\n```js\nimport React, { useEffect } from 'react'\nimport {\n  startAdvertising,\n  stopAdvertising,\n  setServices,\n  addListener,\n  removeListeners,\n} from 'munim-bluetooth'\n\nconst MyPeripheral = () =\u003e {\n  useEffect(() =\u003e {\n    // Configure services\n    setServices([\n      {\n        uuid: '1800', // Generic Access Service\n        characteristics: [\n          {\n            uuid: '2a00', // Device Name\n            properties: ['read'],\n            value: 'MyDevice',\n          },\n          {\n            uuid: '2a01', // Appearance\n            properties: ['read'],\n            value: '0x03C0', // Generic Computer\n          },\n        ],\n      },\n      {\n        uuid: '1801', // Generic Attribute Service\n        characteristics: [\n          {\n            uuid: '2a05', // Service Changed\n            properties: ['indicate'],\n          },\n        ],\n      },\n    ])\n\n    // Start advertising\n    startAdvertising({\n      serviceUUIDs: ['1800', '1801'],\n      localName: 'MyReactNativePeripheral',\n    })\n\n    // Cleanup on unmount\n    return () =\u003e {\n      stopAdvertising()\n      removeListeners('connectionStateChanged')\n    }\n  }, [])\n\n  return \u003cText\u003ePeripheral is running...\u003c/Text\u003e\n}\n```\n\n### Device Scanner Example\n\n```js\nimport React, { useState, useEffect } from 'react'\nimport {\n  startScan,\n  stopScan,\n  connect,\n  discoverServices,\n  readCharacteristic,\n  subscribeToCharacteristic,\n  addListener,\n} from 'munim-bluetooth'\n\nconst DeviceScanner = () =\u003e {\n  const [devices, setDevices] = useState([])\n  const [connectedDevice, setConnectedDevice] = useState(null)\n\n  useEffect(() =\u003e {\n    // Start scanning\n    startScan({\n      serviceUUIDs: ['180D'], // Filter by Heart Rate service\n      allowDuplicates: false,\n      scanMode: 'balanced',\n    })\n\n    // Listen for discovered devices\n    addListener('deviceFound')\n    // Handle deviceFound events to update devices state\n\n    // Cleanup\n    return () =\u003e {\n      stopScan()\n      if (connectedDevice) {\n        disconnect(connectedDevice)\n      }\n    }\n  }, [])\n\n  const handleConnect = async (deviceId) =\u003e {\n    await connect(deviceId)\n    setConnectedDevice(deviceId)\n\n    // Discover services\n    const services = await discoverServices(deviceId)\n    console.log('Services:', services)\n\n    // Read a characteristic\n    const value = await readCharacteristic(deviceId, '180D', '2A37')\n    console.log('Heart Rate:', value)\n\n    // Subscribe to notifications\n    subscribeToCharacteristic(deviceId, '180D', '2A37')\n\n    // Listen for value changes\n    addListener('characteristicValueChanged')\n  }\n\n  return (\n    \u003cView\u003e\n      \u003cText\u003eFound {devices.length} devices\u003c/Text\u003e\n      {/* Render device list */}\n    \u003c/View\u003e\n  )\n}\n```\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n1. **Permission Denied**: Ensure you have the necessary Bluetooth permissions in your app\n2. **Advertising Not Starting**: Check that Bluetooth is enabled on the device\n3. **Services Not Visible**: Verify that your service UUIDs are properly formatted\n4. **Scanning Not Working**: On Android 6.0+, ensure location permissions are granted\n5. **Connection Fails**: Verify the device is in range and advertising\n\n### Expo-Specific Issues\n\n1. **Development Build Required**: This library requires a development build in Expo. Use `npx expo run:ios` or `npx expo run:android`\n2. **Permissions Not Working**: Make sure you've added the permissions to your `app.json` as shown in the setup section\n3. **Build Errors**: Ensure you're using Expo SDK 50+ and have the latest Expo CLI\n4. **Nitro Modules**: Make sure you have `react-native-nitro-modules` installed and configured\n\n### Debug Mode\n\nEnable debug logging by setting the following environment variable:\n\n```bash\nexport REACT_NATIVE_BLUETOOTH_DEBUG=1\n```\n\n## 👏 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cimg alt=\"Star the Munim Technologies repo on GitHub to support the project\" src=\"https://user-images.githubusercontent.com/9664363/185428788-d762fd5d-97b3-4f59-8db7-f72405be9677.gif\" width=\"50%\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunimtechnologies%2Fmunim-bluetooth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunimtechnologies%2Fmunim-bluetooth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunimtechnologies%2Fmunim-bluetooth/lists"}