Type-safe RPC over
Bluetooth Low Energy
Define your device API once in Protocol Buffers. bleRPC generates type-safe clients and handlers for six platforms — with MTU-aware fragmentation and optional end-to-end encryption built in.
message EchoRequest { string message = 1; }
message EchoResponse { string message = 1; }
let client = BlerpcClient()
try await client.connect(device: devices[0])
let res = try await client.echo(message: "hello")
print(res.message) // "hello"val client = BlerpcClient(context)
client.connect(devices[0])
val res = client.echo(message = "hello")
println(res.message) // "hello"final client = BlerpcClient();
await client.connect(devices[0]);
final res = await client.echo(message: 'hello');
print(res.message); // "hello"const client = new BlerpcClient()
await client.connect(devices[0])
const res = await client.echo({ message: 'hello' })
console.log(res.message) // "hello"client = BlerpcClient()
await client.connect(devices[0])
resp = await client.echo(message="hello")
print(resp.message) # "hello"blerpc_EchoResponse resp;
int ret = blerpc_echo("hello", &resp);
if (ret == 0)
printk("%s\n", resp.message); // "hello"Features
Protocol Buffers
Define your BLE communication with .proto files. Get type-safe, language-agnostic serialization with zero ambiguity.
High Performance
Saturates the BLE link with MTU-aware fragmentation and zero-copy optimizations — up to ~59 KB/s measured (Android).
End-to-End Encryption
Optional E2E encryption with X25519 key exchange, Ed25519 signatures, and AES-128-GCM session encryption.
Architecture
How It Works
bleRPC provides a layered protocol stack on top of BLE GATT:
- Command Layer — Wraps Protocol Buffers payloads with command metadata (name, type, data length).
- Encryption Layer (optional) — Encrypts the serialized command with AES-128-GCM after a 4-step key exchange.
- Container Layer — Fragments payloads into MTU-sized containers for BLE transmission, with reassembly on the receiving side.
All communication uses a single GATT Characteristic: the Central writes requests via Write Without Response and receives responses via Notify.
Read the full protocol specification →
Benchmarks
Real-world throughput
Measured against an nRF54L15 DK peripheral with E2E encryption enabled (AES-128-GCM), MTU 247 — flash-read throughput.
Ecosystem
Supported Platforms
Central (Client)
| Platform | Language | BLE Stack | Status |
|---|---|---|---|
| iOS | Swift | CoreBluetooth | Stable |
| Android | Kotlin | Android BLE | Stable |
| iOS / Android | Dart (Flutter) | flutter_blue_plus | Stable |
| iOS / Android | TypeScript (React Native) | react-native-ble-plx | Stable |
| macOS / Linux | Python | bleak | Stable |
| Zephyr (nRF54L15) | C | Zephyr BLE | Stable |
Peripheral (Server)
| Platform | Language | BLE Stack | Status |
|---|---|---|---|
| Zephyr (nRF54L15) | C | Zephyr BLE | Stable |
| Zephyr (EFR32xG22E) | C | Zephyr BLE + SiLabs HCI | Stable |
| macOS | Python | bless | Stable |
Protocol Libraries
| Language | Package | Dependencies |
|---|---|---|
| Swift | blerpc-protocol-swift | Foundation + CryptoKit |
| Kotlin | blerpc-protocol-kt | Protobuf JavaLite |
| Dart | blerpc-protocol-dart | cryptography |
| Python | blerpc-protocol | cryptography |
| TypeScript | blerpc-protocol-rn | @noble/ciphers + @noble/curves + @noble/hashes |
| C | blerpc-protocol/c | None (PSA Crypto on Zephyr) |
Ship your device API today
Read the protocol spec, wire up a client, and talk to hardware in minutes.