• Hi! I'm trying to read data from the puck.js over web bluetooth. As a PoC I just wanted to read the battery percentage, but it doesn't work: The Puck.js does not appear on the list for the bluetooth devices in the web browser. My assumption is, that the web bluetooth library does not know, that my puck is advertising battery data.. Any idea how to fix this?

    The code on my Puck.js:

    NRF.setServices({
      0x180F : { // Battery Service
        0x2A19: {  // Battery Level
          readable: true,
          notify: true,
          value : [Puck.getBatteryPercentage()]
    }}});
    setInterval(function(){
      NRF.updateServices({
        0x180F: {
          0x2A19: {
            value : [Puck.getBatteryPercentage()]
          }
        }
      });
    }, 60000);
    

    For testing purposes I used the Web Bluetooth Sample page: https://googlechrome.github.io/samples/web-bluetooth/battery-level.html

About

Avatar for Tineler @Tineler started