Bangle.js power-saving feature proposal

Posted on
  • Hi there,

    I was just wondering, would it be worth providing an option in the settings for disabling the BLE radio when the bangle is not moving for a defined period of time (a couple of hours let's say)? I am thinking of when we just leave it aside for some days.

  • What do you mean by that, should it e.g. disconnect from phone with gadgetbridge running?

    The radio hardware is off most of the time and is really drawing power only in very brief moments when it is actively communicating, that's how BLE is designed. That's how you can have BLE beacon or e.g. BLE thermometer advertising temperature for a year from one CR2032 battery.

    If you don't want to disconnect existing connections then 'disabling the BLE radio' means stopping advertising (NRF.sleep()), that saves something but not very much and then you can't connect to the watch. You can also increase advertising interval to save power and for connections you can increase connection interval https://www.espruino.com/Reference#l_NRF­_setConnectionInterval which I think is done automatically when it is idle.

    Overall I think it is not worth it, everything else draws much more power than BLE.

    Check also https://www.espruino.com/Power+Consumpti­on - line "Sleep with Bluetooth advertising"

    EDIT: and there is also https://www.espruino.com/Bangle.js2#powe­r-consumption

  • I naively thought that BLE advertising was draining a not negligible current, which could be unnecessary when the watch is kept aside for long period of time, and thought that enabling/disabling BLE based on accelerometer motion events could save a bit of power but in the light of your explanation now it is clear that it is not a good idea and probably the accelerometer would consume more than the BLE advertising, overall.

  • The Pebble had this feature and I am missing it - but for a different reason than power saving.
    I usually don't wear the watch during nights so it just sits in the room beside my bedroom/livingroom. When I don't wear it (e.g. sleeping / relaxing on the couch), I would appreciate if it would not buzz with new messages. This power saving mode was a very convenient way to achieve that without having to mess with do-not-disturb-modes.

  • Isn't that what Quiet Mode in settings is for?

    There is also a widget for quick access: https://banglejs.com/apps/?q=quiet

  • Yes, but the difference is that i don't want to schedule dnd or switch it manually. I just want dnd every time the device is not touched for a while...

  • Makes sense to me. If the watch is on your wrist and phone in the pocket it makes sense to show phone notifications on the watch. If the watch is not worn and lying flat on the table then phone may be better place to show the notification. As long as it is configurable it looks useful.

    So when not moved for some time (and possibly lying with screen up or down?) dnd mode is enabled, once it is moved it is disabled.

  • Exactly!

  • That's an interesting thought - the watch does automatically set the poll interval to a lower value when it's not moving, so it'd be trivial to make an app that replaces Bangle.buzz with a version that only called the original function if Bangle.dbg().pollInterval < 500

  • Can't that just be a system setting option to toggle? That would be great.

  • It could be, but in some ways an app is easier - it's easy for people to find by searching rather than being buried deep in settings. If you want to try it out for now, just install the Custom Boot Code app and paste this in:

    (buzz => {
      Bangle.buzz = (a,b) => (Bangle.dbg().pollInterval < 500) ? buzz(a,b) : Promise.resolve();
    })(Bangle.buzz);
    
  • That seems to be working surprisingly good!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Bangle.js power-saving feature proposal

Posted by Avatar for Jean-Philippe_Rey @Jean-Philippe_Rey

Actions