Firmware upgrade knocks out app…

Posted on
  • I've been running 2v12 for a long time, fearing that an upgrade would disallow one homegrown app that loads from the Espruino web IDE via Bluetooth. Today I upgraded to 2v24 and then 2v25. Both declare:

    Uncaught ReferenceError: "time" is not defined
    at line 1 col 646
    ...f,res.colour);writeDozTime(time,timeDef);g.flip();drawtime_t...

    In firmware 2v12, that error does not occur, and the app runs properly, except for showing FIFO_FULL. (FIFO_FULL does not occur with the later firmware versions, of course.)

    Here's the catch: a github app that's almost the same runs fine under all the firmware versions. The offending line above is identical to what runs in the github app, which of course is not loaded onto the watch via the Espruino IDE.

    So, is something wrong with the IDE, and can I fix it?

  • If you look at when/how time is assigned its value maybe you can work out why it's not defined. If you feel like sharing the code it would be easier to potentially pinpoint the problem.

  • This is the github bangle.js2 app that runs the code in question: doztime. But the code isn't likely the problem. The github app runs under all firmware versions. The non-github app with the same "problem" code line runs under 2v12 but not 2v25 when loaded from the Espruino web IDE, which is the only way I know to load it onto the watch.

  • you may try to reload WebIDE to get fresh version and upload the app again to device with 2.25. maybe new firmware does not like the file uploaded by old version (of ide or espruino or both)

  • What's the latest version of the IDE? (I may have it already.)

  • @bobrippling Made a change to the time variable in the public GitHub version of doztime a few months ago.

    https://github.com/espruino/BangleApps/commit/1e49bb1e6338f91c78b8c2e819b8bf3a2fdddeda

    Maybe you need to modify your secret version of the app to contain the same changes for it to work?

    That's just a wild guess. Without any code to look at to reproduce the problem, it's going to be hard for the community to help you.

  • But the code isn't likely the problem. The github app runs under all firmware versions

    You could download the code from github for the app that works fine, and then try to upload it using the web ide. This may help you understand if the web ide is relevant.

  • Ok, looking at the ChangeLog 2v14 "Added block scoping for let and const (#971)". Assuming you're using the Bangle.js 1 version of the app you need to make sure time is declared within the right scope, currently it is scoped so it can't be called from where it's tried. I'll fix it on the repo now.

  • No need to change anything in the repo yet; I'm working on this and will have a response shortly.

  • Success. Thank you all.

    I am not an IT person; the github repo for doztime (bangle.js 2) was created by someone else. I was unaware of the changes mentioned from 7 months ago. When imported into my variant watch code (it changes the start time for the year and the day; otherwise it's the same dozenal Holocene watch face as on github), that code loads from the IDE with the latest watch firmware, which it did not before—why not, being the original question, now answered.

    No further issues at this time.

  • New problem: in firmware version 24 or 25, the touchscreen on the bangle.js 2 is unresponsive—partly. I can still operate my watch time by the touchscreen, but after pressing the button and "loading," the screen is unresponsive. Nothing can be scrolled, and nothing can be selected (e.g. Settings, Apps).

    If I go back to firmware version 12, the problem goes away and everything works.

    Any ideas? Flatten the battery?

  • Does the web ide output any errors when the problem occurs?

  • A string of many "OK" messages while loading the firmware v25, then after it's done, "Uncaught storage updated!" That's a new one; it didn't occur before, when I updated to v25.

    But now in v25 the button doesn't work (it says "loading" permanently), and something I can't read is put onto the watch face behind the time display. Those are new problems as well.

    I've gone back to v12 now just to be able to see my watch face. No problems there. Everything works (watch app, button, screen, settings, etc.).

  • I would do a backup of the watch from apploader. Then update to 2v25. Then factory reset. Does the bug persist then?

  • Thanks. I can't do a factory reset after updating, because nothing works then. I might try the factory reset first, then update to 2v25.

    What's puzzling is that the problems aren't consistent. They aren't intermittent either; it's just that after a few updates and downdates etc., the problems change. (To me that suggests that a reset might well work.)

    I'm temporarily content on 2v12; all I need the watch for is a couple of my own apps.

  • On 2v25, even with your problem, you should be able to enter recovery mode by holding the hw button pressed for a while - several seconds (hold to trigger watchdog, continue hold during watchdog, continue hold until the recovery menu appears, then release). In the recover menu there's a factory reset option.

    Or, if you can still connect to the watch from the app loader you can factory reset from its "More..." tab.

    Or, if you can connect from the web IDE you could run Bangle.factoryReset() from the left hand side console field.

  • Very helpful, thanks. Although changing firmware has brought all the noted problems plus a few more, at some point I will still try what you suggest.

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

Firmware upgrade knocks out app…

Posted by Avatar for Numerist @Numerist

Actions