You are reading a single comment by @kab and its replies. Click here to read the full conversation.
  • ok. Cleared out all my files, went back to basics.
    added an image and an info file to storage. then added a ibeacon.boot.js file to storage with

    var myiBeacon = require("ble_ibeacon").get({
      uuid : [0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx, 0xxx], [#myuuid](http://forum.espruino.com/sear­ch/?q=%23myuuid)
      rssi : -74
    });
    var _setAdvertising = NRF.setAdvertising;
    NRF.setAdvertising = function(a,b) {
      if (Array.isArray(typeof a)) a = [a,myiBeacon];
      _setAdvertising(a,b);
    };
    function advertiseBeacon() {
      NRF.setAdvertising(Bangle.bleAdvert);
    }
    if (!Bangle.bleAdvert) Bangle.bleAdvert = {};
    setInterval(advertiseBeacon, 60 * 1000);
    advertiseBeacon();
    

    did a load() and it disconnected from bangle2 with prompt not detected, upload failed, trying to recover. And it reconnected. At that point I checked the file was saved - it was and I did load() and then disconnected - and all seems to work. It is picked up by Home Assistant Espresense as an ibeacon.

    I guess I should now try t add widget bootgattbat and see if they all work together. First... a backup

About

Avatar for kab @kab started