@wklm/core
Web Bluetooth SDK -- scan, connect, read/write BLE devices from web apps (iOS Safari + Chrome).
Install
npm install @wklm/core
Usage
import { WebBLE } from '@wklm/core';
const ble = new WebBLE();
const device = await ble.requestDevice({
filters: [{ services: ['heart_rate'] }],
});
await device.connect();
const value = await device.read('heart_rate', 'heart_rate_measurement');
const unsub = device.subscribe('heart_rate', 'heart_rate_measurement', (dv) => {
console.log('Heart rate:', dv.getUint8(1));
});
device.on('disconnected', () => console.log('Device lost'));
API
WebBLE -- requestDevice(options?), getAvailability(), platform, isSupported
WebBLEDevice -- connect(), disconnect(), read(), write(), subscribe(), notifications() (async iterable), on('disconnected')
resolveUUID(name) -- resolve Bluetooth SIG names to full UUIDs
detectPlatform() -- returns 'ios-safari', 'chrome', or 'unsupported'
AI agent integration
MCP server for coding agents (Claude Code, Cursor, Copilot):
npx -y @wklm/mcp
Full SDK reference for LLM context: https://ioswebble.com/llms-full.txt
Two scopes
The @wklm/* packages (core, profiles, react) are the cross-browser BLE SDK -- they work on any platform with Web Bluetooth support (Chrome, Edge, iOS Safari via the extension). The @wklm/* packages (detect, cli, mcp, skill) handle iOS-specific extension detection, install prompts, and agent tooling. Use both together for full iOS Safari coverage.