polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

Why is OH1 firmware version different in Polar Flow? #381

Closed Modiug closed 1 year ago

Modiug commented 1 year ago

Platform your question concerns:

Device:

Description: Polar Flow (Android and Windows) reports an OH1 firmware version of 2.1.20. Running the following Python script using Bleak gives me 1.3.9. Why?

#!/usr/bin/env python3

import asyncio

from bleak import BleakClient
from bleak.uuids import uuid16_dict

uuid16_dict = {v: k for k, v in uuid16_dict.items()}

## UUID for firmware revision ##
FIRMWARE_REVISION_UUID = "0000{0:x}-0000-1000-8000-00805f9b34fb".format(
    uuid16_dict.get("Firmware Revision String")
)

async def main(address):
    async with BleakClient(address) as client:
        firmware_revision = await client.read_gatt_char(FIRMWARE_REVISION_UUID)
        print("Firmware Revision: {0}".format("".join(map(chr, firmware_revision))))

if __name__ == "__main__":
    asyncio.run(main("A0:9E:1A:C4:ED:97"))
Modiug commented 1 year ago

OK, my bad!

Just used a BLE Scanner App which showed me that there is a FIRMWARE REVISION STRING (1.3.9) and a SOFTWARE REVISION STRING (2.1.20). Mystery solved!