Skip to main content

A Python library for interacting with Garmin proprietary BLE protocols.

Project description

garmin-ble logo garmin-ble

PyPI Python Version License

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
  • 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

garmin_ble-0.2.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

garmin_ble-0.2.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

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

Hashes for garmin_ble-0.2.0.tar.gz
Algorithm Hash digest
SHA256 37c865f30bfd2ae301ea4ab5a3f686c90d04ec45caa5c884c35b4fb6655cdc06
MD5 88cf449d50a641c759ffedca6ee86b82
BLAKE2b-256 db4f8bc443273067f752edda4ef8bc81277195e595060225ad8fa67c1d529fda

See more details on using hashes here.

Provenance

The following attestation bundles were made for garmin_ble-0.2.0.tar.gz:

Publisher: publish.yml on gwerneckp/garmin-ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for garmin_ble-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad94df8e1cb225455005588b08991cfb71fed0d75096b7a6e74f55901f3c4b03
MD5 a158143424ceb9377e39a85cd15cde4f
BLAKE2b-256 2391725492c35162aaa5a968f7cc682008523384096028b081a9ca7d1abd0f79

See more details on using hashes here.

Provenance

The following attestation bundles were made for garmin_ble-0.2.0-py3-none-any.whl:

Publisher: publish.yml on gwerneckp/garmin-ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page