You are reading a single comment by @louisld and its replies. Click here to read the full conversation.
  • 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.

About

Avatar for louisld @louisld started