| Crates.io | bitalino_rs |
| lib.rs | bitalino_rs |
| version | 0.2.1 |
| created_at | 2025-12-31 19:15:25.129618+00 |
| updated_at | 2026-01-11 19:52:35.274049+00 |
| description | BITalino Bluetooth/serial driver with Python bindings (PyO3, abi3). |
| homepage | https://github.com/tleygue/bitalino_rs |
| repository | https://github.com/tleygue/bitalino_rs |
| max_upload_size | |
| id | 2015157 |
| size | 232,963 |
Rust driver and Python bindings for BITalino biosignal acquisition devices. This project opens RFCOMM connections to pre-paired devices with a minimal libc-based stack, exposes a safe Rust API, and ships Python wheels for easy use in data pipelines.
bitalino_rs (built with maturin, published from tags)bitalino-rs (Rust library)src/ – Rust library (Bluetooth, driver, Python bindings)bitalino_rs/ – Python package stub for maturin buildsdocs/ – User/developer docs (mkdocs).github/workflows/ – CI, release, PyPI publishuv pip install bitalino-rs
Requirements: Rust (stable), Python 3.11+.
# in repo root
uv sync
cargo build --release
use bitalino_rs::{Bitalino, SamplingRate};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut dev = Bitalino::connect("7E:91:2B:C4:AF:08", "1234")?;
dev.start(SamplingRate::Hz1000 as u16, Some(vec![0, 1, 2]))?;
let frames = dev.read_frames(100)?;
println!("read {} frames", frames.len());
dev.stop()?;
Ok(())
}
from bitalino_rs import Bitalino
dev = Bitalino.connect("7E:91:2B:C4:AF:08")
dev.start(rate=1000, channels=[0, 1, 2])
batch = dev.read_timed(200)
print(batch.timestamp_us, batch.sequence_gaps)
dev.stop()
rustup toolchain install stable (CI uses stable with rustfmt/clippy)sudo apt-get install -y pkg-config libdbus-1-dev libudev-devpre-commit run --all-filescargo test --all-features --all-targetsinfo. Override with BITALINO_LOG=debug (falls back to RUST_LOG if unset).bitalino_rs::init_rust_logging() once (idempotent).bitalino_rs.enable_rust_logs("debug") or clear caches with bitalino_rs.reset_log_cache() after reconfiguring Python logging.Apache License 2.0. See LICENSE.