-
Notifications
You must be signed in to change notification settings - Fork 1.3k
android: Send fw and hw on connection #2890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Maybe we could just make the Bangle send the info automatically on connection? We should totally filter the data we send as well to just what's required - I just checked and it's 300 bytes which would really impact the connection speed.... We already send battery+force_caledar_sync on every connection so adding a little more data wouldn't be a big deal. https://github.com/espruino/BangleApps/blob/master/apps/android/boot.js#L254-L257 I also spotted that we do already handle the version info being sent in Gadgetbridge by the look of it? https://codeberg.org/Freeyourgadget/Gadgetbridge/src/branch/master/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java#L522-L526 |
I'm not used to being able to control the watch-side of the code :) this is definitely a better idea. |
|
Great - thanks! Please can you bump the version in the metadata and put a line in the changelog and I'll merge it? |
|
Done. @gfwilliams one last question before merging this - I do not currently have a use for the fw version on the Gadgetbridge side, other than displaying it. Do you think it's still worth it to send on every connection, or should we just get Gadgetbridge to query the hw version on-connection, if unknown? (should only happen once, and never change). I am not too familiar with the limitations of the original Bangle, so I'd prefer to impact it as little as possible :) If sending on every connection is not really a concern for you, I think this is fine to merge. |
|
Yes, I think sending it is fine - it's probably maybe 10 chars extra or something like that, so not a big deal - and it's handy for users to be able to see anyway. |
Add a simple command to get the current process.env.
This should allow us to display the firmware and hardware versions on Gadgetbridge, as well as toggle features that are only available in the Bangle.js 2 (eg. Screenshots).
Additionally, include whether the Bangle is currently programmable, as that might be require for some features that execute js directly.
Used in https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3213