StephenBlackWasAlreadyTaken / xDrip-Experimental

Experimental Branches for Collaboration on DexDrip
GNU General Public License v3.0
25 stars 62 forks source link

Help please - Bluetooth issue on android 6 #312

Open bostongreekgeek opened 8 years ago

bostongreekgeek commented 8 years ago

@StephenBlackWasAlreadyTaken , @mgranberry , @supersam654, @AdrianLxM , @tzachi-dar , @timbutler

I am sorry to tag all of you and I dont know if this is the right place to post this, but I am using this latest beta and after lots of search and posts I have found that you need to enable permissions in the xdrip app for location in order for it to find the Dexcom G4. It will find it and pair and then it shows no data and if you check the status, it says device remembered but status disconnected. I read from posts that beta 3 has worked for some, but on beta 3 the location permissions do not even show up.

This is for my fiance which was using xdrip on the oneplus 1 with lollipop (android 5) and now I got her the Nextbit Robin with android 6 (marshmallow). Before I even had the azure website working with a mongo db and even ifttt support and notifications on her pebble. Now we have nothing.

I have posted on the facebook group for cgm in the cloud, on xda and even the nextbit community forum and no one has been able to help. Ive searched for hour, emailed some people who posted here on github. Still at a dead end with nothing to try.

Sorry again, but I dont know where else to post and whom to ask.

tzachi-dar commented 8 years ago

I believe that you should enable location for the app (or something like this).

You can also ask here: https://gitter.im/nightscout/dexdrip

On Thu, Mar 31, 2016 at 3:11 PM, bostongreekgeek notifications@github.com wrote:

@StephenBlackWasAlreadyTaken https://github.com/StephenBlackWasAlreadyTaken , @mgranberry https://github.com/mgranberry , @supersam654 https://github.com/supersam654 , @skjelland https://github.com/skjelland , @bhandfast https://github.com/bhandfast

I am sorry to tag all of you and I dont know if this is the right place to post this, but I am using this latest beta and after lots of search and posts I have found that you need to enable permissions in the xdrip app for location in order for it to find the Dexcom G4. It will find it and pair and then it shows no data and if you check the status, it says device remembered but status disconnected. I read from posts that beta 3 has worked for some, but on beta 3 the location permissions do not even show up.

This is for my fiance which was using xdrip on the oneplus 1 with lollipop (android 5) and now I got her the Nextbit Robin with android 6 (marshmallow). Before I even had the azure website working with a mongo db and even ifttt support and notifications on her pebble. Now we have nothing.

I have posted on the facebook group for cgm in the cloud, on xda and even the nextbit community forum and no one has been able to help. Ive searched for hour, emailed some people who posted here on github. Still at a dead end with nothing to try.

Sorry again, but I dont know where else to post and whom to ask.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/312

bostongreekgeek commented 8 years ago

@tzachi-dar thank you for your reply. That step was indeed needed in order for the xdrip app to even see the dexcom when scanning for bluetooth. Before the app could not even see it. After I found that answer, I thought my problems were solved, as it saw the dexcom and paired, however, no data was being transmitted and when checking the status, it would show the dexcom as disconnected, From further research, I was led to believe that beta 3 may work better in my case, however, beta 3 does not even show location settings in the permissions. So my issue is after that step. But having another place to ask this question is very useful. Someone who knows the answer may see it there.

Update: It seems that place is more of a chat so I cant ask while at work as I will have to read the immediate response. I will check it out later, perhaps Friday after work. Thanks again.

supersam654 commented 8 years ago

First off, you've clearly done a lot of research if you knew to tag me here (seeing as my single contribution to xDrip was Bluetooth support on Marshmallow).

I would take a look at https://github.com/StephenBlackWasAlreadyTaken/xDrip/wiki/xDrip-Beta and download the latest version (Beta 5). Looking through the changelog, that looks like Android 6 support was (officially) added in Beta 5. Also check out the note at the bottom of the release ("A note regarding Marshmallow (Android 6)...") and make sure you've done that already.

bostongreekgeek commented 8 years ago

@supersam654 thank you for a prompt response. I have done the part of the note which was needed because before it wouldnt even see the dexcom when scanning in bluetooth. The issue I cant solve is the fact that it disconnects right after it pairs, meaning the app never receives any data. I just noticed that there are two versions of beta 5. Perhaps the other one may work. Ill have to try that.

aaroecker commented 8 years ago

I'd like to echo @bostongreekgeek comments, @supersam654 . Beta 2.0.5.2 simply drops the bluetooth connection randomly for me on Android 6 and never reestablishing the connection within bluetooth range. Beta 2.0.3 does not do this, but if I leave bluetooth range the connection is never reestablished when I come back within range. Many folks here and on the cgm in the cloud facebook group have brought this issue up and I'm a bit surprised that nobody has an come up with a resolution yet. I'd gladly help in any way I can, but I am not a developer.

tzachi-dar commented 8 years ago

@aaroecker Have you been working on beta 2.0.3 with exactly the same phone and it was working for you? If so, I can try and see what has changed and see if there is something that we can do.

bostongreekgeek commented 8 years ago

For me the issue was fixed when the Robin received its March OTA update close to the end of the month.

I had tried everything from various posts I had read, enabling permissions, different betas, clearing cache, etc, but nothing would work. It turned out the OTA update that was addressing certian apps that would FC (they were focusing on Uber app and It also fixed guidebook fc and some others apparently) somehow fixed the issue xdrip was having. It wasnt something they were looking into, it just worked after update.

They are releasing another OTA for April and im really hoping this one doesnt break the functionality. I am not closing this since @aaroecker has added his issue in it.

aaroecker commented 8 years ago

Thank you @tzachi-dar ! It does work using 2.0.3 until I leave bluetooth range. At that point the bluetooth connection will never reconnect. This happens even though the phone says that it is connected under the status screen in xdrip, but on the dex the bluetooth icon is not present. I can force it to reconnect by a reboot, force close the app or sometimes by restarting the collector on the status screen. I get status bug 133 as an error in the logs and sometimes an error stating my phone is trying to talk to an unencrypted devices or something along those lines and that the connection needs to be reestablished.

On 2.0.5.2 it random disconnects within bluetooth range for no reason at all. I've tried to find triggers, but it is very random when it happens.

With both versions of the app I have all permissions enabled and the app is not optimized for Doze. Sometimes, but not always in order to get the dex to initial connect to my phone I have to connect to it under the Android bluetooth settings first. If I do not do this the bluetooth icon continues to blink on the dex.

Thank you again for your help, what do you need me to do?

tzachi-dar commented 8 years ago

@aaroecker What phone are you using?

aaroecker commented 8 years ago

Moto X Pure, http://www.motorola.com/us/products/moto-x-pure-edition

aaroecker commented 8 years ago

These are the errors I get: https://goo.gl/photos/3nowYsu17UR9FayR6

aaroecker commented 8 years ago

I should mention in the photo above it was a fresh install of version 2.0.3 that was done this morning.

tzachi-dar commented 8 years ago

Based on what @bostongreekgeek said it looks like an android issue. can you both send the exact version of the phones that you are using?

I'll try to look at the logs and see what I'll find.

aaroecker commented 8 years ago

https://goo.gl/photos/8NZqgmoVGojre7JH8

bostongreekgeek commented 8 years ago

https://goo.gl/photos/H8HggBtPSMQZEHud8

tzachi-dar commented 8 years ago

Well as for the error 133, it seems from http://stackoverflow.com/questions/25330938/android-bluetoothgatt-status-133-register-callback that one should call both .disconnect(), and close().

It seems that we don't call any of them. Need to look at it some more, but we might have a direction.

aaroecker commented 8 years ago

Thanks for looking into this @tzachi-dar it's greatly appreciated!

tzachi-dar commented 8 years ago

I can try and make a version that calls disconnect and close and see if that will help.

aaroecker commented 8 years ago

Thank you @tzachi-dar I look forward to giving it a try!

tzachi-dar commented 8 years ago

app-xdrip-release I have added the apk file that should be used. please rename the png file as apk, and try that. I hope this will make things better.

aaroecker commented 8 years ago

@tzachi-dar when I click on your provided link I'm taken to a blank webpage. Am I missing something? screen shot 2016-04-24 at 4 59 20 pm

tzachi-dar commented 8 years ago

You should do a right click on the link and choose "save link as" (or something similar).

aaroecker commented 8 years ago

Thank you! I'm using it now and will report back as to how it works out.

tzachi-dar commented 8 years ago

Crossing my fingers, but very likely will also need something else...

aaroecker commented 8 years ago

No go. It disconnected about 10 minutes after setting everything up. Status bug 133 shows in the error logs.

tzachi-dar commented 8 years ago

OK, will try to look further.

aaroecker commented 8 years ago

@tzachi-dar can you recommend a phone where this issue is not present. I'm to the point now where I simply need to move on; the frustration isn't worth it. Can you confirm the Nexus 6p functions with g4 share and the soon to be released g5 version of xDrip?

tzachi-dar commented 8 years ago

Hi, It is hard for me to recommend since I'm working with android 4.4 and no share. If you want to use a g4 transmitter, you can probably stop using the share and use the normal xDrip or xBridge hw. If you want to move to use the g5 system soon, I suggest that you ask on facebook on "xDrip g5 closed testing group" to find out what works best (https://www.facebook.com/groups/1021594524580709/).

aaroecker commented 8 years ago

Thank you!

joshlrob commented 8 years ago

I am in this same situation with Dexcom Share, G4, and a Sony Xperia Z3. So far, the only solution seems to be to wait for an update to Android. Sony is better than some but not as quick as others when it comes to pushing updates. I would be happy to capture logs or provide any information to support work.

chrisprad commented 8 years ago

For what it's worth, I'm using/working on the G5 alphas with a Dexcom G5 and it still routinely encounters the dreaded 133 GATT_ERROR bug. Cycling the bluetooth connection seems to temporarily remove it, but it's kind of a pain to have your bluetooth cycle every 30 minutes.

yazman697 commented 8 years ago

Any update on the 133 error? We just upgraded my daughter's old Android phone to a DROID Maxx 2 with 6.01. I have the latest experimental running and have granted all the proper permissions. I can get it to connect for about 15 seconds and then it disconnects. Any suggestions or should I return the new phone?

jleasure12 commented 8 years ago

I have been having these same issues with my Samsung note 5 (android 6.0.1). I was using the latest beta version until I got this phone is had the Samsung s6 and it was working fine ( android 5) I was able to get the app working but I had to go back to and older beta version to get my data back.

bigtunacan commented 7 years ago

Same issues on Nexus 6p running Android 7.0. Initially thought it was fixed by enabling location permissions, but immediately drops connection. I had it working on a Moto X previously, but that device had a problem where it would overheat and crash when using Bluetooth.

ccm779799 commented 7 years ago

Same issues here too. Any solutions to the 133 bug???

chrisprad commented 7 years ago

Besides making sure location is enabled and cycling your BT connection, I'd recommend trying it with the hardware CGM receiver turned off (You don't have to stop your sensor, just temporarily Shutdown). It's frustrating, but in my experience the phone and the CGM receiver will endlessly conflict with one another giving meh performance on both devices.

ccm779799 commented 7 years ago

I have made sure the location is enabled and cycling the connection. I can get it to work for about 8-9 minutes and bluetooth stops on the receiver. I have tried shutting down the received but I still can't get it to start back up and stay running. I am using a G4 Share so I need the receiver in order to view BG. So there is no solution for this issue??