A Python library for interacting with Garmin proprietary BLE protocols.
Project description
A clean-room Python implementation of Garmin's proprietary BLE protocol (GFDI V2), reverse-engineered from Gadgetbridge. Stream live telemetry from your Garmin watch directly to your computer — no cloud, no phone, no Garmin Connect required.
Features
- Live Telemetry — stream real-time sensor data over BLE without Garmin Connect:
- ❤️ Heart Rate & Resting Heart Rate
- 🚶 Daily Steps & Goal
- 📊 Heart Rate Variability (HRV)
- 🫁 Blood Oxygen (SpO2)
- 🌬️ Respiration Rate
- Protocol Decoding — full implementation of the Garmin GFDI V2 stack:
- Automated handshake (
CLOSE_ALL,REGISTER_ML) - MLR (Multi-Link Routing) packet multiplexing
- COBS (Consistent Overhead Byte Stuffing) encoding/decoding
- Compiled Protobufs for
gdi_smart_proto - CRC16 integrity checking
- Automated handshake (
- Hackable — pure Python, no binary blobs, no proprietary SDKs
Installation
pip install garmin-ble
Or install from source with dev dependencies:
git clone https://github.com/gwerneckp/garmin-ble.git
cd garmin-ble
pip install -e ".[dev]"
Quick Start
import asyncio
from garmin_ble import GarminClient
def on_heart_rate(hr, resting_hr):
print(f"❤️ {hr} BPM (Resting: {resting_hr} BPM)")
async def main():
client = GarminClient()
client.on("hr", on_heart_rate)
if await client.connect():
print("Connected! Streaming data...")
await client.start_sync_loop()
asyncio.run(main())
[!TIP] Make sure your watch is not connected to your phone via Bluetooth — Garmin watches only allow one BLE connection at a time.
See the examples/ directory for more usage.
Status & Roadmap
| Phase | Goal | Status |
|---|---|---|
| 1 | 🏗️ BLE transport & handshake | ✅ Done |
| 2 | 📡 Live telemetry streaming | ✅ Done |
| 3 | 🧠 Protobuf settings & device state | 🔄 In progress |
| 4 | 🔔 Notifications & media control | ⏳ Planned |
| 5 | 📁 File transfers (FIT / GPX downloads) | ⏳ Planned |
| 6 | 🗄️ Persistence & dashboard | ⏳ Planned |
See ROADMAP.md for the full breakdown.
Project Mission
Own your data. Garmin devices capture a wealth of physiological data, but Garmin Connect locks it behind a cloud service. This library gives you direct, programmatic access to your watch over BLE — no internet required.
Acknowledgements & License
This project builds on the extraordinary reverse-engineering work of the Gadgetbridge team. The protocol logic, COBS decoding, and .proto schemas are derived from their open-source Java implementation.
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file garmin_ble-0.2.0.tar.gz.
File metadata
- Download URL: garmin_ble-0.2.0.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c865f30bfd2ae301ea4ab5a3f686c90d04ec45caa5c884c35b4fb6655cdc06
|
|
| MD5 |
88cf449d50a641c759ffedca6ee86b82
|
|
| BLAKE2b-256 |
db4f8bc443273067f752edda4ef8bc81277195e595060225ad8fa67c1d529fda
|
Provenance
The following attestation bundles were made for garmin_ble-0.2.0.tar.gz:
Publisher:
publish.yml on gwerneckp/garmin-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
garmin_ble-0.2.0.tar.gz -
Subject digest:
37c865f30bfd2ae301ea4ab5a3f686c90d04ec45caa5c884c35b4fb6655cdc06 - Sigstore transparency entry: 1571134998
- Sigstore integration time:
-
Permalink:
gwerneckp/garmin-ble@b49e19f208c0dbbbefda6b05133417af432696aa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/gwerneckp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b49e19f208c0dbbbefda6b05133417af432696aa -
Trigger Event:
release
-
Statement type:
File details
Details for the file garmin_ble-0.2.0-py3-none-any.whl.
File metadata
- Download URL: garmin_ble-0.2.0-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad94df8e1cb225455005588b08991cfb71fed0d75096b7a6e74f55901f3c4b03
|
|
| MD5 |
a158143424ceb9377e39a85cd15cde4f
|
|
| BLAKE2b-256 |
2391725492c35162aaa5a968f7cc682008523384096028b081a9ca7d1abd0f79
|
Provenance
The following attestation bundles were made for garmin_ble-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on gwerneckp/garmin-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
garmin_ble-0.2.0-py3-none-any.whl -
Subject digest:
ad94df8e1cb225455005588b08991cfb71fed0d75096b7a6e74f55901f3c4b03 - Sigstore transparency entry: 1571135047
- Sigstore integration time:
-
Permalink:
gwerneckp/garmin-ble@b49e19f208c0dbbbefda6b05133417af432696aa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/gwerneckp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b49e19f208c0dbbbefda6b05133417af432696aa -
Trigger Event:
release
-
Statement type: