You are reading a single comment by @titaniumwhite and its replies. Click here to read the full conversation.
  • Sorry for insisting, but I tried again in the second Ruuvi I have and now it's not working anymore, as the former.
    Here the steps I've taken:

    • I flash the Ruuvi with Espruino, everything works and the webapp I wrote can detect it
    • I disconnect the Ruuvi from everything
    • I connect the Ruuvi through the Espruino Web IDE and I flash the following script

      const serviceUUID = '6e400001b5a3f393e0a9e50e24dcca9e';
      const characteristicUUID = '6e400003b5a3f393e0a9e50e24dcca9e';
      var Ruuvitag = require("Ruuvitag");
      
      NRF.setServices({
      serviceUUID : {
        characteristicUUID : {
          value : 0,
          readable : true,
          notify : true
        }
      }
      }, { advertise : [serviceUUID] });
      
      
      function startAdv(){
      var idInterval = setInterval(function(){
      var val = Math.random();
      console.log(val);
      
      NRF.updateServices({
      serviceUUID : {
        characteristicUUID : {
          value : val,
          notify : true
        }
      }
      });
      
      }, 200);
      
      setWatch(function() {
      clearInterval(idInterval);
      }, BTN1, {repeat: true});
      }
      
      • The console of the Web IDE says "BLE Connected, queueing BLE restart for later"
      • I disconnect the Ruuvi from the Web IDE (I read on another topic it's necessary if I read "queueing BLE restart for later")
      • I try to connect from the webapp I wrote, but now the app can't detect the Ruuvi anymore

    The Ruuvi is not visible on Bluetooth anymore, nRF Connect can see it only in bootloader mode.
    I noticed that if I pull the battery and re-insert it, both webapp and nRF Connect can see the Ruuvi, but if I scan again, then the Ruuvi is not visible anymore. I can't connect to it.

    Tomorrow I'll flash the Ruuvi through the Ruuvitag DevKit, but I'd like to understand how to make it works.

    Thanks a lot for helping, I really appreciate that.

About