Bluetooth Low Energy

Offline Protocol vs react-native-ble-plx

react-native-ble-plx is a free, open-source Bluetooth Low Energy library for React Native that lets a phone scan for, connect to, read from and write to BLE peripherals such as sensors and wearables. Its README lists communicating between phones (peripheral support) among the things it does not do. Offline Protocol is a mesh SDK for React Native that runs both Bluetooth LE roles itself and adds discovery, MLS encryption, device identity, retries and relaying across several phones, but it only talks to devices running the SDK. Use ble-plx to reach an accessory; use a mesh SDK such as Offline Protocol to connect phones to each other.

TL;DR

react-native-ble-plx is a free, central-role library for reaching BLE accessories, while Offline Protocol is a mesh SDK that connects phones, or phones and gateways, running the SDK. Connecting phones on ble-plx means building the peripheral role, delivery handling, encryption, identity and relaying yourself. An app that needs both jobs can use the two together.

Learning objectives

After reading this article you will be able to:

  • Distinguish what react-native-ble-plx provides from what a phone-to-phone mesh SDK provides
  • List the work an app would add on top of ble-plx to connect phones directly
  • Decide between ble-plx, Offline Protocol, or both for a React Native app

react-native-ble-plx vs Offline Protocol layers

react-native-ble-plx and Offline Protocol both use Bluetooth Low Energy from a React Native app, but they sit at different layers and answer different questions.

react-native-ble-plx is a BLE library maintained by dotintent. As of October 2026 its current npm release is 3.5.1. Its README lists what it supports: observing the Bluetooth adapter state, scanning, connecting to peripherals, discovering services and characteristics, reading, writing and subscribing to notifications, reading RSSI, negotiating the MTU, and background mode on iOS. It also lists what it does not support: communicating between phones using BLE (peripheral support), bonding peripherals, Bluetooth Classic devices and beacons. It is built for a phone talking to an accessory, with the phone in the central role.

Offline Protocol is a mesh SDK. In version 0.30.0 the React Native package, @offline-protocol/mesh-sdk, has native bridges for Bluetooth LE on iOS and Android and handles both sides of the link itself. On top of the radio it gives each device an Ed25519 identity and an address derived from it, opens MLS-encrypted sessions and groups, and delivers messages with acknowledgments, retries and an outbox. Messages can be relayed across other phones, with an initial limit of 8 hops in version 0.30.0. It also carries replicated documents and service calls. It runs its own application protocol, so it connects only to devices running the SDK, and it is not Bluetooth SIG Mesh.

react-native-ble-plx vs Offline Protocol features

ble-plx is built for a phone talking to a BLE accessory, in the central role only, while Offline Protocol is built for phones and gateways talking to each other, with both roles handled by the SDK.

react-native-ble-plxOffline Protocol
Built forA phone talking to a BLE accessoryPhones and gateways talking to each other
BLE rolesCentral onlyBoth, handled by the SDK
Talks to standard BLE accessoriesYesNo; only to devices running the SDK
Phone to phoneNot supported, per its READMEYes
Messages across several phonesNoYes, multi-hop relay
Encryption and identityNot part of the libraryMLS sessions and groups, Ed25519 device identity
Delivery handlingYour codeAcknowledgments, retries, outbox and deduplication
Message sizeYour code splits data to fit the MTUUp to 256 KiB per direct message; file transfer for larger payloads (version 0.30.0)
ExpoNeeds a build with native code; not Expo GoExpo development builds; not Expo Go
Licensing and cost (as of October 2026)Free and open sourceFree under AGPL-3.0-only; commercial license for closed-source and App Store apps

Phone-to-phone links on react-native-ble-plx

A team that starts from ble-plx to connect two phones takes on the parts the library leaves out, starting with the peripheral role, which needs native modules on iOS and Android, as the ble-plx phone-to-phone article sets out. After that comes deciding which phone advertises and which scans, splitting messages to the negotiated MTU, reconnecting after drops, acknowledging and retrying, and suppressing duplicates. Encryption between the phones, a stable identity for each device, and relaying through other phones are separate projects again.

That work is the difference in cost. ble-plx costs nothing to install, and the engineering and testing of the phone-to-phone layer falls to your team. A mesh SDK moves that layer into a maintained package, so the team’s time goes into the app’s own workflow, such as a handoff between a driver and a yard operator or a shared checklist on a site with no coverage.

react-native-ble-plx use cases

Choose ble-plx when the app talks to BLE accessories. For these jobs ble-plx is the right tool, and Offline Protocol cannot do them:

  • Your app talks to a sensor, a lock, a wearable or another BLE accessory with its own GATT service.
  • You need low-level control of scanning, connections and characteristics.
  • Every device on the other end is an accessory, not a phone.

Offline Protocol use cases

Choose Offline Protocol when the devices that need to talk are phones, or phones and gateways, running the SDK, in cases like these:

  • Phones, or phones and gateways, need to exchange messages or shared state with each other directly.
  • Messages may need to hop across other phones to reach one out of range.
  • You want encryption between devices and delivery handling without building them.

On licensing: the mesh SDK is free under AGPL-3.0-only, including in production, when the app meets its obligations, such as offering users the corresponding source. For Apple App Store distribution the commercial license is the supported option; it is annual with no published price. Traffic between devices over a local transport is never metered on any plan.

Using react-native-ble-plx with Offline Protocol

An app can use react-native-ble-plx and Offline Protocol together. Some apps need both jobs: a phone reads a sensor, and phones share what it reported. ble-plx can handle the accessory and Offline Protocol the phone-to-phone side, in the same app. Both drive the phone’s Bluetooth radio, so test the combination on the exact devices you ship, with the app in the foreground and the background, before relying on it.

Frequently asked questions

Can Offline Protocol connect to a BLE sensor or wearable?

No. Offline Protocol runs its own protocol over Bluetooth LE between devices that run the SDK. To read a heart-rate strap, a lock or a sensor with a standard GATT service, use a central-role library such as react-native-ble-plx.

Do either of them work in Expo Go?

No. Both need custom native code. ble-plx's README says it cannot be used in Expo Go and needs a build with native modules, such as one made with `npx expo prebuild`. The Offline Protocol mesh SDK runs in native iOS and Android builds, including Expo development builds, but not in Expo Go.

How large a message can Offline Protocol send?

Up to 256 KiB per direct message in version 0.30.0, with file transfer for larger payloads. With ble-plx, your own code splits data to fit the MTU.

Is Offline Protocol the same as Bluetooth SIG Mesh?

No. It runs its own application protocol, so it connects only to devices running the SDK.

How many hops can Offline Protocol relay a message?

Messages can be relayed across other phones, with an initial limit of 8 hops in version 0.30.0.

Does react-native-ble-plx handle encryption between devices?

No. Encryption and identity are not part of the library. Offline Protocol gives each device an Ed25519 identity and opens MLS-encrypted sessions and groups.

Sources

Build it with Offline Protocol

The quickstart installs the Offline Protocol mesh SDK in a React Native app, runs it on two physical phones, and sends an encrypted message over Bluetooth LE with no account, key or server.

Read the quickstart