react-native-ble-peripheral-manager
v0.3.0
Published
React Native library for BLE peripheral mode (GATT server, advertising) on iOS and Android.
Downloads
284
Maintainers
Readme
React Native BLE Peripheral Manager
A cross-platform React Native library to enable BLE Peripheral Mode on iOS and Android.
🚀 Overview
React Native BLE Peripheral Manager aims to expose full support for Bluetooth Low Energy (BLE) Peripheral mode in React Native apps. It bridges native BLE peripheral APIs on both iOS and Android, enabling your app to advertise, expose services and characteristics, and communicate with central devices (like phones, tablets, or medical devices).
🔧 Features
- ✅ Advertising, GATT services/characteristics, and characteristic permissions
- ✅ Notify/indicate, read/write requests (
respondToRequest), connection latency, and event subscriptions for the full peripheral lifecycle - ✅ Cross-platform TypeScript API (iOS and Android)
- ✅ iOS: L2CAP channels and state restoration (Android has no L2CAP in peripheral mode)
- ✅ Android: broadcast intents forwarded to JS for automation / ADB workflows
📱 Platform Support
| Platform | Peripheral Mode Support | | -------- | -------------------------------------------------------------- | | iOS | ✅ Fully supported (iOS 11+) | | Android | ✅ Supported on Android 5.0+ |
📦 Installation
npm install react-native-ble-peripheral-manager
# or
yarn add react-native-ble-peripheral-managerSetup and usage: see Getting started (iOS Info.plist, Android permissions, minimal API, links to the example app).
Documentation
- Getting started — install, iOS & Android setup, permissions, minimal usage
- Documentation index — table of contents for all guides
- Android broadcast intents — automation/ADB → JS → peripheral (implementation: architecture doc)
Example Demo App
Here left side is nRFConnect iOS app that works as BLE Cental and right side is react-native-ble-peripheral-manager powered android app that acts as HearRateMonitor OR LBS(LightButtonService). And we can see that Android app emulates the BLE peripheral behaviour and its can communicate with Central app exactly same why as a real BLE device does
https://github.com/user-attachments/assets/e5472968-2e33-4f8d-8f64-4e170f9928d5
Contributing
See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
