1

I'm trying to make a flutter app to fetch data(heart rate, spo2,......) from my smartwatch. I don't know if it is wearOS or tizen or anything. It is smartwatch of the brand fire boltt. I'm currently using flutter_ble for bluetooth functionality. I'm getting services and characteristics from bluetooth client. But can't figure out which of those data corresponds to what. How am I supposed to tackle this?

This is one example of data I am receiving:

BluetoothService{uuid: 0000180f-0000-1000-8000-00805f9b34fb, 
deviceId: F9:CE:08:3E:0B:31, 
isPrimary: true, 
characteristics: [BluetoothCharacteristic{
    uuid: 00002a19-0000-1000-8000-00805f9b34fb, 
    deviceId: F9:CE:08:3E:0B:31, 
    serviceUuid: 0000180f-0000-1000-8000-00805f9b34fb, 
    secondaryServiceUuid: null,
    properties: CharacteristicProperties{
        broadcast: false, 
        read: true, 
        writeWithoutResponse: false,
        write: false, 
        notify: true, 
        indicate: false, 
        authenticatedSignedWrites: false, 
        extendedProperties: false, 
        notifyEncryptionRequired: false, 
        indicateEncryptionRequired: false}, 
    descriptors: [BluetoothDescriptor{
        uuid: 00002902-0000-1000-8000-00805f9b34fb, 
        deviceId: F9:CE:08:3E:0B:31, 
        serviceUuid: 0000180f-0000-1000-8000-00805f9b34fb, 
        characteristicUuid: 00002a19-0000-1000-8000-00805f9b34fb, 
        value: []}],
    value: []], 
includedServices: []}
ukBaz
  • 6,985
  • 2
  • 8
  • 31
Simran Sharma
  • 852
  • 7
  • 16
  • 1
    Can you add the result that you are receiving? – Kaushik Chandru Jun 11 '22 at 05:05
  • 2
    I would assume you'd want 0x1822 (Pulse Oximeter) and 0x180D (Heart Rate) for this. This page will then have the specifications for each: https://www.bluetooth.com/specifications/specs/ Use the documents labeled "service" not "profile" (HRS and PLXS). The Bluetooth site is a little confusing at times. The doc you want is the *specification* not the test suite. You'll find it as a "Download Now" button on the relevant pages. For example: https://www.bluetooth.com/specifications/specs/pulse-oximeter-service-1-0-1/ – Rob Napier Jun 11 '22 at 14:54
  • 2
    When you download the 31 page spec for SPO2, you're likely to be overwhelmed. That's normal; do not worry. Skim it; see what makes sense and what doesn't, and then take this one step at a time. Start with Heart Rate because you'll probably find tutorials for that (and you've already found SO answers to how to parse it conceptually, if not in actual code). Once you have some data and code, start asking questions for each step. That's where SO helps best: focused question with unambiguous answer. SO unfortunately stumbles on open-ended questions. Bluetooth is in fact hard, but you can do it. – Rob Napier Jun 11 '22 at 15:01
  • Is your app working?Is your source code available somewhere? – Anand Vaidya Aug 19 '22 at 03:01
  • @RobNapier i just have one more question. Now that I know that I want heart rate i.e. 0x180d. But the data I'm receiving is like above. How am I supposed to match which one and how to take the value. – Simran Sharma May 03 '23 at 07:08
  • I believe what you're looking for is https://stackoverflow.com/a/65458794/97337 – Rob Napier May 03 '23 at 12:38
  • @RobNapier thank you so much, that answer genuinely helped a lot – Simran Sharma May 08 '23 at 11:03

1 Answers1

2

As long as the device supports standard services and characteristics here is the list of bluetooth UUID: 16-bit UUID Numbers Document.

Easy way to inspect which services the device supports is to use bluetooth internals, chrome://bluetooth-internals/#devices,

ukBaz
  • 6,985
  • 2
  • 8
  • 31
user18309290
  • 5,777
  • 2
  • 4
  • 22