We have moved at community.getvera.com

Author Topic: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)  (Read 8230 times)

Offline gsheremeta

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
I wanted to let you know about a GCM issue I've struggled with for the last month. From what I can gather, it looks like an issue with Android 5.0.2 and the latest GCM client. I believe it's an issue with IPv6, but it could also be an Atheros radio issue.

Basically, people on Android 5.0.2 (Xperia Z3c, Galaxy S6) aren't getting GCM messages while the phone is sleeping (screen off).

For me, makes my phone pretty useless, as I then can't get home automation alerts from Vera Alerts! Vera Alerts uses GCM.

Turns out swapping my router fixed the issue when I'm on wifi. I switched from an Atheros-based OpenWrt router with IPv6 to an old Broadcom-based router running Tomato and IPv4 only. For 4G, I've disabled IPv6 on the APN. Still testing that part.

So if you start seeing posts about delayed notification issues on newer phones, consider disabling IPv6 or swapping routers!

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #1 on: June 28, 2015, 12:00:21 pm »
My LG G2 runs 5.02. Thanks for the heads up. Luckily the GetVera Android app does not seem to be affected by this. I know my home WiFi uses a Broadcom chip but I'm unsure as to what the one at work uses.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #2 on: September 08, 2015, 01:36:24 am »
So glad to see I am not the only one dealing with this madness. Drives me CRAZY!! Like you, while my S6 Edge is in sleep mode, anytime the display is not lit, I get no Vera Alerts while on WiFi. I set the Always option in advanced WiFi on the S6 but no luck. I would send test alerts to the locked phone, nothing. As soon as I unlock the phone, here they come. To make things worse, if I leave the property and hit 4G, here they come, one after another. It really makes the notifications pointless. After trying different apps like push notification fixer with no results, I just turned off WiFi for the last month. I am at the end of my billing cycle and nearing my 12G data limit. Very rare I use this kind of data and this notification issue prevents me from using my data when off WiFi as I usually would. Like enjoying my usual streaming of content. It was this data months data limit warning that drove me to seek a better solution.

I currently just use the router that is built in with my Comcast voice/data modem. I don'tr eally see a way to disable ipv6 with this device. Wondering, is there any drawback to removing ipv6 from the network? I do a great deal of streaming through NetFlix, DirecTV, Video Cams...the usual tons of devices for surfing.

I had read where some folks had rooted the S6 to disable ipv6 at the phone. Have you tried this prior to the router solution? My phone is not rooted right now but it might be soon if thats what it takes to finally get this issue resolved. 

Let me know your thoughts please and previous attemps/results.

Thanks for the post, I knew I was not the only S6 owner with push issues but glad to find someone with the same issues with Vera Alerts.

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #3 on: September 29, 2015, 11:21:01 am »
I am having similar trouble on HTC One M7 with android 5.0.2.  While phone is asleep on the home wifi, I get no VeraAlerts. As soon as I unlock it, the alerts come rolling in.  I do not have this problem when on mobile data.

If it makes any difference, my home wireless is a comcast xfinity gateway.

Is there any known resolution at this point other than turning wifi off on the phone?

Thanks!

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #4 on: September 29, 2015, 11:34:33 am »
Sadly, this is all I have figured out to do. As you say, turn the wifi off on the phone. I was having the same issue with Pandora. If on WiFI, it would play one song and then stop, as soon as I opened the phone, the music would begin playng again. If the phone is off wifi, the songs play one after another, no problem, while the phone is locked or in stanby. I will say this, I love my S6 but this is total BS!! I will think twice about another Samsung for my next purchase if they can't get this resolved soon. My Galaxy S 10.5 Tablet works just fine. It's something to do with the new Wifi radio in the S6 I believe. Nothing I have tried works. I got rid of ip6, the hearbeat app, none of it made any difference. I even told Vera to text me an alert to wake the phone up so I could then get the Vera alerts. That was half-a$$ as well. Now, I just stay off wifi unless I am doing a lot of surfing on the phone. Its a real bummer but without the Vera Alerts, my Vera system is pretty weak in my book. I have photo beams and stuff on the property that I need to be accurate and fast alerts. GOOD LUCK!! Please, if you find any solution, share here. I will be sure to do the same. BTW - I too am on Xfinity and use their router for phone/data, no TV, I use direct TV. You can turn off ip6 on the router but it didn't do anything for me. Even after rebooting every device in the entire network.

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #5 on: September 29, 2015, 11:54:31 am »
I've been thinking of disabling the wireless functionality of the xfinity gateway and using an Ubiquiti AP instead, but honestly I get decent enough coverage from the xfinity AP that it isn't high on my priority list.

I am not so sure it is a phone hardware issue with your S6, as I am having the same issue on a 2+ year old HTC phone.  ATT did just recently push the update to android 5.0.2 on my phone, for whatever that's worth.  Unfortunately I was not using VeraAlerts prior to the 5.0.2 update, so I do not know if 5.0.2 is a contributing cause.

I am going to setup a second profile on my work phone (galaxy s4 running 5.0.1) and see what happens.  Might be too many variables changed to be a worthwhile test, though.

It would be interesting to know if your S6 and my One M7 use the same wifi chip or not.

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #6 on: September 29, 2015, 01:04:21 pm »
Very interesting. I can tell you this though. I don't use the XFinity router/modem for wifi at all. I have it turned off and ONLY use Ubiquiti AP's for my wifi. I have 3 on my property. I get the issues regardless of the AP. Others feel it's an ip6 issue but I had no luck. I did just receive the latest OS update but it appears to be only for security. I am on Verizon wireless BTW. Maybe buying a different router from Best Buy, trying it out and then return if doesn;t work is an option? Since I do voice and data over the modem, I have always just stuck with the Xfinity one. Not to mention lightning is a bitch down here in FL. Have had my modem replaced by Xfinity twice last 3 years.

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #7 on: September 29, 2015, 01:14:57 pm »
I am on AT&T and use an S4. I like the features on it.
I usually do not have any problems as leaving the house every day cycles between wifi and Celluar data. I have only had problems if I, or at least my phone, stays home for a couple of days in a row,

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #8 on: September 29, 2015, 01:21:00 pm »
Hi Richard, are you on Comcast? Do you use the Comcast Modem/Router? Do you get voice/data/tv? Just curious if we can isolate the issue. It's very odd to me that my samsung tablet works just fine. Thanks

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #9 on: September 29, 2015, 03:55:01 pm »
After configuring the second phone/profile, I only had a short while at home this morning before I had to leave. 

With both phones (HTC One M7 running 5.0.2, and Galaxy S4 running 5.0.1) out in the wild on mobile data, I am not seeing any difference between them. They are both notifying me as alerts occur.

I'll give this configuration some more time for differences to become apparent when both are on the home wifi and possibly on other wifi networks.

I forgot that I have an older samsung tablet (galaxy tab 10.1 wifi only, running CM7) that I could test with as well.

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #10 on: September 29, 2015, 05:17:40 pm »
Some possibly related reading:
http://eladnava.com/google-cloud-messaging-extremely-unreliable/

I might try this out:
https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer.noroot&hl=en

If the issue is that my home wireless AP is closing the socket after x minutes, in theory setting the heartbeat on pushfixer to a shorter interval could serve as a workaround.

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 199
  • Karma: +6/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #11 on: September 29, 2015, 05:21:28 pm »
I tried the heartbeat long ago, no help. Please, do keep us posted though and GL

Offline James92TSi

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #12 on: September 29, 2015, 08:33:21 pm »
I've installed the PNF no-root version set for 5 minutes on the One M7... will continue to monitor timeliness of its notifications vs those on the Galaxy S4.

Thinking about this problem, I'd always noticed that google talk messages would come through on my GS4 while they would not come through on the M7 until I woke it up.  Likely the same root cause.

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #13 on: September 29, 2015, 10:00:47 pm »
I researched this up and down a while ago. The ports for gcm 5229 I believe have a short time out on most wifi routers versus 4g unless your software on the router has some advanced options on keeping connections alive.

Push fixer never worked. I reported all this to Joao for autoapps too.

You can try to send sms or emails to yourself or even tasker to switch wifi on and off which is a battery drain.

I believe when I get this issue it's around 15-30 minute delays give or take.

The only true way to get gcm to stay alive is if you could construct your own gcm packet to google but this requires an active development project and key.

Using port scanner apps on the phone, sending an email or SMS doesn't always wake up gcm as there is first your typical https 443 connection.

So I've not yet found a solid method to fix this.

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: heads up -- GCM bug on Android 5.0.2 devices (affects Vera Alerts)
« Reply #14 on: September 29, 2015, 10:04:01 pm »
Actually, the last method in my opinion would try to have Vera alerts or autovera to run as a service in the pull down. That's the last idea I thought of.