How to get the advertised data in NRF connect

Posted on
  • Hi, I just follow the suggestion about advertising the Heart Rate.

    Bangle.setHRMPower(1,"test");
    Bangle.on("HRM", function(hrm) {
      NRF.setAdvertising({
        0xFFFF : [hrm.bpm]
      });
    });
    

    I would like to make sure if it works, how can I find the advertised HR data in NRF connect?


    3 Attachments

    • Screenshot_20211117-130944.png
    • Screenshot_20211117-130950.png
    • Screenshot_20211117-130934.png
  • Hi - the issue is you clicked 'connect'.

    Make sure you're disconnected, then stay on the left-hand 'Scanner' tab, and expand the tab for the device you're interested in and you'll see it

  • Hi ,Gordon, that's all i got in 'Scanner':
    1 unknown device
    1 windows 10 device
    1 bangle.js

    I don't find any information about HR from bangle.js or unknown device


    1 Attachment

    • Screenshot_20211117-143533.png
  • It says 'Service data 0xFFFF Data 0x57. Since the code above was0xFFFF : [hrm.bpm]` that's what you're seeing.

    0xFFFF is not a standard UUID so it's not decoded by the app, but 0x57 in decimal is 87 so I guess that's your BPM

  • Thanks a lot!
    I am building my own android app to get data.
    I also would like to get the steps counter data. I don't think I can get it from advertising. As it required to be summed and reset per day. So I am thinking to get data from the ''Recorder'' app in bangle.js. How can I access the "Recorder" 's csv in Storage on my android app?

  • Best bet is to look at the interface html in https://github.com/espruino/BangleApps/t­ree/master/apps/recorder

    You have to read the contents of the storage file, which you can do with code like this: https://github.com/espruino/EspruinoAppL­oaderCore/blob/59f80bb52a38da12cb272f910­6cb3951b49dab2e/js/comms.js#L394

    However I would have thought you could send steps via advertising relatively easily if you wanted - I don't see the reset at midnight being a big issue.

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

How to get the advertised data in NRF connect

Posted by Avatar for TMQcard @TMQcard

Actions