• Ok - bear in mind it's as I said above - this is only for getting data from a Bangle, not the other way.

    All you need to get started is Chrome's example:

    https://googlechrome.github.io/samples/web-bluetooth/scan.html?namePrefix=Bangle&allAdvertisements=true

    And then on the Bangle you advertise the data you want. For example:

    function updateAdvertising() {
      var data = new Uint8Array(2);
      data[0] = E.getTemperature();
      data[1] = E.getBattery();
      NRF.setAdvertising({},{
        showName:false,
        manufacturer:0x0590,
        manufacturerData:data
      });
    } 
    updateAdvertising();
    setInterval(updateAdvertising, 10000); // update every 10 seconds
    

    Now you'll see that in Chrome, event.manufacturerData contains the data that you sent over, for every Bangle. No connection or pairing needed!

    I had a quick test, and as far as I can tell it only works properly (reporting back data) in Android (not Windows or Linux). I guess Mac OS might work too, but I haven't tested

About

Avatar for Gordon @Gordon started