Skip to main content

MuseBleDevice

MuseBleDevice is the low-level Web Bluetooth class that handles device pairing, GATT characteristic subscriptions, and packet decoding. BleTransport wraps it to provide the normalized HeadbandTransport interface. You typically don’t use MuseBleDevice directly — use BleTransport instead.

Supported Protocols

Protocol is auto-detected during connection based on device characteristics.

Classic Protocol

Classic Muse headbands expose 4 EEG channels at 256 Hz. Each channel has its own GATT characteristic: PPG is available on 3 additional characteristics (PPG1, PPG2, PPG3).

Athena Protocol

Athena headbands use a different packet format with two main characteristics: Athena requires a decoder factory. Without one, connection will fail:

MuseDeviceOptions


MuseBoardInfo

Returned by getBoardInfo() after connection:

Browser Compatibility

Web Bluetooth requires HTTPS. It will not work on http:// (except localhost for development).

Safari/iOS Workarounds

Three strategies for iOS support:
  1. Native app shell (recommended): implement BLE in Swift with CoreBluetooth, bridge frames to web UI
  2. Companion bridge: native app streams frames over WebSocket/WebRTC to the web app
  3. Hybrid WebView: WKWebView with native message handlers for BLE
In all cases, use the HeadbandFrameV1 schema as the interface boundary so browser and native transports emit the same frame shape.