1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android Bluetooth LE connection to heart rate monitor

Discussion in 'Android Development' started by dagrab, Oct 12, 2014.

  1. dagrab

    dagrab Lurker
    Thread Starter

    Hello
    Has anyone expierence with the Zephyr HXM2 with Bluetooth smart? I have a few example programs, but they are pretty hard to understand. I am currently working on an program, which should display the heart rate, received form a chest strap (Zephyr HXM2) by Bluetooth LE. I managed to get a connection and to read characteristics like the serial number string. But where I do have problems, is in getting the heart rate measurement (UUID = 0x2A37).

    So what my program actually does is:

    enabling the notification of the descriptor (UUID =00002902-0000-1000-8000-00805f9b34fb)
    descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); mBluetoothGatt.writeDescriptor(descriptor);
    then I wait for the onCharacteristicChanged Method and do the getvalue function.
    BluetoothGattCharacteristic.getValue()

    First thing I don't know if this is the right way, secondly I get data, but it varies from 2,4 and 6 bytes. Don't know what to do with them.
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...
Similar Threads - Android Bluetooth connection
  1. Rik Deschamps
    Replies:
    3
    Views:
    179
  2. Tizfaver
    Replies:
    3
    Views:
    1,045
  3. melani78
    Replies:
    3
    Views:
    1,241
  4. FairyTalePink
    Replies:
    2
    Views:
    1,383
  5. Denjiro28
    Replies:
    0
    Views:
    902
  6. RashmiE
    Replies:
    0
    Views:
    2,388
  7. Kuldip Somwanshi
    Replies:
    0
    Views:
    2,098
  8. ChanceTheAuthor
    Replies:
    2
    Views:
    1,050
  9. tinker123
    Replies:
    1
    Views:
    1,629
  10. EJB986
    Replies:
    0
    Views:
    1,015

Share This Page

Loading...