BLEMeshJS
Build Bluetooth Mesh apps with a fast first success path.
Why this SDK exists
BLEMeshJS exists so you can build Bluetooth Mesh features in TypeScript without rebuilding provisioning, transport setup, key handling, and model messaging from scratch.
If you are here, you probably want one of these outcomes:
- Connect to an existing mesh node and send a real command.
- Provision a new device without hand-rolling provisioning flow logic.
- Ship one SDK mental model across web and React Native.
Get your first success in under 60 seconds
Use this when you want proof that your runtime is configured correctly.
- Install the runtime package.
- Create the mesh manager.
- Scan and connect to a provisioned proxy.
yarn add @blemeshjs/sdk-webimport { MeshNetworkManager, createMesh } from "@blemeshjs/sdk-web";
const mesh = await createMesh({
meshNetworkManager: MeshNetworkManager.instance,
});
if (!mesh.isNetworkCreated) {
await mesh.createNewMeshNetwork();
}
await new Promise<void>((resolve, reject) => {
const offProxy = mesh.connection.on("scan:new-proxy", async (proxy) => {
try {
await mesh.connection.connect(proxy);
mesh.connection.stopScan();
offProxy();
offError();
resolve();
} catch (error) {
reject(error);
}
});
const offError = mesh.connection.on("ble:error", (error) => {
offProxy();
offError();
reject(error);
});
mesh.connection.scan({ timeout: 10_000, notifyOnWaitingForAdvertisements: true });
});yarn add @blemeshjs/sdk-react-native \
@react-native-async-storage/async-storage \
react-native-ble-plx \
react-native-get-random-valuesimport { MeshNetworkManager, createMesh } from "@blemeshjs/sdk-react-native";
const mesh = await createMesh({
meshNetworkManager: MeshNetworkManager.instance,
});At this point, you should have a live mesh runtime
If this worked, your app can initialize BLE Mesh, discover a provisioned proxy, and open a connection.
Next, you will want to either provision a new device or send your first model command.
Choose your path
| Area | What it gives you | Best starting point |
|---|---|---|
| Getting Started | Install, runtime setup, and first connection | Setup Runtime |
| Core Concepts | Node/element/model mental model and provisioning flow | Core Concepts |
| Common Use Cases | Provisioning and device control workflows | Guides |
| Advanced / Edge Cases | Custom runtime wiring and operational patterns | Advanced |
| Reference | Auto-generated package API docs | API Reference |