Skip to content

Th0rgal/open_oura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

open_oura

Reverse-engineering the Oura ring BLE protocol, plus an independent, cloud-free client that reads your data straight from the ring.

Tested live against a Ring 3 Horizon and a Ring 5 (pairing, auth, and event sync confirmed on both). Designed for Ring 3/4/5, which share the same GATT layout, packet framing, and authentication flow.

What you can recover

Straight from the ring, with no Oura account: device info, battery, live heart rate (IBI to BPM), latest HR / SpO2, and the full history-event stream. That stream carries raw PPG/IBI/temperature/motion/SpO2 samples plus the ring's on-device sleep stages, activity MET levels, and HRV.

The ring itself does not emit the 0-100 Readiness / Sleep / Activity / Stress scores. But those are not computed in Oura's cloud either: they're computed on the phone by the native ecore engine and a set of on-device PyTorch models (the same .pt we run here), then uploaded; the cloud only stores and syncs them back. So they're reproducible offline. The one genuine cloud-only step is workout auto-classification (POST /api/activity-tagging/v2). See docs/data-recovery-map.md, docs/algorithms/README.md, and docs/model-runners.md for what runs.

Those PyTorch models are Oura's proprietary IP and are NOT included in this repo (gitignored under notes/models/). The runners reference them by path; you decrypt and supply your own locally. Nothing model-related is committed or pushed.

Repository map

  • crates/: the Rust client, split by concern (oura-protocol decode, oura-link fetch, oura-analysis metrics, oura-store SQLite, oura-cli). Start here: crates/README.md and docs/architecture.md.
  • tools/: Python research bench for protocol exploration. oura_protocol.py (full command matrix, auth, danger-gated ops, JSONL capture) and oura_realtime_listener.py.
  • docs/: protocol and reverse-engineering reference (index below).
  • reverse/, captures/: local-only, gitignored. The decompiled app and raw captures (which may contain serials, MACs, and auth keys).

Quick start (Rust client)

cargo build --release
./target/release/oura scan
./target/release/oura --key-file key.hex info

See crates/README.md for all commands (scan, pair, info, sync, latest, live-hr, accel, viz, game, features, rdata, events, redecode, sleep-analyze, sessions) and the auth-key details. oura viz opens a real-time 3D motion visualizer in the browser; oura game is a tilt-controlled asteroid game driven by the ring.

Research bench (Python)

python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python tools/oura_protocol.py --list

State-changing and destructive commands are hidden behind --include-state and --include-danger. On macOS, grant Bluetooth permission to the terminal.

Documentation

Safety and secrets

  • Prefer passive, read-only requests. reset / DFU / factory-reset / flight-mode are gated behind explicit flags; do not send them during normal use.
  • App-gated operations need the ring's 16-byte auth key (re-sent each connection). Captures and keys are gitignored. Never commit a key.

Prior art

ringverse Oura Ring 4 BLE notes: https://github.com/ringverse/protocol/blob/main/oura/BLE.md

About

A Rust toolkit for the Oura Ring (Gen 3/4/5): reverse-engineered BLE protocol, event decoders, and reimplemented data-processing algorithms. Sync, store, and analyze your data locally.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors