aranet-core
Core BLE library for Aranet environmental sensors.
This crate provides low-level Bluetooth Low Energy (BLE) communication with Aranet sensors including the Aranet4, Aranet2, AranetRn+ (Radon), and Aranet Radiation devices.
Features
- Device discovery — Scan for nearby Aranet devices via BLE
- Current readings — CO₂, temperature, pressure, humidity, radon, radiation
- Historical data — Download measurement history with timestamps
- Device settings — Read/write measurement interval, Bluetooth range
- Auto-reconnection — Configurable backoff and retry logic
- Real-time streaming — Subscribe to sensor value changes
- Multi-device support — Manage multiple sensors simultaneously
Supported Devices
| Device | Sensors |
|---|---|
| Aranet4 | CO₂, Temperature, Pressure, Humidity |
| Aranet2 | Temperature, Humidity |
| AranetRn+ | Radon (Bq/m³), Temperature, Pressure, Humidity |
| Aranet Radiation | Dose Rate (µSv/h), Total Dose (mSv) |
Installation
[]
= "0.1"
Usage
use ;
async
Platform Notes
Device identification varies by platform:
- macOS: Devices are identified by a UUID assigned by CoreBluetooth (stable per Mac, but differs between Macs)
- Linux/Windows: Devices are identified by their Bluetooth MAC address (e.g.,
AA:BB:CC:DD:EE:FF)
Examples
Run the examples with:
# Scan for nearby devices
# Read current sensor values
# Download measurement history
Related Crates
This crate is part of the aranet workspace:
| Crate | crates.io | Description |
|---|---|---|
| aranet-types | Shared types for sensor data | |
| aranet-store | Local data persistence | |
| aranet-cli | Command-line interface | |
| aranet-tui | Terminal UI dashboard | |
| aranet-service | - | Background collector and REST API |
| aranet-gui | - | Desktop GUI application |
| aranet-wasm | - | WebAssembly module |
License
MIT
Made with ❤️ by Cameron Rye