B2: GPS/GNSS not working anymore #5685
Replies: 1 comment
-
Posted at 2023-01-01 by myxor I tried to update A-GPS data, flashed current edge firmware and also tried to let the battery drain but all three did not bring any success. Posted at 2023-01-06 by @gfwilliams You could try flattening the battery which would hard-reset the GPS... Could this also be related to recent changes in the Gadgetbridge app which attempt to use the phone's GPS via the Gadgetbridge connection if it exists? Posted at 2023-01-06 by myxor
I already tried that but did not help.
Yes indeed i had this activated. I will try with this disabled in the next days. Posted at 2023-01-08 by myxor So today i tried again: Something is still a bit buggy with the GPS/GNS. Posted at 2023-01-12 by myxor Yesterday and today i tried again 20+ minutes under clear sky but not a single GPS/GNS event coming in while having GPS Info app opened. I am really not sure what i can do to get it working again. Posted at 2023-01-13 by @gfwilliams What happens if you do a factory reset (you can backup first), then install just the GPS info app and nothing else? It might not be a surprise that this coincides with the GPS functionality being added to Gadgetbridge/Android.
Are you trying to figure this out based on the Because I just tried this and I'm not sure what it's measuring but I'm constantly getting packets from the GPS based on Posted at 2023-01-15 by myxor
You are right, there is a bug in the code of GPS Info which i will fix soon.
I will try this in the coming days and will report back here. Posted at 2023-01-16 by @gfwilliams That is very odd. Even without a fix the GPS should be outputting some data. What about adding Posted at 2023-01-18 by myxor So, i reseted my B2 on the weekend and just installed GPS info app. It worked! I got a fix in a couple of minutes. Today i tried again and it stopped working again. Not a single GPS or GPS-raw event in more than 30 minutes under clear sky. Posted at 2023-01-19 by @gfwilliams
Hmm. I'm wondering whether this is to do with the recent Gadgetbridge code to allow the phone to access your device's GPS... What happens if you type If it's something else it means that the Android Integration app has jumped in and taken control of the GPS Posted at 2023-01-19 by myxor I do not have the Gadgetbridge's GPS functionality enabled. It says
Posted at 2023-01-19 by @gfwilliams Ok, well that's good news then - your hardware is fine. What you're seeing is that the GPS function has been overwritten by something. But I don't see any function containing Could you try running this?
Hopefully it'll show the file that contains that code Posted at 2023-01-19 by myxor Good idea, sadly no luck:
My apps are up to date. I don't have sensor tools installed:
Posted at 2023-01-19 by myxor I grabbed a new backup from the Bangle and greped the files:
Posted at 2023-01-19 by myxor I found a code block here: After deinstalling the GPS widget the function definition is different:
But GPS still not working. Then i found that in android.settings.json the key "overwriteGps" was set to true. I am pretty sure that i never turned this on in the Bangle.js android app but who actually knows... So if the Bangle.js android app expects GPS coming from GadgetBridge but the setting in GP is turned off then the Bangle.js will never get any GPS. I feel sorry for the time the hunt for this consumed. Thank you for your help, this seems to be solved! Posted at 2023-01-19 by @gfwilliams Ahh, thanks! That's so stupid! Looks like I made a typo So it turns out that widgps was hiding the real implementation!
I've just checked into this - I could be wrong, but I can't see how it could have got enabled unless you'd enabled it. I'd have hoped you'd have seen messages like The frustrating thing is that when disconnected, it should work as normal - but the second you connect to see what's going on it would switch to the Gadgetbridge mode. There is a PR for some changes to this at espruino/BangleApps#2473 but I wanted to take a bit of time to look into it before merging... Posted at 2023-01-19 by myxor
Yes i saw that in the log.
That would explain why it worked sometimes but most of the times not.
I have seen that. Take your time :) Posted at 2023-01-19 by @halemmerich The PR does not fix the behaviour when the GB side is configured not to provide GPS events. At least not yet. Can we check if a GB setting is set? Then it would be easy to integrate a check and prevent this situation. If we can not check the settings, maybe the app should send it's GPS setting state to the bangle when the gps_power message arrives? Posted at 2023-01-20 by @gfwilliams Maybe we should turn the GPS on by default, report it to Gadgetbridge, and then on the very first GPS event we get from Gadgetbridge turn it off and switch to Gadgetbridge GPS? That way if for any reason at all Gadgetbridge isn't providing info, the GPS still works? Posted at 2023-01-21 by @halemmerich That seems to be a valid compromise. We could just switch on the first Gadgetbridge GPS event, keep time until the next arrive to get the configured timeout and then set a timeout slightly longer to re-enable builtin GPS. That way no handling of connection events would be necessary and no internal keeping of state besides the expected time to next Gadgetbridge GPS event. Maybe even communicate the configured interval duration in the first or all GPS events to make this easier to do on the bangle. Posted at 2023-01-23 by @gfwilliams
That sounds great! I'm not sure how often the phone pushes GPS updates, but I'd say that maybe even just a hard-coded 5-10s timeout would be fine. Posted at 2023-01-23 by @halemmerich Default in Gadgetbridge is currently 10s, but since that is configurable, we must handle even longer pauses between events. Should be easy by just storing the time between two events and just ignoring the case where the user changes Gadgetbridge config to a significantly higher value while phone GPS is used. Posted at 2023-01-24 by @gfwilliams Ahh, that's interesting! I guess ideally Gadgetbridge would be pushing updates once a second, as when the GPS is actually on the power usage between 1s and 10s will be minimal, and Bangle.js apps may be expecting a 1s update |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-12-31 by myxor
I tried to run with my Bangle.js 2 today but wasn't able to get a GPS/GNSS fix in several minutes, also trying multiple reboots (which helped before most of the time).
Then i started the GPS info app and see no fix again after being outside for quite some times.
Then i tried
from https://github.com/espruino/BangleApps/wiki/GPS-Issues via the WebIDE but i don't see any GPS event coming in.
Can it be that my GPS/GNSS module is broke?
Beta Was this translation helpful? Give feedback.
All reactions