Periodic corruptions, BLE failing? [fixed]

Posted on
  • I've had my Bangle.js 2 for about two weeks now, and it's great! Aside from occasional issues.

    I thought it was general instability early on, but now I'm thinking there's likely more going on. In the last two weeks I had these problems:

    1. Some sort of corruption where I needed to reset the bootloader. This happened in the first day or so while I was still installing and experimenting with a lot of apps, so I thought it could have been my fault somehow. I wish I remember the details more, but I think I remember it having trouble going to the clock - like the bootloader got corrupted. I do know I got the "-> Bluetooth" message and fixed it by reinstalling the default apps. Bluetooth seemed to work fine, if a little finnicky at the time - but it worked well enough to reinstall the default apps From there it worked fine.
    2. The bluetooth quit working. Initially it mirrored this post: JS 2 BLE connection Failing but after I did a factory reset I was able to reinstall all the apps and it began working again.
    3. At one point (I can't pin this one exactly before or after #2 - I wasn't taking detailed notes) I had it give up while installing several apps. I needed to reboot and perhaps reinstall default apps to get it back. The next time was successful. Apparently I don't give up easily, and thought this might just be rough edges on the Bangle.js. If things normally run smoother than this, I'd love to know.
    4. Overnight it disconnected from my smartphone once... but a reboot seemed to bring it back.
    5. Another crash or corruption. I was using the Working Memory app and it glitched - it acted like I hadn't responded to the prompt when I had. Resetting the app fixed it. This happened again later that day while I had disabled bluetooth, but then I discovered the next one:
    6. Bluetooth appears to be totally dead. I can enable and disable it in the menu - no difference. The console flashes "-> Bluetooth" quickly as it loads (or more persistently on Clean Boot since it stays on that screen). (It also showed this message during incident #1, but during #1 bluetooth kept working, more or less ) I attempted a factory reset from the Settings menu, which appeared to successfully reset everything, but this time it did not fix the "-> Bluetooth" message nor restore bluetooth functionality. Also did a factory reset from the Reboot menu. Same result.

    That's where it sits currently - factory reset but not communicating and displaying "-> Bluetooth" when it boots. I suspect at this point it's a hardware issue.

    Other data points:

    • Crashes 1 through 4 happened while connected to my Android phone. Crash 5/6 happened while bluetooth was purposely disconnected all day.
    • I'm on updated firmware and latest apps as of this last week, along with 3 or so apps that got updates about a week ago. Firmware 2v24.
    • Test (from the reboot menu) shows sensible results for nearly everything. I'm not sure what the top "TS" item is, but that one stays red and doesn't give me enough info to judge if it's good or not.
    • Early on I was trying to figure out power consumption and what might affect it, so installed the Device Status Widget so I could see power status of the peripherals. A couple of days of that showed significantly more battery usage to the point I looked at it again and realized it also shows RAM and storage. My guess (without looking at code yet) is it was redrawing RAM and disk every few minutes, and that involves a power-intensive query to the storage system. Either way, removing that widget helps battery significantly!
    • Anecdotally, it seems to make sense that it's a storage-related hardware issue. Most of the issues happened while I was interacting with the disk, while the Device Status Widget was running, or while the Working Memory Helper was running (which I'm guessing stores results on disk as well?).

    I haven't hooked any debuggers up to it, but at this point it seems like it might be the only possible next step.

    Where can I go next? Might it be a hardware problem, or do we need a hex dump to confirm it?

  • factory reset but not communicating and displaying "-> Bluetooth" when it boots

    that looks like something else connected to the watch so other connections are not possible and watch is not advertising while already connected

  • Hi, sorry you've had so many issues. I'm pretty hopeful this isn't a storage issue though - generally if something really bad happens when you restart your Bangle it actually pops up a menu saying "Storage Corrupted" and puts you into the recovery mode - luckily this is very rare now!

    I can't really comment on the Working Memory app, but it wouldn't surprise me if some of the apps on the app store do occasionally behave a bit strangely. But if you can figure out how to reproduce it, it'd be great if you could file a bug report so it can be fixed.

    I'm not sure what the top "TS" item is

    It's touchscreen. It'll be red until you tap the screen and it registers a tap in the correct area :)

    Some sort of corruption where I needed to reset the bootloader

    Were you playing around developing things with the Web IDE? Especially if you've been using other Espruino devices you may well have had it set to Flash, which overwrites the bootloader. We do mention this a bit in the getting started guides but it can be quite easy to miss, especially if you've used the IDE before.

    factory reset but not communicating and displaying "-> Bluetooth" when it boots

    Exactly as @fanoush says. Far from Bluetooth not working, this is almost certainly because one of your devices is automatically connecting to the Bangle, and since it can only have one Bluetooth connection active it's stopping the others from connecting.

    Best bet is go outside away from your PCs/Laptops and just try and connect with your phone. If you can't connect, try going into your phone's OS Bluetooth settings and see if it's listed there, and if so forget it.

    But most likely it's a PC/Laptop you have at home that's ended up with Bangle.js paired in the OS menu for some reason, so it's trying to automatically connect any time it sees it.

  • Great, detailed reply. Thank you for the help!

    I recovered it! That's fantastic news. But the clues still don't add up, and have me scratching my head. Here's what I did:

    • I suspected my phone, so I restarted it. No change.
    • I changed the passkey to the bluetooth, then restarted the Bangle.js. "-> Bluetooth" message still came up after a full reboot.
    • I was able to pair from my phone and connect, once I gave it the new passkey.

    So either the Bangle was telling me it was connected when it wasn't... or something was able to bypass the passkey? Maybe I'm misunderstanding something. Maybe it needs to be turned fully off to drop bluetooth connections?

    Also (again from memory, so details are fuzzy) there are times when I've had to connect from my phone's bluetooth menu, and other times when connecting from Gadgetbridge (Bangle.js edition) is enough. So perhaps my phone's bluetooth stack is also lying to me? I would also believe if there were an instability in the phone's bluetooth stack. It has been stable otherwise in my experience, but I know how complex those things are.

    But either way, it works and I can get it back after being stuck in this state. I likely didn't need to factory reset it, either. Not having to lose my sleep or fitness data is a plus!

    To round out the other questions asked:

    • I have not used the Web IDE
    • Test: Touchscreen makes sense. What does it take for the barometer and battery to turn green? They have sensible values, so I can tell they are working.
    • Working Memory app: If there is a bug, and I'll try to keep an eye out for it. I like to file good bug reports when I can - when I can't help fix them.

    And one last question - a Restore from Backup hung about 2/3 of the way through (after waiting ~10 min after progress stopped I called it quits), both times I tried it. I fell back to reinstalling my favorited apps and that worked fine in just about a minute or two. Storage was 90+% empty when I took the backup. Is there anything I might have done wrong there? I'd happily blame either the noisy 2.4 GHz band or my phone's bluetooth instability, but it picked back up without a problem after aborting the Restore and that makes me think it was communicating well enough.

    Again - thank you!

  • Ok, that's a strange one, but actually maybe the ->Bluetooth message was due to it forcing the console away from the onscreen Terminal. If the Bluetooth icon was blue then you definitely had something that was connecting though.

    But the fact that you had Passkey enabled would have been helpful to know :) When that's on, the Bangle makes an encrypted connection and stores keys matching your phone - but if the encryption keys change for some reason I believe the connection just gets aborted as it thinks it's someone trying to connect when they shouldn't.

    there are times when I've had to connect from my phone's bluetooth menu

    Ahh, that may not have helped... Normally you should only have to connect via Gadgetbridge, so it's possible your phone is getting confused if it's also trying to connect.

    What might have happened is you paired with Gadgetbridge, then using your Phone's Bluetooth, but that second pairing made a new encryption key which then meant Gadgetbridge's didn't work. I'm just guessing though....

    What does it take for the barometer and battery to turn green?

    Interesting about the barometer - it checks between 900->1100 which seemed ok for where we test them in the UK at sealevel-ish.

    For the battery it has to see the charger connected and that the battery volts rise (eg it's getting charged).

    a Restore from Backup hung about 2/3 of the way through

    Ahh, sorry - were you using the app loader in Gadgetbridge to do it?

    Maybe try https://banglejs.com/apps/ from a PC or your Phone's web browser (with Gadgetbridge disconnected). Unfortunately when using the App Loader via Gadgetbridge it's not so good at transferring lots of data. It's frustrating, but for some reason it just doesn't seem 100% reliable

  • If the Bluetooth icon was blue then you definitely had something that was connecting though.

    That's the thing - the Bluetooth icon was definitely not blue. Before I did the factory reset, I had the one that disappeared when disconnected, so it was extra clear that it wasn't connected.

    To clarify, I did not have a passkey, and then set one later on when troubleshooting. So it is possible something like my phone was getting partway through the connection process...? No idea. But that combination was enough to break through were nothing would before.

    Interesting about the barometer - it checks between 900->1100 which seemed ok for where we test them in the UK at sealevel-ish.

    That makes sense - I'm up around 4,500 feet of elevation, I think. Enough that without an elevation correction, the barometer app's weather meter becomes nonsense even though the pressure looks right.

    Unfortunately when using the App Loader via Gadgetbridge it's not so good at transferring lots of data. It's frustrating, but for some reason it just doesn't seem 100% reliable

    Ah. I tried with my phone's browser and it appears to be much more stable and possibly a bit faster too. Disappointing for Gadgetbridge because it would be such a great, integrated experience... but encouraging at the same time that the Bangle.js is stable.

    Well I'll keep a somewhat distrustful eye pointed in its direction and if fishy things start happening I'll see what I can capture. Until then, all seems to be working great.

    Again - thank you for the help! I'm impressed at how easy this device is to troubleshoot, to reset, to pair to another device, and so on. Just thinking about the account-tying hoops any first class smart watch has these days and how locked down they are, it's no comparison. The Bangle.js is great!

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

Periodic corruptions, BLE failing? [fixed]

Posted by Avatar for DudestOfMen @DudestOfMen

Actions