Skip to main content

A Python library for interacting with Garmin proprietary BLE protocols.

Project description

Garmin BLE Sync (Python)

A Python library reverse-engineered from Gadgetbridge, allowing direct Bluetooth Low Energy (BLE) communication with modern Garmin watches and heart rate monitors using their proprietary protocol (GFDI V2).

Features

  • Live Telemetry: Connects to the watch to stream real-time sensor data over BLE without requiring the Garmin Connect app.
    • Heart Rate & Resting Heart Rate
    • Daily Steps & Goal
    • Heart Rate Variability (HRV)
    • Blood Oxygen (SpO2)
    • Respiration Rate
  • Protocol Decoding:
    • Automated Handshake (CLOSE_ALL, REGISTER_ML)
    • MLR (Multi-Link Routing) packet multiplexing.
    • COBS (Consistent Overhead Byte Stuffing) Decoder implementation.
    • Compiled Python Protobufs to natively read Garmin's gdi_smart_proto.

Installation

# Clone the repository
git clone <repo_url>
cd garmin_ble

# Install dependencies (requires bleak and protobuf)
pip install .

Quick Start

See the examples/ directory for full usage.

import asyncio
from garmin_ble import GarminClient

def on_heart_rate(hr, resting_hr):
    print(f"HR: {hr} BPM (Resting: {resting_hr} BPM)")

async def main():
    client = GarminClient()
    client.on("hr", on_heart_rate)

    if await client.connect():
        await client.start_sync_loop()

asyncio.run(main())

Status & Roadmap

See ROADMAP.md for the current feature parity status with Gadgetbridge. We are currently moving through Phase 3: Protobuf Settings & Device State communication.

Acknowledgements & License

This project would not be possible without the incredible reverse-engineering efforts of the Gadgetbridge team. The Python implementation of the Garmin BLE protocol, COBS decoding, and the .proto schemas are heavily based on their original Java source code.

Because this project is a derivative work of Gadgetbridge, it inherits their open-source licensing. This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file 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.1.0.tar.gz (30.6 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.1.0-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file garmin_ble-0.1.0.tar.gz.

File metadata

  • Download URL: garmin_ble-0.1.0.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for garmin_ble-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8697c3c23032a911f1046902eb6297ea781444ce89904db38b80f52d172aa4ec
MD5 94eba2cc5c80806f46ad8bf72c8c5abd
BLAKE2b-256 df6f0f75a6790cb8ba35e930639c93226045c3ecfb3b0d420f4b24dbc268e26e

See more details on using hashes here.

File details

Details for the file garmin_ble-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: garmin_ble-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for garmin_ble-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4be27832e2489a660f971a520613f3517d5467ee6eb9406f95eaa63804d92f
MD5 3d52b0603f9f3a7dac8997b9783de03e
BLAKE2b-256 b6191372550509766a33031c78bb048992df652cc0787a8dc2b00c95a5b8a4a0

See more details on using hashes here.

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