Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.elata.bio/llms.txt

Use this file to discover all available pages before exploring further.

Use this page if you want the transport model and platform constraints, not a full walkthrough. If you want numbered steps for an existing app, use Stream Muse-Compatible EEG Over Web Bluetooth. If you want the scaffold path, use Build Your First Elata App.
Role in the SDK: camera rPPG is the usual first app. EEG is optional when you need brain signals. Web Bluetooth (eeg-web-ble with eeg-web) enables a live Muse-compatible headset. It is transport for EEG, not a parallel primary product to rPPG.

Start With A Known-Good Scaffolded App

If you want the fastest path to a working browser BLE example, scaffold the EEG starter app first:
pnpm create @elata-biosciences/elata-demo my-app -- --template eeg-ble
cd my-app
pnpm install
pnpm run dev
Use the rest of this guide when you want to add the same browser BLE flow to an existing app.

Requirements

  • Chrome, Edge, or Bluefy on iOS
  • https:// or localhost
  • Bluetooth enabled on the machine
  • A supported Muse-compatible EEG device
Supported device classes:
  • Muse 2 and Muse S classic BLE devices
  • Muse S Athena protocol v2 devices
  • The synthetic Muse-compatible BLE bridge used for testing
For browser BLE, use Chrome on desktop or Android, or Bluefy on iOS. Do not expect Safari itself to handle this workflow.

Install

pnpm add @elata-biosciences/eeg-web @elata-biosciences/eeg-web-ble

Minimal Integration

import { AthenaWasmDecoder } from "@elata-biosciences/eeg-web";
import { BleTransport } from "@elata-biosciences/eeg-web-ble";

const transport = new BleTransport({
  deviceOptions: {
    athenaDecoderFactory: () => new AthenaWasmDecoder(),
  },
});

transport.onFrame = (frame) => {
  console.log(frame.eeg.samples.length);
};

transport.onStatus = (status) => {
  console.log(status.state, status.reason);
};

await transport.connect();
await transport.start();

Typical Flow

  1. Confirm the app is running in a secure context.
  2. Construct BleTransport.
  3. Provide athenaDecoderFactory if you need Athena support.
  4. Subscribe to frame and status callbacks.
  5. Call connect() and then start().

When To Use The BLE Template Instead

Prefer the scaffolded eeg-demo app, or the dedicated eeg-ble starter, when you want:
  • a quick environment check for browser BLE support
  • a reference for transport startup and status handling
  • a simpler starting point than wiring the callbacks from scratch

Common Gotchas

  • If navigator.bluetooth is missing, you are likely in an unsupported browser or non-secure context.
  • If the device chooser never appears, confirm Bluetooth is enabled and the page is served from https:// or localhost.
  • If Athena devices fail to decode, make sure you pass an athenaDecoderFactory backed by @elata-biosciences/eeg-web.
  • If you need a normal iOS browser path, plan for a native bridge or hybrid strategy instead of Safari. The browser BLE guidance here assumes Bluefy on iOS.

Next

BLE Live Stream Tutorial

Step-by-step streaming guide

EEG In A Browser

Browser EEG package model

eeg-web-ble Reference

Transport API and options

Troubleshooting

Common failures and fixes