بنقرة واحدة
beacio
Web Bluetooth SDK — scan, connect, read/write BLE devices from web apps (iOS Safari + Chrome)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Web Bluetooth SDK — scan, connect, read/write BLE devices from web apps (iOS Safari + Chrome)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | beacio |
| description | Web Bluetooth SDK — scan, connect, read/write BLE devices from web apps (iOS Safari + Chrome) |
| trigger | bluetooth ble web-bluetooth ios safari navigator.bluetooth requestDevice beacio beacio bluetooth-scan gatt connect-device heart-rate-monitor ble-profile bluetooth-low-energy |
beacio is a Web Bluetooth SDK for web apps. It works on Chrome natively and on iOS Safari via a companion app + Safari extension. The SDK provides scan, connect, read/write/subscribe operations for BLE devices.
| You want to... | Install | Scope |
|---|---|---|
| Scan, connect, read/write BLE devices | npm install @beacio/core | @beacio |
| Use typed device profiles (heart rate, battery, device info) | npm install @beacio/core (import from @beacio/core/profiles) | @beacio |
| React hooks and components for BLE | npm install @beacio/react | @beacio |
| Detect iOS Safari extension, show install banner | npm install @beacio/core (import from @beacio/core/detect) | @beacio |
| AI agent MCP tools | npx -y @beacio/mcp | @beacio |
| CLI scaffolding | npx beacio init | @beacio |
Scope: All packages are published under @beacio/*.
npm install @beacio/core
import { beacio } from '@beacio/core'
const ble = new Beacio()
const device = await ble.requestDevice({
filters: [{ services: ['heart_rate'] }]
})
await device.connect()
const value = await device.read('heart_rate', 'heart_rate_measurement')
device.subscribe('heart_rate', 'heart_rate_measurement', (data) => {
console.log('Heart rate:', data)
})
Profiles ship inside @beacio/core — no separate install; import the /profiles subpath:
npm install @beacio/core
import { HeartRateProfile } from '@beacio/core/profiles'
const profile = new HeartRateProfile(device)
profile.onHeartRate((data) => {
console.log(`BPM: ${data.heartRate}, Contact: ${data.contactDetected}`)
})
The detect helpers ship inside @beacio/core — import the /detect subpath:
npm install @beacio/core
import { initBeacio } from '@beacio/core/detect'
initBeacio({})
You already have a working navigator.bluetooth app (Chrome/Android) and want it to run on iPhone Safari. Don't hand-edit it — run npx beacio migrate (or, for an agent, call the beacio_patch_existing_app MCP tool) to apply the three edits below in place.
@beacio/core bootstrap firstThe classic global browser-auto.global.js build polyfills navigator.bluetooth on iOS and self-no-ops on Chrome/Android. It MUST load before any code that reads navigator.bluetooth:
<script src="https://cdn.beacio.com/@beacio/core@1.0.0/dist/browser-auto.global.js"></script>
optionalServices to your existing iOS requestDevice calliOS enforces the service allow-list strictly, so every service you later getPrimaryService() must be declared. Add the filtered services to optionalServices (additive — it does not remove any filter):
const device = await navigator.bluetooth.requestDevice({
filters: [{ services: ['heart_rate'] }],
optionalServices: ['heart_rate'], // required on iOS Safari for getPrimaryService()
})
npm install @beacio/core
import { initBeacio } from '@beacio/core/detect'
initBeacio({}) // React/Next.js: wrap with <BeacioProvider> from '@beacio/react'
npx beacio check
{
"beacio": {
"command": "npx",
"args": ["-y", "@beacio/mcp"]
}
}
navigator.bluetooth calls except to add the filtered services to optionalServices on iOS (the one edit Path B requires) — the extension handles the rest'heart_rate') not hex ('0x180D') — the SDK resolves automatically@beacio/core/profiles for standard devices instead of writing raw GATT parsing code@beacio/react hooks instead of raw event listeners