You are reading a single comment by @kri100s and its replies. Click here to read the full conversation.
  • Need some help with reading characteristic. I have a custom service and characteristics for writing to my device and reading from it. Writing works perfect. Value from read I just load from a global (FuelLevel) that I update every second in a setInterval. I know its updating because I can log it in console. When I read it from WebBluetooth app I only get the initial value that the global was loaded from but no updates. I am pretty sure I am missing something in the setServices descriptor.

    NRF.setServices({
      0xBCDE : {
        0xABCD : {
          value : [0,0,0,0,0,0],
          writable : true,
          onWrite : function(evt) {
            bolidControl(evt);    
          }
        },
        0xABCE: { // fuel
          readable : true,
          value : [FuelLevel,0xAA]
        }
      }
    },{ advertise: [ 'BCDE' ] });
    
About

Avatar for kri100s @kri100s started