Autor Thema: Fence entry/exit inconsistent with 1 phone, ok with the other  (Gelesen 1443 mal)

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Hello Egmont,


I have been struggling with the app on one particular phone over the last several months.  Both phones are currently on BT 1.0.7 and have identical configurations.

One phone, a Samsung S4 on Android 5.0.1, is running just fine.  The other one, a Samsung S5 on Android 6.0.1, consistently misses sending either a fence entry or an exit.  Power conservation on the S5 is off for the app and it does send tracking information correctly.

I've spent hours reviewing parameters, documentation and logs to understand, but to no avail.  I do see sporadically the message "Error (GR02) in get of the server response: Unable to resolve host "xxx.entrydns.org": No address associated with hostname".  But that DNS entry is resolvable, so one would assume a malfunctioning socket, but then tracking information and some fences do get sent by the app.

Can you point to any debugging technique to narrow down the issue?  I guess I could set the logging to 'info' to get a complete picture.  Anything else?

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 759
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #1 am: 14.02.2017, 07:36:58 »
Zitat
One phone, a Samsung S4 on Android 5.0.1, is running just fine.  The other one, a Samsung S5 on Android 6.0.1, consistently misses sending either a fence entry or an exit.  Power conservation on the S5 is off for the app and it does send tracking information correctly.
Did you set the accuracy in the app to a value greater 0. Then set it to 0.

Zitat
Error (GR02) in get of the server response: Unable to resolve host "xxx.entrydns.org": No address associated with hostname
If so, no internet is available. Try to play with the radius. Maybe you have at that point no internet.
Did you gave the app the internet permission?

Zitat
Can you point to any debugging technique to narrow down the issue?  I guess I could set the logging to 'info' to get a complete picture.  Anything else?
Debug is writing more out.
Other techniques are not available.
Schöne Grüße
Egmont

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #2 am: 22.02.2017, 07:06:41 »
Accuracy - set to 0.
Internet - permissions show it has WiFi/Internet access; keep in mind EgiGeoZoneBT on the S5 phone works ok for a while, registering a fence exit, transmitting tracking information, but then misses the fence entry for some reason.


I found another issue.  My wife powers off the S5 when going to a medical appointment and powers it back up when leaving that location.  Logging on the HS PHLocation plugin side shows the S5 transmitting everything it should until the phone is powered off.  When the phone is powered up again, the HS PHLocation plugin does not receive anymore; here's what the logging shows on the S5 EgiGeoZoneBT side, at power on:

2017-02-21 15:35:45,059 - [ERROR::de.egi.geofence.geozone.bt.StartupReceiver::de.egi.geofence.geozone.bt.StartupReceiver] - Logger set!
2017-02-21 15:35:45,087 - [ERROR::de.egi.geofence.geozone.bt.StartupReceiver::de.egi.geofence.geozone.bt.StartupReceiver] - EgiGeoZone gestartet
2017-02-21 15:35:45,131 - [ERROR::de.egi.geofence.geozone.bt.StartupReceiver::de.egi.geofence.geozone.bt.StartupReceiver] - call registerGeofencesAfterRebootOrUpdate: android.intent.action.BOOT_COMPLETED
2017-02-21 15:35:45,132 - [ERROR::de.egi.geofence.geozone.bt.StartupReceiver::de.egi.geofence.geozone.bt.StartupReceiver] - in registerGeofencesAfterRebootOrUpdate
2017-02-21 15:35:45,144 - [ERROR::de.egi.geofence.geozone.bt.StartupReceiver::de.egi.geofence.geozone.bt.StartupReceiver] - registerPathsenseAfterRebootOrUpdate
2017-02-21 15:46:12,812 - [ERROR::de.egi.geofence.geozone.bt.geofence.PathsenseGeofenceEventReceiverService::de.egi.geofence.geozone.bt.geofence.PathsenseGeofenceEventReceiverService] - Do not call events after reboot or at update

Next time I get a chance, I'll do the power off/on with 'debug' on.

In the meantime, do you see any explanation for EgiGeoZoneBT not transmitting after being powered back on?


cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #3 am: 22.02.2017, 23:14:06 »
Hello Egmont,


I left you a PM.  Please confirm you received it.

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 759
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #4 am: 23.02.2017, 06:29:11 »
I got an email from you and here the answers.

1. The problem that you get the Retry request for zone. No server profile found: ... log entry is a bug. The Retry is working anyway! Resolved it yesterday with version 1.0.8.

2. That the tracking intervall is 5 minutes, but you changed it to 2 minutes, can be a bug. I will look at it.
    Where did you set the 2 minutes intervall? At the zone tracking settings? Or in the main app settings?

3. I can't see other errors in the log. Maybe sometimes you the device does not get an update from the Geofencing services.

Zitat
In the meantime, do you see any explanation for EgiGeoZoneBT not transmitting after being powered back on?
What do you mean with not transmitting? The tracking or geofence events?

If it misses the fence events, then something is getting the device to sleep! Check Smart Manager, own battery optimisations and put the app on the white list.
« Letzte Änderung: 23.02.2017, 06:53:56 von Admin »
Schöne Grüße
Egmont

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #5 am: 23.02.2017, 17:39:58 »
2. That the tracking intervall is 5 minutes, but you changed it to 2 minutes, can be a bug. I will look at it.
    Where did you set the 2 minutes intervall? At the zone tracking settings? Or in the main app settings?

a) Main app settings/Location tracking/"Time in minutes between location updates (polling)"
b) Geofences/Location tracket settings/"Interval in minutes to log location"
I could not find any other setting
Zitat
3. I can't see other errors in the log. Maybe sometimes you the device does not get an update from the Geofencing services.

I'm currently using Pathsense.  Is Google more reliable?  Actually, I'm using Pathsense on both phones: the S4 is solid, the S5 is problematic (exact same settings).  The difference is Android level, 5.0.1 (S4) -vs- 6.0.1 (S5).

Actually, the phone apparently did receive the fence exit at 8:47:57,949

What is the reference to Google Play services at 8:47:58,250, given I'm using Pathsense?
Zitat

What do you mean with not transmitting? The tracking or geofence events?

My wife's trip was about 20 minutes one direction, then stationary for about 20 minutes, then return trip for 20 minutes.  In the PHLocation plugin log, there are only 3 entries for all that time:
Fence entry/exit
Only one, a fence entry at 9:32:42 (but no fence exit that should have appeared at around 8:47).  In your log, I see you are getting info from Pathsense at 8:47:57, so obviously the phone has a (cell) connection, but then there is that GR02 error "Unable to resolve host": log entry at 8:47:58,233 says "servicesConnected", so why is it that you cannot get a response from entrydns.org? Could it be a wait/timing issue?
Tracking entries
One at 8:54:38, one at 9:29:38; her trip started at around 8:44.  I can see in the EgiGeoZoneBT log, between 8:54:42 and 9:29:39, entries every 5 minutes stating "result after get: ET data accepted. HttpStatus: 200".  I would assume if you're stating a 200, it's because you are transmitting tracking events to the PHLocation server, but why is he not (apparently) acknowledging them (missing 10 out of 12)?  I'll communicate with Paul on this one
Zitat
If it misses the fence events, then something is getting the device to sleep! Check Smart Manager, own battery optimisations and put the app on the white list.
As stated in my PM, I believe I have turned off all sleeping mechanisms on the S5.  Android says there are no energy saving optimizations for EgiGeoZoneBT.

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 759
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #6 am: 23.02.2017, 20:11:18 »
Zitat
a) Main app settings/Location tracking/"Time in minutes between location updates (polling)"
b) Geofences/Location tracket settings/"Interval in minutes to log location"
I could not find any other setting
No more options available.

Zitat
I'm currently using Pathsense.  Is Google more reliable?
You can try which is better for your surroundings.

Zitat
What is the reference to Google Play services at 8:47:58,250, given I'm using Pathsense?
It is used for tracking and is a debug information, that the service is available.

Zitat
In your log, I see you are getting info from Pathsense at 8:47:57, so obviously the phone has a (cell) connection, but then there is that GR02 error "Unable to resolve host": log entry at 8:47:58,233 says "servicesConnected", so why is it that you cannot get a response from entrydns.org? Could it be a wait/timing issue?
I am not sure, what it can be. Maybe you can increase the timeout in the server profile.

Zitat
    If it misses the fence events, then something is getting the device to sleep! Check Smart Manager, own battery optimisations and put the app on the white list.

As stated in my PM, I believe I have turned off all sleeping mechanisms on the S5.  Android says there are no energy saving optimizations for EgiGeoZoneBT.
But did you check the Smart Manager App?

Schöne Grüße
Egmont

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #7 am: 23.02.2017, 22:23:20 »
Smart Manager: app power saving is Off for EgiGeoZone

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #8 am: 23.02.2017, 22:25:15 »
On the issue of polling every 5 minutes instead of the specifies 2 minutes, well today I noticed messages were being received every 2 minutes by PHLocation.  No changes since yesterday, pretty spooky.

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #9 am: 23.02.2017, 22:30:02 »
Zitat
What is the reference to Google Play services at 8:47:58,250, given I'm using Pathsense?

It is used for tracking and is a debug information, that the service is available.

Just trying to understand, so is Pathsense used for fencing and Google Play services used for tracking?

cv27

  • Newbie
  • *
  • Beiträge: 18
  • Gerät: Samsung Galaxy S4/S5
  • Version: Android 5.0.1
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #10 am: 23.02.2017, 22:33:01 »
Zitat
In your log, I see you are getting info from Pathsense at 8:47:57, so obviously the phone has a (cell) connection, but then there is that GR02 error "Unable to resolve host": log entry at 8:47:58,233 says "servicesConnected", so why is it that you cannot get a response from entrydns.org? Could it be a wait/timing issue?
I am not sure, what it can be. Maybe you can increase the timeout in the server profile.


It's currently at the default 30 seconds, but the time stamp difference in the above is only 1 second.

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 759
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Fence entry/exit inconsistent with 1 phone, ok with the other
« Antwort #11 am: 24.02.2017, 07:24:57 »
That means, it is not a timeout. Android cannot resove the host name in dns.
Schöne Grüße
Egmont