Avatar for Stunts

Stunts

Member since Apr 2021 • Last active Oct 2021
  • 2 conversations
  • 24 comments

Most recent activity

    • 27 comments
    • 871 views
  • in Bangle.js
    Avatar for Stunts

    I don't know... it seems unlikely it's related to the phone though. I'm a bit busy now with the KickStarter but I'll try and look into this later on

    Thank you for the follow up!

  • in Bangle.js
    Avatar for Stunts

    What is your Gadgetbridge version? Did you install Gadgetbridge from the Google Play store, or from F-Droid?

    I am using Gadgetbridge 0.60.0 from F-Droid.

  • in Bangle.js
    Avatar for Stunts

    Ahh - you're pasting into the right-hand side and clicking 'upload', which resets the Bangle and writes just that code.

    Sorry! Newbie mistake. Anyway, here are the results:
    Issuing GB({"t":"call","cmd":"incoming","name":"­John","number":"+491234"}) successfully shows an incoming call notification (I had never seen this notification before, so - progress!)

    So I tried to "intercept" Gadgetbridge's commands using the suggested snippet. Again, success:

    {"t":"notify","id":1633013163,"subject":­"Test","body":"Test","sender":"Test","te­l":"Test"}
    {"t":"call","cmd":"","name":"Test","numb­er":"Test"}
    

    The first list element is for Gadgetbridge's debug test gmail notification. All looks good.
    The second list element is for Gadgetbridge's debug test incoming call. Here things don't look so good. Gadgetbridge does not seem to be sending the expected incoming value for the cmd: key.

    It seems to me like a problem in Gadgetbridge phone app rather than on the watch's end. Any ideas on why this might be happening? Or should I open an issue on Gadgetbridge's issue tracker?

    or even showing a phone icon

    Woha. Cool! Thanks @dapgo.

  • in Bangle.js
    Avatar for Stunts

    Yes, it was fixed after the 2v10 release: https://github.com/espruino/Espruino/blo­b/c23289e6c18f9a88df812b855d2a54a000f54d­61/ChangeLog#L14 - so a daily build will have it sorted or it'll be fixed in 2v11

    Confirming the fix with firmware v2.8.83. Thank you! =-)

    So GB({"t":"call","cmd":"accept","name":"na­me","number":"+491234"}) for example.

    Ok, so this is proving harder to do.
    Opening the IDE, connecting via Web Blutooth I can do. Sending simple commands such as print("hello espruino") is working fine (the watch leaves the watch-face app and displays the Bangle.js logo, firmware version, etc and "hello espruino" is printed to the webIDE console).

    However, any commands starting with GB() are throwing errors:

    Uncaught ReferenceError: "GB" is not defined
     at line 1 col 1
    GB({"t":"call","cmd":"accept","name":"na­me","number":"+49123...
    ^
    

    It's like the GB function (which from reading http://www.espruino.com/Gadgetbridge I assume stands for "GadgetBridge") has not been declared? I am quite certain Gadgetbridge is installed on the watch, since I can connect to it using my phone, so I'm not sure what is happening here.

  • in Bangle.js
    Avatar for Stunts

    So I'm thinking of adding a health event once per minute, that updates with health stats (eg steps, movement) over that minute (and the ability to query health stats for what has happened during the minute). That way apps can hook onto that event and nothing is treading on anything else's toes.

    Won't this drain a lot of battery?

    Could the firmware not manage the reset at midnight as per current locale setting ?
    Apps would be much simpler if we could just do Bangle.getSteps() rather than have to manage a >listenner.

    This seems like a complex problem. And this is my first time thinking about it, but maybe this could work:

    From my understanding the midnight reset becomes an issue only when some app is counting steps during a reset. What if apps that rely on step counting had a way to tell the firmware they are still counting? Specifically, if an app is counting steps, it would have to write "1" (or a timestamp, or even just the equivalent of GNU touch) to a .keepalive file. At midnight, the firmware only resets steps if the .keepalive file was modified more than 1 minute ago, otherwise, delay the reset for 5 minutes. Unless there is a better way to determine whether any app is accessing the step count?

    Another alternative would be to have the firmware write the step count to 2 files/variables at the same time. These files/vars would be named with the date (ddmmyyyy or similar, just something that changes every day in a predictable manner), and steps always get added to both "today" and "yesterday". Apps that read steps define on startup from which variable they are reading the step counts. Firmware step reset only deletes the file/variable "2 days ago".

    I would think both these approaches are less resource intensive than polling every minute (which will not only make apps more complicated, but also report the step information with a 1min delay).

    I have never done embedded development before, so these ideas might just be dumb/naive, but I thought they could maybe be helpful. Don't be afraid to tell me how dumb they are, if that is the case. =-)

  • in Bangle.js
    Avatar for Stunts

    Which firmware version do you have? I know there was an issue with this recently but cutting edge firmwares have it fixed.

    I'm on v2.10. Guess it will be fixed in v2.11? Or should I try using a daily build to make sure? Even after the latest update to "Notifications (Default)" v0.11 doing a BT3 long press does not dismiss the notification.

    You mean they are not working?

    They aren't. When my phone rings I don't get any notification on my watch (not even of a missed call, as @HughB mentioned). I kind of expected it to vibrate/piezo-ring while the phone rings. Is there anyway I can test this from the IDE (or even better, intercept whatever gadgetbridge is sending whenever I get an incoming call)?

  • in Bangle.js
    Avatar for Stunts

    Since we are here, is there anything we can do regarding call notifications? Or is that something to implement on Gadgetbridge's side?

  • in Bangle.js
    Avatar for Stunts

    I still seem to be able to dismiss the non-fullscreen notification by tapping the screen, but for some reason it's not displaying them properly.

    I can't always dismiss notifications when they are garbled like this. They don't disappear after a long press BT3 (as I think is expected), but if I just let the watch sit for a while and then try again it usually works. I haven't found a reliable way to reproduce, though.

    Ok, fixed now!

    Woha, thank you for the lighting fast fix! I just confirmed that notifications are no longer garbled.

  • in Bangle.js
    Avatar for Stunts

    Are you using Bangle 1 or Bangle 2 ?

    Sorry, forgot to mention! This is on the Bangle 1.

    On a B1 Full Screen notifcations work BUT the default notfications ends up with a corrupt part of the screen.

    Yes, mine looks a lot like that. But in fact, in your case it looks even more broken than in mine. So I guess it's not just a thing with some configuration issue I might have had. Thank you for trying to reproduce!

    When I make a test call - I only get a missed call notification - was expecting I would get a buzz while the phone was ringing.

    Exactly what I'm getting too. However I'm not really sure this has ever worked as we both expected.

Actions