Advertise Heart Rate

Posted on
  • hi, how can I advertise HRM?
    as I connected my bangle to node-red and I just want to get the HRM.
    Please help in detail I'm new to this :)

  • As I'd mentioned in the email to you:

    Bangle.on("HRM", function(hrm) {
        0xFFFF : [hrm.bpm]

    Open the Web IDE, paste this code in to the left-hand side, then disconnect. You'll have to do something a bit more complex to make it persist through changes of apps, but after pasting that code will work until you decide to change apps.

  • Should I download a heart rate monitor app or change some configuration on bangle or this could work just fine?

    I was pasting the code on the right hand side that might be the problem 😅😅
    Alright thanks gonna try this out😊

  • Literally all you need is to paste this into the left side. Right-hand side works too if you then click 'upload' - and ensure it's set to RAM.

    Bangle.js won't advertise any bluetooth data if you're connected to it though - so you'll need to disconnect the IDE first. That could have been the issue

  • When I paste the code, it shows me "=undefined" why is that?

  • Tue 2021.10.26

    'it shows me "=undefined" why is that?'

    Explanation: see 11 th bullet item

  • Is it working?

  • i'm getting this data on Node-Red, is the heart rate within the serviceUUID?

  • This is what i'm getting

  • Sorry i don't know why it is not uploading the picture... i'm getting on the debug panel at Node-Red
    "{"rssi" : -65, "name" : "bangle.js feb9" ,"serviceUuids" : ["6e400001b5a3f393e0a9e50e24dcca9e"]}"

  • It would be really handy if you could show me what you've actually got showing in Node Red. You should be able to upload png/jpg pictures just fine here, but if you can't work that out then you could always upload it to somewhere like Google Photos and share a link.

    Do you have EspruinoHub installed? Or are you just using Node Red as-is?

    Also, it would be super handy if you could install the 'NRF Connect' app on a phone. You can then look at the Bangle's advertising and see if it's really showing heart rate or not - so you can narrow down if it's a problem with the Bangle or with Node Red.

    Worth adding: Bangle.js won't give an HRM event (so won't start advertising HRM) until it's actually detected a pulse. If you have it just sitting on your desk then chances are it won't be advertising heart rate at all.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Advertise Heart Rate

Posted by Avatar for Sarah1212 @Sarah1212