Skip to main content

Crate hermes_ble

Crate hermes_ble 

Source
Expand description

§hermes-ble

Async Rust library and terminal UI for streaming EEG data from Hermes V1 headsets over Bluetooth Low Energy.

§Supported hardware

ModelADCEEG channelsIMUNotes
Hermes V1ADS129989-DOF (accel + gyro + mag)250 Hz EEG, 24-bit resolution

§Quick start

use hermes_ble::prelude::*;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = HermesClient::new(HermesClientConfig::default());
    let (mut rx, handle) = client.connect().await?;
    handle.start().await?;

    while let Some(event) = rx.recv().await {
        match event {
            HermesEvent::Eeg(s) => println!("EEG ch0={:.2} µV", s.channels[0]),
            HermesEvent::Disconnected => break,
            _ => {}
        }
    }
    Ok(())
}

§Module overview

ModulePurpose
preludeOne-line glob import of the most commonly needed types
hermes_clientBLE scanning, connecting, and the hermes_client::HermesHandle command API
typesAll event and data types produced by the client
protocolGATT UUIDs, sampling constants, ADS1299 conversion, and command builders
parseLow-level byte-to-sample decoders for EEG and IMU packets

Modules§

hermes_client
BLE scanning, connecting, and the HermesHandle command API for Hermes V1 EEG headsets.
parse
Binary decoders for Hermes V1 BLE notification payloads.
prelude
Convenience re-exports for downstream crates.
protocol
GATT UUIDs, sampling constants, and sensor scaling factors for Hermes V1 EEG headsets.
tui_app
Testable TUI application state and signal simulation.
types
All event and data types produced by the Hermes client.