[Bangle.js 2] Seemingly random freezes / unresponsive?

Posted on
Page
of 2
Prev
/ 2
  • So you still managed to reconnect via GB while the watchface was stil frozen? What FW version you have?

    In my case the battery lasted several days while being stuck. At least when attaching charger after few days it still only charged and did not boot from cold state so battery was not dead. When CPU is stuck in a loop it should die in a day or two. Also I could never reconnect in the frozen state.

    Anyway, I have updated mine to latest version few days ago and waiting for the freeze to happen again.

  • (previous message)

    I have noticed a hanging watchface today, stuck on 18:41. Last value for battery in GB is 15:11 (100%). I have powermanager with monotic voltage/percentage settings active, so quite possible there was no change in reported battery between 15:11 and 18:41. Next battery value is 56% at 20:48, so quite a big drop. Maybe something going into an endless loop, eating cpu cycles?

    Watch was still connected to GB at 20:48. I saved two GB logs, one 20:48 before reconnecting and one 20:50 after reconnecting. Both logs are identical save the additional lines in the one saved later.
    It starts at 19:13, so the moment of freezing was not captured, but there are a whole lot of

    19:13:32.816 [main] WARN  n.f.g.s.b.TransactionBuilder - Unable to write characteristic: null
    

    lines.

    First log stops at 20:47:33.853, so definitely still hanging then, reconnect in GB reviving the Bangle shortly after that. Sadly nothing obvious (at least to me) in the logs. Saving the debug logs did not actually store the logs. I am using the fdroid version of the app.
    I have attached a log with private info replaced by placeholders.

    Edit: Not a percent of battery lost in the last hour, so hanging actually does something expensive in terms of power use on the watch.


    Yes, did not touch the bangle after noticing the freeze. Disconnecting and reconnecting in GB usually brings it back, holding the button for full reboot works as well. I'm on 2v16.7 currently. I had some hangs that could not be solved by reconnecting in GB, but have not seen one of those for months.


    1 Attachment

  • Thanks for the update @halemmerich - that log is really interesting.

    TransactionBuilder - Unable to write characteristic: null seems to happen because the characteristic we're writing to (txCharacteristic in BangleJSDeviceSupport) is null. BUT txCharacteristic is only ever written once, in initializeDevice.

    So, it seems this doesn't 'just happen'. There is some kind of reconnect, and BangleJSDeviceSupport is torn down and then restarted, but either initializeDevice doesn't get called, or it does but the characteristics didn't get read and so null gets returned.

    I've had a quick check and it seems like none of the other watches deal with this eventuality - they all assume that getCharacteristic won't return null too.

    But it would explain a lot - there is flow control when sending from Bangle.js to Gadgetbridge, so what happens is Gadgetbridge connects, but never enables notifications on the Bluetooth serial characteristic. After a while the Bangle has sent enough data that its internal buffer gets full, and it sits there just waiting for Gadgetbridge to enable notifications on the characteristic, which it never does.

    It looks like initializeDevice is called twice from AbstractBTLEDeviceSupport - once in performInitialized and once in onServicesDiscovered. So maybe if performInitialized gets called and the Bangle isn't connected, we can get in this state where initializeDevice is called before services are discovered?

    I could really do with a Gadgetbridge log including the moment things went wrong to be sure

    ... but this definitely looks like a Gadgetbridge issue now, rather than Bangle.js.

  • I get occasional hangs when using Settings menu's. I'm on 2.16.7 firmware and everything else 100% up to date. I dont use GadgetBridge atm.

  • I have captured another log. Clock was frozen at 11:41 and log goes back to 9:10.
    First Unable to notify characteristic: null at 11:10:22:934
    Manual reconnect in GB at about 12:44.


    1 Attachment

  • Small update: Have not connected the Bangle to GB since saturday morning, no freezes since then and significantly lower battery use.

  • That's great, thanks for that! And good removal of sensitive info ;)

    I filed an issue with Gadgetbridge here asking for the correct way to go about fixing this: https://codeberg.org/Freeyourgadget/Gadg­etbridge/issues/2996

    But I'd be pretty sure we know what the issue is now. It's just how to force a disconnect + reconnect nicely.

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

[Bangle.js 2] Seemingly random freezes / unresponsive?

Posted by Avatar for morganwable @morganwable

Actions