Most recent activity
-
-
-
Ok, I understand I can't put the characteristic I want in a random service.
I tried to follow the requirement for the heart rate service but I still have the same problem. It's says Unable to find the service with UUID 0x2A37.var Ruuvitag = require("Ruuvitag"); Ruuvitag.setEnvOn(true); NRF.setServices({ 0x180D: { 0x2902:{ value: 0, read: true, write: true, }, 0x2A37: { notify: true, value : [Math.round(Ruuvitag.getEnvData().temp)], } } }, { advertise: [0x180D] }); setInterval(function () { NRF.updateServices({ 0x180D: { 0x2A37: { value : [Math.round(Ruuvitag.getEnvData().temp)], notify: true } } }); }, 1000);
-
I tried several times but nothing changed. Here is my new code :
var Ruuvitag = require("Ruuvitag"); Ruuvitag.setEnvOn(true); NRF.setServices({ 0x1800: { // heart_rate 0x2A6E: { // heart_rate_measurement notify: true, value : [Math.round(Ruuvitag.getEnvData().temp)], } } }, { advertise: [0x1801] }); setInterval(function () { NRF.updateServices({ 0x1800: { 0x2A6E: { value : [Math.round(Ruuvitag.getEnvData().temp)], notify: true } } }); }, 1000);
Here is what I get with my phone :
It's says no service. And in the section "TX characteristic" I can see an error from the javascript interpreter but I'm not able to read it because it goes too fast.
I don't understand why there is an error even with the IDE disconnected. The code looks very simple. -
-
-
Hello,
I'm trying to set up a GATT service on the Ruuvitag. I used the Espruino's documentation to find that code :var Ruuvitag = require("Ruuvitag"); Ruuvitag.setEnvOn(true); NRF.setServices({ 0x1800: { 0x2A6E: { notify: true, value : Ruuvitag.getEnvData().temp, } } }, { advertise: [0x1801] }); setInterval(function () { NRF.updateServices({ 0x1800: { 0x2A6E: { value: Ruuvitag.getEnvData().temp, notify: true } } }); }, 1000);
But when I run it on the Ruuvitag, I got the following error from the javascript console :
Uncaught Error: Unable to find service with UUID 0x2a6e at line 8 col 4 }); ^ in function called from system
I don't know what i'm doing wrong. Thanks for helping me.
Thank you for your grateful help !