Offline-first BLE tools for collecting and retrieving device-resident data from supported Polar wearables.
Project description
polar-ble-tools
Offline-first Python tools for on-device data collection and local retrieval from supported Polar wearable devices over Bluetooth Low Energy.
polar-ble-tools supports workflows in which a wearable records data to its
own storage and the resulting files are retrieved later over BLE. It provides
device setup, offline recording control, PFTP file retrieval, integrity
manifests, guarded cleanup, and optional local decoding for supported formats.
Data collection and retrieval do not require Polar Flow.
polar-ble-toolsis an unofficial community project. It is not affiliated with, endorsed by, sponsored by, or maintained by Polar Electro Oy.
Data collection workflow
The package supports a device-resident collection lifecycle:
- discover, pair, and prepare a supported wearable through Linux BlueZ;
- inspect supported PMD recording capabilities and configure an offline recording;
- allow the wearable to collect data into its own storage;
- reconnect over BLE and enumerate files through PFTP;
- retrieve
.RECor.BPBfiles into local storage; - verify retrieved files using recorded size and SHA-256 metadata;
- review guarded cleanup decisions before removing verified device files;
- decode supported formats locally when the required optional tooling is available.
Capabilities
- manage supported PMD offline recordings and recording settings;
- list, retrieve, and manage device-resident files through PFTP;
- retrieve raw
.RECrecordings with SHA-256 manifests and guarded cleanup; - retrieve passive
.BPBfiles and decode supported data with local schemas; - discover, pair, trust, and connect devices through Linux BlueZ;
- validate and apply first-time-use (FTU) data;
- generate and verify optional local schemas from a separately obtained SDK;
- locally decode supported
.RECfiles to validated JSONL with an optional SDK sidecar.
Installation
Device operations require Linux, BlueZ, and bluetoothctl. Python 3.11 or
newer is supported.
python -m pip install polar-ble-tools
polar-ble --help
Install the optional schema compiler only for SDK-assisted FTU encoding and BPB decoding:
python -m pip install "polar-ble-tools[sdk]"
polar-ble sdk install --accept-license
Quick start
Discover and pair a device:
polar-ble discover --scan-seconds 15 --name Polar
polar-ble pair --mac-address AA:BB:CC:DD:EE:FF --scan-seconds 15
List device-resident files:
polar-ble raw --mac-address AA:BB:CC:DD:EE:FF list
Collect raw recordings:
polar-ble raw --mac-address AA:BB:CC:DD:EE:FF collect
Review a cleanup without deleting device files:
polar-ble raw --mac-address AA:BB:CC:DD:EE:FF cleanup --all --dry-run
See device setup, offline recording, and raw retrieval before performing device mutations.
Compatibility
Controlled hardware validation covers Polar Loop Gen 2 on Linux/BlueZ. Other devices exposing the required PMD and PFTP services may work but are not confirmed for this release. See compatibility for the verified capability matrix and limitations.
Optional SDK-assisted functionality
The package does not distribute the Polar BLE SDK, Polar SDK schema files, or artefacts generated from those files. Optional SDK-assisted functionality uses an SDK copy separately obtained and licensed by the user.
SDK download, inspection, generation, verification, activation, and removal are
explicit polar-ble sdk commands. Package installation and import never perform
those operations. See
SDK integration.
REC decoding is optional and local-only. It requires a separately installed SDK and a user-built decoder; no SDK source or decoder binary is distributed:
polar-ble sdk decoder build
polar-ble rec status
polar-ble rec decode PPI0.REC --output PPI0.jsonl
See REC decoding for prerequisites, protocol, cache, security boundary, and limitations; see compatibility for the evidence-backed matrix.
Documentation and development
- Configuration and CLI
- CLI reference
- Python API reference
- Architecture
- Troubleshooting
- Contributor guide
- Development
- Release process
- 0.2.1 release notes
Licence and trademarks
Project-authored content is licensed under the Apache License 2.0. See NOTICE for attribution, trademark, and SDK-separation notices.
Polar and related product names are trademarks of Polar Electro Oy and are used solely to identify compatible devices.
Project details
Release history Release notifications | RSS feed
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 polar_ble_tools-0.2.1.tar.gz.
File metadata
- Download URL: polar_ble_tools-0.2.1.tar.gz
- Upload date:
- Size: 96.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d509fcd5fc907ba1f657912f3475790addc7cbf8a596b7c90d2d197069fad7e
|
|
| MD5 |
d956a5594e2c058ff89342ab433bd263
|
|
| BLAKE2b-256 |
eec3608173cc54d9fa6062785ae0da13fa7242947fadb9b76b01357f68c0b835
|
Provenance
The following attestation bundles were made for polar_ble_tools-0.2.1.tar.gz:
Publisher:
pypi-release.yml on zyf0717/polar-ble-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polar_ble_tools-0.2.1.tar.gz -
Subject digest:
1d509fcd5fc907ba1f657912f3475790addc7cbf8a596b7c90d2d197069fad7e - Sigstore transparency entry: 2256332339
- Sigstore integration time:
-
Permalink:
zyf0717/polar-ble-tools@450771770ad0fdcd7664cfbd7c3a79082115e1a2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/zyf0717
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@450771770ad0fdcd7664cfbd7c3a79082115e1a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file polar_ble_tools-0.2.1-py3-none-any.whl.
File metadata
- Download URL: polar_ble_tools-0.2.1-py3-none-any.whl
- Upload date:
- Size: 124.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99f269915b48fdf5cfec71a79b6a2f9b9dcf2622dc388fc1f5b1d313b358e3cb
|
|
| MD5 |
563c49dc06223b73c9553eade36a5c71
|
|
| BLAKE2b-256 |
408f5810d35a246d34c78c0f396969d0895379ec92fabfe068f7ffdc957401ba
|
Provenance
The following attestation bundles were made for polar_ble_tools-0.2.1-py3-none-any.whl:
Publisher:
pypi-release.yml on zyf0717/polar-ble-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polar_ble_tools-0.2.1-py3-none-any.whl -
Subject digest:
99f269915b48fdf5cfec71a79b6a2f9b9dcf2622dc388fc1f5b1d313b358e3cb - Sigstore transparency entry: 2256332343
- Sigstore integration time:
-
Permalink:
zyf0717/polar-ble-tools@450771770ad0fdcd7664cfbd7c3a79082115e1a2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/zyf0717
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@450771770ad0fdcd7664cfbd7c3a79082115e1a2 -
Trigger Event:
push
-
Statement type: