Bluetooth Heart Rate Monitor causing boot problems #4715
Replies: 1 comment
-
Posted at 2022-03-17 by @gfwilliams Do you have the I've just made some changes - please can you try uploading 'bootloader' to the latest from the development app loader. Basically it looks like the original Bluetooth HRM code has now expanded in size to the point where it's causing memory usage problems creating the boot file on Bangle.js 1. The original code was 80 lines, and it's now up to 550! @halemmerich is it possible there's some stuff in there that we don't really need that we could make smaller or strip out? I know it does loads of stuff now, but I feel like most people only use the basics, so if it's not going to be usable on Bangle.js 1 maybe we need to provide a stripped-down version as well? Or maybe I guess we store all the code in a different file so it's not added to the boot code. But... it seems the main issue here was actually the bootloader updater was trying to keep all the data for the '.boot0' file in RAM before writing it, and with the big boot file in bthrm it was just too much (perhaps alongside other apps you had installed?). I've hopefully fixed that now, but if Posted at 2022-03-17 by metallisto Hi, the "Pretokenise apps before upload" was enabled. I've now installed the bootloader with your changes in espruino/BangleApps@7c4032d and it works again. Posted at 2022-03-17 by metallisto Unfortunately my BangleJS1 is not connecting anymore to the BTHRM (COOSPO-H808S). In the newest development version I'm able to use the new scan functionality in app settings to set the device explicitly. By starting the BTHRM app it only displays: "loading" and it falls back to the internal HRM. Posted at 2022-03-17 by @gfwilliams Argh, thanks. But the older one works ok? Posted at 2022-03-17 by @halemmerich There surely are some things that could be moved out of boot or at least made optional during execution. How about moving the discovery and device caching code completely into the settings? The scanning currently only sets a filter that is then used by the boot code. @metallisto can you try to activate debug logging in the settings and check in the IDE if there is some kind of error while trying to start the app? It can take a while on first connect, subsequent tries should be faster. Initial connect with my two different sensors takes around 10s. Some sensors seem to be more problematic than others. You can try to set the grace periods in the settings to help those sensors along. Those just create some waiting time at different stages of the connection process, so nothing to loose but a few seconds. Posted at 2022-03-18 by @gfwilliams Thanks - I guess yes, making the cache stuff part of settings could simplify things a lot (although to make it simple we'd have to make sure we then only handle devices that had been paired from settings). I guess it's not a big deal for now though as hopefully this has fixed things. @metallisto please can you try to update to bootloader 0.45 and then do But if that doesn't work it'd be great if you can try what @halemmerich mentioned above so we have some idea what's going on Posted at 2022-03-21 by metallisto Sorry for late response: Just connected with the web ide and got this exception:
Seems like the boot part of bthrm is not correctly loaded. Posted at 2022-04-27 by metallisto Today I updated the firmware to the newest version and also updated all apps including the BTHRM, Boot, Run etc. I still get the same exception and it still doesn't work. Can I help with any more information? Is the problem only related to the BangleJS1, could my watch be defect? Are there any news/progress regarding this problem? The function "setBTHRMPower" is defined in the bthrm.0.boot.js file. Looks like the file is not loaded at boot. Best regards Posted at 2022-04-28 by @gfwilliams
I can pretty much guarantee it's fine. It's possible that you hit an issue with the bootloader in earlier firmwares and it hasn't updated. Maybe try going to If you're running the Web IDE, when you switch apps, do you see any error messages? Posted at 2022-05-16 by metallisto Hey together, Device info:
I've now erased everything, installed only boot, launch, setting and resetted, rewrote the settings and rebooted the watch. After that I connected the WebIDE, connected the app store and then only installed the BTHRM app. After reloading and starting the BTHRM app I get:
I've even tried to remove all files from the device storage from the WebIDE before reinstall. Also tried everything with and without the "Pretokenise apps..." option. Best regards Posted at 2022-05-16 by @gfwilliams Please could you go to 'Backup' in the app loader Posted at 2022-05-16 by metallisto FYI Attachments: Posted at 2022-05-16 by metallisto By executing the .boot0 file, I also get this exception. Looks like the file is not read completely.
Posted at 2022-05-16 by metallisto Executing bootupdate.js brings:
Posted at 2022-05-18 by @gfwilliams Ahh, great - thank you! That narrows it right down! I've just added workaround in I'll see about getting a fix into Espruino itself, as it should really be able to write files bigger than that Posted at 2022-05-23 by metallisto Yes this fixed the problem and BTHRM is starting and working now. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-03-15 by metallisto
Hi together,
I've just updated my BangleJS1 with the newest firmware 2v12 (using the Web IDE) and used the install default applications function to put the watch into the default state. By installing the app "Bluetooth Heart Rate Monitor" from the apps I get some strange behavior. At boot and instantly after showing the clock, I get a interpreter error/exception hinting to LOW_MEMORY. By navigating to any app/main screen I always get the message "Updating boot0...". If I uninstall the "Bluetooth Heart Rate Monitor" app, the problems disappear.
Can someone confirm the problem with their own BangleJS1 watch?
Unfortunately I use this functionality with a external HR sensor for my sports.
Best regards
Manuel
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions