WiGLE location no longer runs in 'background'
I am not sure what has happened, but in the last week, maybe, WiGLE WiFi on Android no longer seems to get any locations when the screen is not on the app.
To give some background, I use Tasker to start the app itself when on car Bluetooth connection, and it uses the idents later on to upload and exit after a time the Bluetooth connection is over. I also use the notifications silent as I have found when the notification is not silent it causes my phone to create a default notification sound every few seconds upon the figures updating. When the app is brought to the screen after being in the background or from lockscreen, say at the end of my journey, then it immediately shows a toast that it has got a GPS location and the networks then go from 0 to whatever is in the vicinity. My phone is an S20 on Android 11, One UI 3.1, security patch 1st March.
I had thought that the WiGLE notification being silent had caused the background location service not to run, but there is no change if it is left as default not-silent. I have looked at the location permissions, and there is not an 'always allow', but I understand this is because the notification allows it (maybe in the past) to get location updates when 'using the app'. I have made sure that mobile data is allowed to be used 'in the background', and that the app is not optimised for power. I am at a loss to explain, unless the March 1st security update was the trigger, knowing there has been no other recent updates or changes? Right now, I have to keep the app with the screen on to have any hope of getting networks.
To give some background, I use Tasker to start the app itself when on car Bluetooth connection, and it uses the idents later on to upload and exit after a time the Bluetooth connection is over. I also use the notifications silent as I have found when the notification is not silent it causes my phone to create a default notification sound every few seconds upon the figures updating. When the app is brought to the screen after being in the background or from lockscreen, say at the end of my journey, then it immediately shows a toast that it has got a GPS location and the networks then go from 0 to whatever is in the vicinity. My phone is an S20 on Android 11, One UI 3.1, security patch 1st March.
I had thought that the WiGLE notification being silent had caused the background location service not to run, but there is no change if it is left as default not-silent. I have looked at the location permissions, and there is not an 'always allow', but I understand this is because the notification allows it (maybe in the past) to get location updates when 'using the app'. I have made sure that mobile data is allowed to be used 'in the background', and that the app is not optimised for power. I am at a loss to explain, unless the March 1st security update was the trigger, knowing there has been no other recent updates or changes? Right now, I have to keep the app with the screen on to have any hope of getting networks.
Hm, there's a lot to unpack there. Thanks for the bug report, let's dig in.
Notes/questions:
1. the GPS toast probably pops up a lot saying "found location"/"lost location" - I'd treat that as a red herring, but the first suggestion below will give you a sense of how accurate your location is over the course of the drive by superimposing your route on the map view.
2. To scan reliably, Android 11 requires that you enable developer mode and disable scan throttling - have you done this?
3. Notifications-silent should have no bearing on finding networks - don't worry about that (I have all that disabled on most of my dev-devices unless I'm testing/debugging audio). This is independent from the GPS.
4. Which network counter are you watching? The "run" count on the main list view/dashboard is the total nets seen in the run, the color/icon text is the new of each type. If you're covering familiar territory, these probably don't increase much over the course of a drive, ride, or walk.
and a couple of suggestions:
1. enable "display routes for execution" for a trial or two - this will show you your GPS route. Check this at the end of your drive and see whether it matches your route. If you see a giant zig-zag, or just a dot, the problem is definitely a GPS issue.
2. the dashboard page will show you your current fix type at any moment; leaving that up might be illustrative. It will also show you the run stats for networks/new networks at a glance, which can be helpful.
3. I've noticed on my testing Samsung that the display "clicks" forward when I unlock, briefly showing my the last-displayed state; could that be a contributing factor? there's a keep-screen-on right-menu option that might be useful in determining if the totals are dynamically updating, but the screen is not.
Cheers, and looking forward to more details.
Notes/questions:
1. the GPS toast probably pops up a lot saying "found location"/"lost location" - I'd treat that as a red herring, but the first suggestion below will give you a sense of how accurate your location is over the course of the drive by superimposing your route on the map view.
2. To scan reliably, Android 11 requires that you enable developer mode and disable scan throttling - have you done this?
3. Notifications-silent should have no bearing on finding networks - don't worry about that (I have all that disabled on most of my dev-devices unless I'm testing/debugging audio). This is independent from the GPS.
4. Which network counter are you watching? The "run" count on the main list view/dashboard is the total nets seen in the run, the color/icon text is the new of each type. If you're covering familiar territory, these probably don't increase much over the course of a drive, ride, or walk.
and a couple of suggestions:
1. enable "display routes for execution" for a trial or two - this will show you your GPS route. Check this at the end of your drive and see whether it matches your route. If you see a giant zig-zag, or just a dot, the problem is definitely a GPS issue.
2. the dashboard page will show you your current fix type at any moment; leaving that up might be illustrative. It will also show you the run stats for networks/new networks at a glance, which can be helpful.
3. I've noticed on my testing Samsung that the display "clicks" forward when I unlock, briefly showing my the last-displayed state; could that be a contributing factor? there's a keep-screen-on right-menu option that might be useful in determining if the totals are dynamically updating, but the screen is not.
Cheers, and looking forward to more details.
Thank you for offering up things to try.
It defiantly went wrong in recent weeks and was working fine, with triggered upload using Tasker, and the fist significant sign was when I realised my upload list was missing days worth, as the files would have been empty.
I will have a short drive across town tomorrow and let you know what the result it.Notes/questions:
1. the GPS toast probably pops up a lot saying "found location"/"lost location" - I'd treat that as a red herring, but the first suggestion below will give you a sense of how accurate your location is over the course of the drive by superimposing your route on the map view.
2. To scan reliably, Android 11 requires that you enable developer mode and disable scan throttling - have you done this?
I have now enabled developer mode (7x tapping on 'build version') and also now disabled scan throttling.
3. Notifications-silent should have no bearing on finding networks - don't worry about that (I have all that disabled on most of my dev-devices unless I'm testing/debugging audio). This is independent from the GPS.
4. Which network counter are you watching? The "run" count on the main list view/dashboard is the total nets seen in the run, the color/icon text is the new of each type. If you're covering familiar territory, these probably don't increase much over the course of a drive, ride, or walk.
It is the run count I am watching. For example, when I left work, the count in the app displayed as 8, and when I got home I opened the app again and got the GPS location toast, and which point the run increased to around 30. I would expect from the same journey to be at least 300 in the past.
and a couple of suggestions:
1. enable "display routes for execution" for a trial or two - this will show you your GPS route. Check this at the end of your drive and see whether it matches your route. If you see a giant zig-zag, or just a dot, the problem is definitely a GPS issue.
I have now enabled and will report back.
2. the dashboard page will show you your current fix type at any moment; leaving that up might be illustrative. It will also show you the run stats for networks/new networks at a glance, which can be helpful.
3. I've noticed on my testing Samsung that the display "clicks" forward when I unlock, briefly showing my the last-displayed state; could that be a contributing factor? there's a keep-screen-on right-menu option that might be useful in determining if the totals are dynamically updating, but the screen is not.
It defiantly went wrong in recent weeks and was working fine, with triggered upload using Tasker, and the fist significant sign was when I realised my upload list was missing days worth, as the files would have been empty.
It sounds like you've covered the bases; I worry this is going to be a tough one.
Keep us posted with the results of these initial checks, drive safe, and we'll get this problem solved.
Cheers,
-Ark and the WiGLE team
Keep us posted with the results of these initial checks, drive safe, and we'll get this problem solved.
Cheers,
-Ark and the WiGLE team
I have some positive news, I think. I went out for a walk this morning, actually walking the same route as last week, and the run was over 3000 and new WiFi over 900. This was opening WiGLE manually and not using Tasker event, but so was the same walk last week. I left the app running in the background, and did not interact with it in any way. The phone I was using to write up a work email, so was in use, but so was last week's walk. To summarise, I did nothing different this time round, only the changes I followed.
I will of course still check the Tasker triggered run when I go for my drive across town, but for this I will use it the same as I always have done and not have the screen on and no interaction with the app in any way (will know it is running as even though the notifications are silent and not visible on the lock screen, I have used Tasker to create a notification to simply say it is running on the lock screen).
A semi-related question, when I first looked at the map towards the end of the run, I first thought it was showing some location / GPS missing as the track cut off large chunks of my walk, and showed the clusters for only the more recent networks. However I also quickly realised that there was no cluster towards the start (had started the run away from my house in case I needed to provide a screenshot, so there was no overlap with where I was at the end and saw a cluster), so I realised it is indeed 'x' number of recent networks. When I zoomed in and out, the track did not follow the route, but then I noticed it did and followed the change in direction and a simplified track on the curving long path. I presume that I would be right in thinking that the track was overly simplified until it rendered all the location points, and then provided a much less simplified version of the track based on significant change of direction to reduce the displayed points?
I will of course still check the Tasker triggered run when I go for my drive across town, but for this I will use it the same as I always have done and not have the screen on and no interaction with the app in any way (will know it is running as even though the notifications are silent and not visible on the lock screen, I have used Tasker to create a notification to simply say it is running on the lock screen).
A semi-related question, when I first looked at the map towards the end of the run, I first thought it was showing some location / GPS missing as the track cut off large chunks of my walk, and showed the clusters for only the more recent networks. However I also quickly realised that there was no cluster towards the start (had started the run away from my house in case I needed to provide a screenshot, so there was no overlap with where I was at the end and saw a cluster), so I realised it is indeed 'x' number of recent networks. When I zoomed in and out, the track did not follow the route, but then I noticed it did and followed the change in direction and a simplified track on the curving long path. I presume that I would be right in thinking that the track was overly simplified until it rendered all the location points, and then provided a much less simplified version of the track based on significant change of direction to reduce the displayed points?
Sadly I do not bring great news; the drive(s) were a failure. Driving across town, I left it to do its thing via Tasker with no interaction from me, and I can see it picked up no networks / no locations. Drive to the supermarket, where I left it again to do its thing via Tasker, and this time I opened it up when I got there for it to only then get a location, confirmed by the track on the map. Lastly, drive back home where I started it off and got a location before I drove off, for it to lose the location until I unlocked my phone at the end of the drive, confirmed by the track on the map.
This morning's walk, did it work because I was using the phone / unlocked / screen on the entire time?
EDIT: I also wish to say that the background data use and not optimising battery use were changed to allow and not optimize before I reached out to you. I have just re-approved location use to see if that gives it a kick at all.
This morning's walk, did it work because I was using the phone / unlocked / screen on the entire time?
EDIT: I also wish to say that the background data use and not optimising battery use were changed to allow and not optimize before I reached out to you. I have just re-approved location use to see if that gives it a kick at all.
I have occasionally seen this happen - rebooting the phone fixes the problem every time so I suspect it's just an Android issue, something probably got "updated" but didn't require a restart. Android apps seem to get updated all the time so I assume there are a lot of small issues in the background of the OS, causing bugs to be "moved" rather than fixed. Essentially rebooting the phone always seems to fix this sort of thing. ![Smile :)](./images/smilies/icon_smile.gif)
![Smile :)](./images/smilies/icon_smile.gif)
Sadly it has been rebooted a couple of times recently, and the same lack of location when the phone screen is off or the app is not active is happening ![Sad :(](./images/smilies/icon_sad.gif)
I am 90% sure it was an automatic OS/UI, or security patch for March that is the issue and has changed the 'rules of the road' for WiGLE and another of other apps, as I have seen some weird crashes recently on other apps.
I also add that I have excluded WiGLE from sleep, memory dump, ect. in addition to the other recent settings changed in this thread, with no change.
![Sad :(](./images/smilies/icon_sad.gif)
I am 90% sure it was an automatic OS/UI, or security patch for March that is the issue and has changed the 'rules of the road' for WiGLE and another of other apps, as I have seen some weird crashes recently on other apps.
I also add that I have excluded WiGLE from sleep, memory dump, ect. in addition to the other recent settings changed in this thread, with no change.
This is bad news - obviously your phone's from a big manufacturer, but I can't reproduce the problem on my devices (from them or otherwise), or explain this simply. It's true that if the OS stops background activities, we can't detect or overcome that easily, but it's strange that this is happening in a particular corner of the Android ecosystem. There has to be something we're missing here...
I don't know what to say really, I just know that it all seemed to stop working about a month ago now.
This morning I have cleared the data, meaning I needed to set the app up again, and left the GPS jamming detection on this time, which confirms that when the app is re-opened that the toast pops up saying that jamming was detected. Whatever is going on, it definitely is not being allowed to get the location in the background when the phone screen is off (have used tasker to trigger the opening of the app at a given time to test for changes).
This morning I have cleared the data, meaning I needed to set the app up again, and left the GPS jamming detection on this time, which confirms that when the app is re-opened that the toast pops up saying that jamming was detected. Whatever is going on, it definitely is not being allowed to get the location in the background when the phone screen is off (have used tasker to trigger the opening of the app at a given time to test for changes).
which GPS jam message are you seeing?
We have:
We have:
no GPS fix
No GPS detected in device!
but the only time we mention jamming actively is WiFi not GPS:Please turn on GPS
let us know which message you're seeing?WiFi appears jammed, turning off, and then on, WiFi.
I have received "Lost location" and "no GPS fix" when the app is left for a period of time, and today after clearing the data and cache, I did think it was a GPS jamming toast, but leaving the app running in the background, after a period of time it does indeed say "WiFi appears jammed, turning off, and then on, WiFi.". The original toast I had in mind am sure was shorter than this, but oh well.
Hm, ok -
So this changes the pathology. It's common to lose and regain GPS with some frequency; that's not necessarily a cause for alarm. What's uncommon in this description is the WiFi jamming; that's bad. If that's happening frequently, it would absolutely explain your issues, and there are several well-known causes and steps to try and fix it. Frankly, this scenario makes a LOT more sense as a root cause for the problems you're describing than GPS.
1. If you're running Android 9 - there's nothing much to do for this, other than make sure you don't scan more than 2 times/minute. The limit is built into the operating system. Some folks have implied that you can work around it with a specific ADB command or in certain patch releases, but we haven't verified any of these.
The ADB command, if possible is:
2. If you're running Android 10/11/12 and *haven't* applied the throttling fix, fear not - this is pretty easy:
https://www.allowsomedenyall.com/2019/0 ... tling.html
3. If neither of these are the problem, then there's something afoot with your WiFi; we can start by increasing the delay between scans and seeing if the jam stops. If it doesn't fix it, then we may have to confront the possibility that there's a problem with the WiFi driver in that upgrade, or that the device is overheating (or both.)
Cheers,
-Ark and the WiGLE
So this changes the pathology. It's common to lose and regain GPS with some frequency; that's not necessarily a cause for alarm. What's uncommon in this description is the WiFi jamming; that's bad. If that's happening frequently, it would absolutely explain your issues, and there are several well-known causes and steps to try and fix it. Frankly, this scenario makes a LOT more sense as a root cause for the problems you're describing than GPS.
1. If you're running Android 9 - there's nothing much to do for this, other than make sure you don't scan more than 2 times/minute. The limit is built into the operating system. Some folks have implied that you can work around it with a specific ADB command or in certain patch releases, but we haven't verified any of these.
The ADB command, if possible is:
Code: Select all
adb shell settings put global wifi_scan_throttle_enabled 0
2. If you're running Android 10/11/12 and *haven't* applied the throttling fix, fear not - this is pretty easy:
https://www.allowsomedenyall.com/2019/0 ... tling.html
3. If neither of these are the problem, then there's something afoot with your WiFi; we can start by increasing the delay between scans and seeing if the jam stops. If it doesn't fix it, then we may have to confront the possibility that there's a problem with the WiFi driver in that upgrade, or that the device is overheating (or both.)
Cheers,
-Ark and the WiGLE
I have some results that may or may not make sense, and I am still investigating and trying things out (N.B. I have reinstalled WiGLE and left settings as default, including the speech with has given me more insight):
-It is fairly clear to me now that if Tasker is set to start WiGLE based on whatever event or state you like, it does not seem to start it 'properly' as when the screen is locked I can hear it after 90 seconds saying it has been that length (or multiples) since a scan and it attempts to restart WiFi (which I do not believe it ever does). When I unlock the phone and interact with WiGLE, and then go elsewhere into the phone (or lock the phone again) it reverts back to alerting me after 90 seconds on the WiFi scans having stopped.
-When I open WiGLE manually, no matter what I do after that, it continues to work.
The above is based on not leaving home and testing the scans by going round the house (database cleared with re-install).
I know that working with Tasker in this way always worked before a month ago, and considering all it is doing is launching the app, I may have wrongly assumed it did not have a part in the issue, but maybe it is something I need to speak to the Tasker community about.
Any ideas or thoughts based on this new info?
-It is fairly clear to me now that if Tasker is set to start WiGLE based on whatever event or state you like, it does not seem to start it 'properly' as when the screen is locked I can hear it after 90 seconds saying it has been that length (or multiples) since a scan and it attempts to restart WiFi (which I do not believe it ever does). When I unlock the phone and interact with WiGLE, and then go elsewhere into the phone (or lock the phone again) it reverts back to alerting me after 90 seconds on the WiFi scans having stopped.
-When I open WiGLE manually, no matter what I do after that, it continues to work.
The above is based on not leaving home and testing the scans by going round the house (database cleared with re-install).
I know that working with Tasker in this way always worked before a month ago, and considering all it is doing is launching the app, I may have wrongly assumed it did not have a part in the issue, but maybe it is something I need to speak to the Tasker community about.
Any ideas or thoughts based on this new info?
Sorry to double post, but I have some further questions:
Based on leaving WiGLE running all the time, and using Tasker to automate the pausing and scanning...
1) a) Does pausing the scan stop it getting GPS location? I am aware of the background listener, but I want to know that the battery will not be drained by keeping scan paused.
b) Or should I leave it scanning but with a large period when stationary and the GPS updates sync with the WiFi scan, or is this going to use more battery anyway as the GPS will still be pulling battery between these scans?
2) Is there a way to clear the run and new count without exiting WiGLE? If I have it paused for days between phone restarts, or manually exiting the app, the count will otherwise remain?
Based on leaving WiGLE running all the time, and using Tasker to automate the pausing and scanning...
1) a) Does pausing the scan stop it getting GPS location? I am aware of the background listener, but I want to know that the battery will not be drained by keeping scan paused.
b) Or should I leave it scanning but with a large period when stationary and the GPS updates sync with the WiFi scan, or is this going to use more battery anyway as the GPS will still be pulling battery between these scans?
2) Is there a way to clear the run and new count without exiting WiGLE? If I have it paused for days between phone restarts, or manually exiting the app, the count will otherwise remain?
Return to “WiGLE WiFi Wardriving Bugs”
Who is online
Users browsing this forum: No registered users and 44 guests