BangleJS 2 unable to update firmware #7309
Replies: 1 comment
-
Posted at 2024-12-30 by user159421 Final Additional note: It has had "BL 2v24" across the top at the start, which is presumably the existing firmware. But we never saw anything higher-level than that black-on-white screen since the unboxing. Posted at 2024-12-30 by Humpelstilzchen I actually had the same error when updating from 2v24.x to 2v25 (My DFU is 2v12) via apploader. Posted at 2024-12-30 by @fanoush
it is version of bootloader that is built as part of full build from source but there are typically no or very few changes in bootloader code itself between Espruino versions so it is OK to have older BL version than Espruino main firmware.
espruino bootloader is based on standard Nordic DFU bootloader with added update from storage file so it has two separate ways of update. the bank0 invalid is message from Nordic BLE DFU update and says that valid flag (which is typically set after succesful BLE DFU firmware update) is not set. The update from storage file done by the update firmware app (or maybe the IDE tries it too?) does not touch this flag https://github.com/espruino/Espruino/blob/master/targets/nrf5x_dfu/flash.c#L310 In this state I think the best way is to use Android phone with nrfConnect app and try to upload zip file downloaded to phone from https://www.espruino.com/Download You enable the BLE DFU update mode by holding button until it reboots and you see the progress bar, then you release it in the middle and check for the DFUTarg device via nrfconnect, connect to it and use the DFU button that appears to upload the zip file. If nordic update from your phone does not fix it then flashing full firmware over SWD probably will (= using charging cable connected to some SWD debugger dongle) but that is a bit complicated so if it never worked then returning it may be easier. Posted at 2024-12-30 by @fanoush BTW overall it is not very clear what was the initial issue you had and what you did and what went wrong before failed update from the IDE (running on PC?) caused the bank0 invalid message.
this does not say much. what was the error? it is normal for the watch to boot into this screen from cold boot, and if you powered it on via button press and held the button a bit longer you could have triggered the progress bar that would stay in dfu mode if you then released the button too early.
what " Switched to firmware updates" or "turned on, and while the firmware updater used - first nRF firmware update and then NRF connect" means? It may not be important now but it would be interesting to know if there was actually some real issue with the watch initially or you simply used the button at startup in a way that it somehow always stayed in update mode and then you tried various methods to update it and never actually let it boot properly. It may not be very intuitive so maybe the watch was perfectly fine until you tried DFU from IDE that probably disconnected in the middle and left the firmware corrupted. Posted at 2024-12-30 by user159420 Hi guys! I'm the owner of the watch, OP is my husband who beat me to the punch posting here. I received it yesterday. Took it out of the box, turned it on, and immediately it kept repeating the booting screen: And then repeating that screen - loading in each line of text, flickering, repeat. I downloaded the nRF updater and tried to install the 2v25 firmware and the app suggested that it had worked (no errors, said completed etc) but nothing changed on the watch. We tried this several times, from both my phone (pixel 7a running grapheneos) and my husband's (stock pixel 9 pro), with the same result. Tried using the app loader website but neither my phone nor my husband's could find the watch using the browser Bluetooth connection. Later tried using my husband's laptop which has Bluetooth using the Web IDE and I think the watch died during the attempt since it had been doing the screen repeat the whole drive home (first tries were at the Christmas gathering where I'd received the watch) but we didn't realize at first since we assumed it would power cycle during a firmware update. Once we figured that out and got it charged back up it's been on the BANK0 INVALID since then. It never got to the initial splash screen. I took it out of the box, turned it on, and it kept repeating the LOCKUP etc screen before we did anything with it. Husband is at work now but I'll be able to respond during the day. Any additional details that would help? Should I try using the nRF updater again? Don't mind having to do any resets or anything since I never got far enough to do any customizing. Posted at 2024-12-31 by @fanoush BANK0 INVALID means there is no valid firmware, you need to flash zip from the phone via nrfconnect if you succeed and this message goes away and it still reboots in a loop as it did initially, you can try holding a button until it reboots and still holding it while the progress bar goes across the screen and then releasing it when it starts to boot into recovery menu as described here https://www.espruino.com/Bangle.js2#recovery-menu however it can also be that erasing storage from recovery menu will not help and some hardware is really faulty and that is what causes the reboot loop. Anyway first you need to flash valid firmware zip from your phone so yes try the nrfconnect or nrf toolbox app again. Posted at 2024-12-31 by user159420 I tried to do the nrfconnect again a few times today (both with standard version 25 and the cutting edge one) but it didn't work, no longer says bank0 but is back to looping the boot screen. I've been trying to get to the recovery menu since I got the thing but I guess I'm not getting the timing right for when to let go of the button :( it just goes back to looping or shuts off depending on how long I hold it. Here's what I can get it to do at this time: Husband just tried to put on the new firmware again via nrfconnect, no change in watch behavior, but sent me the logs which I've attached below. Attachments: Posted at 2024-12-31 by @fanoush if you hold for too long it will reboot again, this is to allow rebooting when some app gets stuck, so you definitely need to release the button when you get past the progress bar and it starts booting. if it reboots because of holding too long there is WATCHDOG boot reason message shown briefly in top left corner. If you no longer see bank0 invalid and can't get into recovery menu because it reboots earlier then it unfortunately looks like hardware fault and is probably best to return it. what you can do now
Posted at 2024-12-31 by user159420 https://youtu.be/dU1rHN0l004?si=Xtk1HIlc4O2XgHfS Took a video of it doing everything I can get it to do right now. I have never gotten the WATCHDOG screen, it always says LOCKUP or SW RESET (only on the first time after being turned on). You should be able to hear the button being pressed/released in the video for when I'm holding it. I am going to try some of the older firmwares and the alternate storage option later today, I will let you know how it goes. And thank you so much for taking the time to help us with this! I'm very excited to get it working (even if it does need to be returned/replaced). Happy new year! Posted at 2024-12-31 by @fanoush Oh, that is interesting. The LOCKUP reason means that the CPU runs into hard fault and locks up. That should not happen. But since the bootloader itself works fine and is relatively stable (=you can upload DFU zip file over Bluetooth and update the firmware = it runs for many seconds without fault including BLE and the display and button working) and only the main firmware crashes, in theory it can be some power optimizations not enabled in bootloader. If you want you can try build from It is built from 2.24 release with this commit added fanoush/Espruino@279204a or see the history here https://github.com/fanoush/Espruino/commits/f-bangle2/ It disables some optional stuff that should normally work and save power but if the hardware is missing some optional components on PCB or they are faulty it may help and avoid crashes. Trying the build linked previously with SPI flash storage disabled is worth a try too, but if that does not help then this build is worth trying too (but may not help). I am also attaching the DFU zip directly if you have issues with extracting it on your phone. Attachments: Posted at 2025-01-01 by user159420 YOOOOO!!! That fixed it, thank you so much! Does this mean that a normal version will always not work? And is the watch going to behave normally going forward using this version, or do you think it will still need to be replaced? Or did getting it to work normal once mean it will keep acting normal assuming something else doesn't happen? Again thank you for the help & your patience with all my questions, this is my first foray into this kind of thing :) Posted at 2025-01-01 by @fanoush
OK, so it is one of those two features I disabled. If you want to test more, here are two more Here https://github.com/fanoush/Espruino/commits/f-2.25-no-dcdc/ is the other one disabled Beware that the zip inside both artifacts has same name as both is one commit on top of same version.
Yes, as long as normal version keeps it enabled you would need custom build. It is few clicks on github website to make your own build but still annoying. And you got faulty watch that passed QA by mistake with slightly worse battery life. It is up to you and @gfwilliams to sort this out. If you can easily get it replaced then I'd go for it. I heard people e.g. in Brazil(?) pay import taxes that makes that cost too high so it depends. Posted at 2025-01-01 by @fanoush As for those two features it is about this Attachments: Posted at 2025-01-01 by user159420 Thanks for the thorough explanation! I am going to test drive it this week and if I'm having any issue with it I'll reach out to Gordon when he's back in office. I don't mind a mildly shorter-than-advertised battery life; my old watch was only four days or so, so if it's that or better I think I'm good. It was purchased from adafruit if that makes any difference, not sure if going through a particular seller tends to have more issues than another or something. Posted at 2025-01-01 by @fanoush
It is hard to estimate but both features are more important when you e.g. run nrf52 based sensor for months from CR2032 battery (or years from bigger battery). With Bangle that is used daily and charged every week or two it may not make practical difference. That's why these are optional in the reference circuit. Internal DC/DC when enabled is automatically turned on when the CPU itself draws high current (in mA) and is turned off when it draws uA because at low currents it does not help and possibly make things even worse. With other nrf52840 board I measured that when connected over BLE and running busy loop the CPU was drawing 9 mA from battery when DC/DC is disabled but only 6 mA when enabled. This may look nice but such savings only affect CPU itself, not display or GPS or HR or motion sensors. And most of the time the CPU is sleeping anyway => DC/DC is not helping. External 32kHz crystal is supposed to be more accurate than internal 32kHz clock source and is not so sensitive to temperature changes. When it is not present the Bluetooth stack is configured to have larger tolerances to clock drift so the radio is woken up for slightly longer time to not miss data from other devices and also the internal 32kHz clock must be periodically recalibrated so the CPU is waking up to do this. However in reality the effect on battery life of Bangle 2 is again hardly noticeable. So it makes sense to enable these features when we know the watch has the components inside and it definitely saves some battery, but not much. So IMO the real issue is a need for custom build and the uncertainty why your watch is different and what else can be wrong with it. Posted at 2025-01-06 by @gfwilliams Hi - I'm back now! Thanks @user159420 for being so patient with this and @fanoush for helping out so much with the new firmware. And @fanoush that firmware you made - that's just disabling the 32kHz oscillator and DC-DC converter? This is an odd one for sure - so right out of the box it was doing the LOCKUP looping thing? Because as @fanoush said above you get to the bootloader screen if you hold the button for a bit too long when it's starting up (holding the button or leaving for 30s should leave the screen though) so that may have been a bit confusing right from the start. Do you think it's possible that you might have installed a new firmware using that DFU screen, but maybe installed something like the firmware for a Bangle.js 1, rather than a Bangle.js 2 firmware? I guess that could cause the LOCKUP error - and then just putting the new firmware on that @fanoush supplied would have fixed it. We test these all before we send them out (which includes installing the JS firmware on the watch, which yours should have had) so I can only assume that if there is a hardware fault with yours maybe something came disconnected in shipping. For now, please can you try installing a new firmware using the firmware update tool in the app loader? https://banglejs.com/apps/?id=fwupdate - it should now work without you having to enter the bootloader mode. If that works, awesome, your Bangle is all back to normal and working fine. If it goes back to the LOCKUP loop you can get it working again by reflashing the firmware that you just did to get it going, but it would appear to be the sign of a hardware issue and I think it's best if we get you a new watch. Posted at 2025-01-06 by @fanoush
yes, I just disabled both. Then I made another two for disabling each one but not sure @user159420 tried those. The builds on github are now expired but direct links to artifacts still work. As I understand it the standard firmware just reboots in a loop with LOCKUP message and the one with those two features disabled works. It came with standard firmware, then @user159420 tried to update firmware to fix the reboot loop and for a while got BANK0 INVALID due to bad update, then managed to update correctly so the message is gone but still got reboots and then firmware with disabled DC/DC+32kHz crystal finally helped to get out of the loop. Posted at 2025-01-06 by user159420 Good morning (er, afternoon 😅) guys! Thanks for getting back to me. It was doing the LOCKUP loop straight out of the box once I turned it on. It didn't go into DFU til I held the button down intentionally to make it do that. I don't think I could've installed a B1 firmware as I followed the download link in comment #4 and selected B2 from the drop down menu. And I tried several different firmwares just to see if one would work, so even if I got a wrong one once the rest of them should have been fine. I did not yet try the other custom firmwares that disable just one or the other. Also, at present the battery drained to about 20% in a little over four days, and every time I switch a screen the percentage will change a little bit both up and down. I fully charged it yesterday afternoon and it is now at 84% after probably 20 hours of wear. Is that normal or related to the issues I'm having? I will try the app loader update in a bit and report back the outcome 🫡 thank you both for the help. Posted at 2025-01-07 by user159420 Unfortunately trying the app loader returned it to the same state. Posted at 2025-01-07 by @fanoush OK, so maybe you could test one of those two to see which one it is? I am attaching them directly, they are unpacked from artifacts linked above and renamed. I'd start with nodcdc, if that works no need to try the other one. I really don't know but just guess that if 32kHz crystal was missing it would just freeze and reboot later by watchdog.
It really depends how much you use it. If you are testing it then maybe you use it more now than average user would. I think just wearing it connected to phone could last a week or more. If HR sensor or GPS is used then maybe less. Battery going a bit up and down is normal. If there is big power draw by enabling something like GPS or even running some app that is heavily using CPU the battery voltage goes down and then recovers a bit when watch is idle. The percentage is just computed from voltage. Attachments: Posted at 2025-01-07 by @gfwilliams Thanks! I think realistically given all you've tested so far and the fact it was doing the LOCKUP loop when you got it, we need to send you a replacement. I'll send you an email in a few minutes with more information. On battery usage, that does seem a bit high, but it can depend a lot on usage. As @fanoush says GPS will drain the battery fast, but things like leaving unread messages (so the icon flashes), or having a clock with 'clockinfo' and then leaving it showing a running stopwatch or your current heart rate can drag the battery down quite a lot as well... Posted at 2025-01-16 by @gfwilliams Quick update on this - I managed to find one here that exhibited the LOCKUP loop out of the box. In this case, the issue was a problem with the DCDC converter. I've added some code to the Espruino firmware that automatically skips enabling the DCDC converter if it reset because of a LOCKUP (I've also added a check in the test screen so we won't accidentally send out any that have the problem - because now they will actually work rather than failing). Unfortunately for this to work you need a new bootloader (attached). So to fix the device you have to:
There will be marginally worse battery life but on the whole it shouldn't be super noticeable (but as it's a hardware failure on a new device you do still have a proper replacement on its way to you) Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-30 by user159421
Like the title says - fresh out of the box it was in the black-text-on-white that goes with the firmware update page.
Attempted to use the app loader, and it failed to find the bangle. Switched to firmware updates, and kept it plugged in, turned on, and while the firmware updater used - first nRF firmware update and then NRF connect, and neither of them threw any errors directly - both 'completed' the firmware update. Tried the web IDE, and the flasher there did something new.
It kicked over to the "BANK0 INVALID" error, and still failed to update.
Prior to this, it was caught in the loop of "check storage, no new fw, restarting... check storage[...]." Now, after the first (attempted) firmware update, it will print an "ERROR" after starting the flashing process.
Trying to figure out what to do next!
Beta Was this translation helpful? Give feedback.
All reactions