Expand description
§awear
Rust client library for AWEAR EEG devices over Bluetooth Low Energy.
Handles BLE scanning, connection, HMAC-SHA256 challenge-response authentication, LUCA protocol parsing, and real-time EEG data streaming via an async event channel.
§Quick Start
use awear::prelude::*;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = AwearClient::new(AwearClientConfig::default());
let (mut rx, handle) = client.connect().await?;
handle.start().await?;
while let Some(event) = rx.recv().await {
match event {
AwearEvent::Eeg(r) => println!("EEG: {} samples", r.samples.len()),
AwearEvent::Battery(b) => println!("Battery: {}%", b),
_ => {}
}
}
Ok(())
}Modules§
- awear_
client - BLE scanning, connection, authentication, and data streaming for AWEAR devices.
- parse
- Binary parsers for AWEAR BLE data packets.
- prelude
- protocol
- AWEAR BLE protocol constants, UUIDs, and command helpers.
- types
- Data types for AWEAR device events and state.