openfrenz
Open-source tools for the FRENZ brainband: connect over Bluetooth LE, stream every sensor, record sessions losslessly, and export time-aligned data for analysis. Written in Rust, with a Python package that does all of it too.
Unofficial. This project is not affiliated with or endorsed by Earable. "FRENZ" is used only to describe compatibility.
What you get
| Piece | What it does |
|---|---|
frenz (command-line tool) |
scan, record, summary, export, synth — see the CLI guide |
frenz (Rust library) |
async client: connect, typed events for every stream, commands, crash-safe recording |
frenz-proto |
packet decoders and command encoders; no_std, no dependencies, never panics on any input |
frenz-export |
recordings → one Parquet file per stream with an estimated acquisition time for every sample |
openfrenz (Python) |
the same client from Python: live streams as NumPy / pandas / polars, recording, export, loading sessions and building aligned fixed-length windows. See the Python guide |
Streams: EEG (4 channels, 125 Hz), accelerometer and gyroscope (50 Hz), PPG (25 Hz), heart rate, SpO2, battery and electrode-contact quality. What is known about the hardware and its Bluetooth interface is written up in docs/HARDWARE.md.
Install
Command-line tool. Needs Rust 1.88 or newer.
- macOS: the terminal application needs Bluetooth permission (System Settings → Privacy & Security → Bluetooth); macOS asks the first time you scan.
- Linux: install the build packages first (
sudo apt-get install libdbus-1-dev pkg-configon Debian/Ubuntu), and BlueZ must be running.
Python package. Needs Python 3.10 or newer; no Rust needed. It also installs the frenz command.
Quick start
No band at hand? frenz synth demo.sqlite writes a synthetic recording you can summarize and
export the same way.
From Python (see the Python guide):
# records to recordings/ by default
# (4, n) raw counts
# (n,) estimated Unix seconds
break
= # same files as `frenz export`
, , =
From Rust:
use ;
use Packet;
let band = connect.await?;
let mut events = band.subscribe;
while let Ok = events.recv.await
Design principles
- Nothing is silently changed. Recordings store every notification exactly as received. Lost packets, repeated blocks, frozen sensor output and disconnects are reported and flagged, never dropped, filled in or smoothed over.
- Honest timing. Arrival times, the band's own clock and estimated acquisition times are kept separately; the estimate and its measured jitter are documented in each export.
- Raw units. Values stay in device counts, with known scales and open questions documented.
Status and limits
Tested with one band (firmware X8.2.2_1.1.19) on macOS. Linux and Windows build and pass the
hardware-free tests in CI but have not been tried with a band. The live Bluetooth path (including
automatic reconnection) is tested by hand, not in CI. Not yet implemented: audio and stimulation
commands, and conversion of EEG counts to microvolts (the scale
is not yet known). Recordings contain physiological data: keep them out of version control.
Development
&& && &&