Hi, I'm struggling with an issue and would really appreciate any help! I'm trying to implement a simple web application that connects to my Bangle.js 2 and visualises the received heart rate data. I would like to advertise heart rate service as as GATT service following all the specifications. I've tried many many versions of the code below (loading it via Espruino IDE for now) but nothing seems to work.. None of the services can be found when using nrFConnect and LightBlue. I've tried both NRF.setAdvertising like so (simplified version):
function onInit() {
Bangle.setHRMPower(1);
Bangle.on('HRM', function(hrm) {
var data = 'H,' + hrm.bpm.toString() + ',' + hrm.confidence.toString();
Bluetooth.println(data);
});
}
onInit();
I would really appreciate any help regarding this as I'm new to Espruino and Bluetooth in general and struggling to find a solution. Just a quick note: my web app is currently not scanning for the services but I would assume that if advertising works correctly, it should come up on nRFConnect and LightBlue.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi, I'm struggling with an issue and would really appreciate any help! I'm trying to implement a simple web application that connects to my Bangle.js 2 and visualises the received heart rate data. I would like to advertise heart rate service as as GATT service following all the specifications. I've tried many many versions of the code below (loading it via Espruino IDE for now) but nothing seems to work.. None of the services can be found when using nrFConnect and LightBlue. I've tried both NRF.setAdvertising like so (simplified version):
I've also tried a more precise way using NRF set and update services:
However, when I send my heart rate data using UART (following this tutorial here: http://www.espruino.com/Bangle.js+Data+Streaming#bonus-2-heart-rate-monitoring-graph), it works correctly and I'm able to receive this data on my web app:
I would really appreciate any help regarding this as I'm new to Espruino and Bluetooth in general and struggling to find a solution. Just a quick note: my web app is currently not scanning for the services but I would assume that if advertising works correctly, it should come up on nRFConnect and LightBlue.
Thanks for your help in advance!