xDrip icon indicating copy to clipboard operation
xDrip copied to clipboard

Bluetooth reconnect issue

Open porkupan opened this issue 9 years ago • 40 comments

Phone: Nexus 5; Android 6.0.1

Sorry if this has been discussed earlier. The xDrip sometimes (rarely) loses connection with the receiver, and cannot reconnect for hours. It appears that the phone is actually connected to the receiver, but the xDrip App reports "Not Connected". I tried rebooting the receiver, turning BT off and on, hitting the "Refresh" button on System Status screen a bunch of times - doesn't seem to help.

Killing and restarting xDrip App appears to recover the connectivity.

The problem seems to occur when the phone and the receiver are located somewhere within BT range, but not really close. For instance, when the phone is charging downstairs, and the receiver is in the upstairs bedroom. So the connectivity may be somewhat marginal. However, once in this state, the connection doesn't recover even in the close proximity. I am not sure this problem can be readily reproduced, as it happens to us about once a week or so.

porkupan avatar Feb 20 '16 15:02 porkupan

I have experienced this too; I'm on the Moto X Pure. I've been able to regain the connection by rebooting the phone.

aaroecker avatar Feb 20 '16 18:02 aaroecker

Hello to all. After couple of weeks using xDrip I discovered very often missing packets from G4 sensor. Up to 0,5h no receiving pockets. BT connection between phone and xDrip wixel works fine. DEXCOM receiver is running without problems during this time. Distance from G4 sensor to xDrip wixel is very short (0,3m.) Do anybody have any experience (suggestions) in that matter?

michalkominek avatar Feb 23 '16 16:02 michalkominek

I believe that this is the issue, or is at least related to the one, that I recently closed; issue number 138. I thought it was resolved, but it is not. The bug seems to be triggered if one of two things happen. One, if I leave my Dex and phone next two each other, but I walk too far out of range with the sensor. When I come back into range the sensor reconnects with the Dex, but the new bg data is never uploaded to xDrip. Clicking on "restart collector" from the system status screen resolves this, but usually the bug comes back even if I do not leave the sensor to Dex range. Second, it's triggered if I walk out of bluetooth range of my phone and Dex. The bluetooth connection will reestablish when I come back into range, but again the bg data will not be collected. The only sure fire way to resolve this is to reboot the phone and to keep all devices within range.

I'm currently using the lastest beta of xDrip and have the G4 with share connected to my Moto X Pure.

aaroecker avatar Feb 23 '16 17:02 aaroecker

Thx for answer. I also suspect some „range” issues. That’s why I never go out of range (either sensor or BT). xDrip and Phone always near the body.

missing packets

michalkominek avatar Feb 24 '16 07:02 michalkominek

Where is the receiver in proximity to your phone? I have noticied that I need to keep other bluetooth things away from the receiver or else it will drop signals....this has happend with my phone and PS4 controller being too close....

On Wed, Feb 24, 2016 at 2:00 AM, michalkominek [email protected] wrote:

Thx for answer. I also suspect some „range” issues. That’s why I never go out of range (either sensor or BT). xDrip and Phone always near the body.

[image: missing packets] https://cloud.githubusercontent.com/assets/15686077/13279008/dc1e4a60-dad4-11e5-89d4-0924c66717fa.jpg

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip/issues/137#issuecomment-188131622 .

msinkovich avatar Feb 24 '16 16:02 msinkovich

I think we are confusing the fix with a workaround. Yes, it's pretty clear that if the Dex and the Phone never leave each other's sight, then the issue doesn't occur. For whatever reason, this suggestion doesn't always work, especially with the kids.

The problem is that when the phone or the Dex is removed from close proximity of the other (BT link disconnects), the App sometimes gets stuck, and never reconnects. The phone reports that the Dex is connected, but the XDrip doesn't see it, and cannot talk to it. This doesn't happen every time or most of the time, which leads me to believe that maybe the disconnect has to occur at the moment when the data is actively being transferred from the Dex to the Phone. Hopefully there is a timeout and retry logic of some sort. Terminating and restarting the App fixes the issue.

Also, please don't confuse randomly missing sensor readings with this issue. The G4 transmitter transmits a sensor reading once every 5 minutes no matter what. If your receiver missed one, it will receive another one in 5 minutes. The receiver sometimes gets confused about the signal quality or "noise", and stops displaying the BG for a while, but that's where we can take advantage of RAW. However, none of this has anything to do with the BT reconnect issue I described.

porkupan avatar Feb 24 '16 17:02 porkupan

I I agree with both of you. 5-years old kid using mentioned xDrip. He has a pocket on the belly with equipment so it is not possible to go out of range. Also I don’t think it is a problem with distance because it works very reliable few weeks ago. Transmitter battery =217 so it’s also OK. I suspect some hardware issues with Wixel.

michalkominek avatar Feb 26 '16 08:02 michalkominek

Any update on this?

aaroecker avatar Mar 03 '16 15:03 aaroecker

I hate to keep asking, but is there anyone willing to help with this issue? I've had several bluetooth disconnects this week over night for no apparent reason. The phone and Dex sit right next to each other on the night stand. This morning the disconnect occurred just before 5 am; I was still sleeping. I was unable to regain the connection without forgetting my phone on my Dex, doing a clean install of xDrip and then establishing an entirely new connection. This is becoming incredibly frustrating and concerning due to the disconnect occurring at night. Thanks for any insight!

aaroecker avatar Mar 10 '16 14:03 aaroecker

I'll second this. My wife's setup has, in recent days, become very unstable. Dropping several times a day. If there's any useful log info I can submit, tell me what to grab and I'll gladly supply it to help debug this. I can also help with testing of proposed fixes, etc.

Choens avatar Mar 20 '16 13:03 Choens

Resetting everything (phone, receiver) seems to have helped, it only lost the connection twice in the last 24 hours. Still, less stable than it was.

Choens avatar Mar 23 '16 00:03 Choens

I've reset my connection so many times now I've lost count. The bug eventually comes back for whatever reason. I had a good run a few days ago; the Dex reconnected as it should and data was uploaded to xDrip, but it was short lived. Under the Errors Log I get status bug 133 as the culprit. The problem seems to occur with the Dex itself. The phone under System Status states that the phone is connected to the Dex, but on the Dex the bluetooth icon is not visible. When the Restart Collector button is pressed the bluetooth icon appears on the Dex and everything works as it should. A simple solution to me seems to be that if no data is collected on the Dex for 6 minutes the collector should automatically restarted. The root of the problem is why the Dex doesn't reconnect even though the phone thinks that it has. Thoughts, @StephenBlackWasAlreadyTaken ?

aaroecker avatar Mar 23 '16 20:03 aaroecker

I believe I'm having the same connection issues. connection will be good for 20-60 minutes and then lost. the only fix i found is to forgot BT connection on both devices and re-connect.

everything was working fine for weeks on my Droid Turbo 2. This started happening after my Droid Turbo 2 upgrade to android 6.0

@StephenBlackWasAlreadyTaken thoughts?

abherrma avatar Mar 29 '16 19:03 abherrma

Me too. Commenting so I can see updates.

After all my turning-it-off-turning-it-on attempts (several, over an hour, in the middle of the night) I left it turned off until the morning then tried again. It connected without problem. I spent a number of hours without any CGM data!

LJ1966 avatar Mar 31 '16 12:03 LJ1966

No 100% clear solution. I have rebuild xDrip with new LiPo charger and it helps. I suspect some sporadic voltage drops. Also I need to restart my Melrose S9 smartphone once per week. Now everything looks fine.

michalkominek avatar Mar 31 '16 14:03 michalkominek

I'm already using a LiPo charger in my xBridge. I have a bluetooth dropout every couple of days which is fixed by the off-on workaround. The other night was a major outage and nothing fixed it except time.

LJ1966 avatar Mar 31 '16 15:03 LJ1966

Just got a new phone running Android 6.0 (LG G4) and I'm losing connection every 10-20 minutes. Have to reset connection on phone and Dex to get it back. On old phone running 5.0 (also a G4), I very rarely got connection issues but could resolve simply by force stopping xDrip.

brekfest avatar Apr 07 '16 13:04 brekfest

I'm seeing Bluetooth disconnect issues as well. I just started using XDrip (awesome-looking tool), but am struggling with disconnects on the devices I've tried. Moto G 2014 with Android 6.0 will only connect 1/10 times and then disconnects (gave app full permissions). Moto G 2013 with Android 5.0 connects easily, but didn't leave it connected long enough to see if it was reliable. Nexus 7 with Android 5.0 connects easily, but disconnects about every 30 minutes on average.

I'm happy to pull logs or troubleshoot.

mountainsibray avatar Apr 16 '16 04:04 mountainsibray

I too started having Bluetooth issues after upgrading to Android 6.0.1. I tried forgetting the connection on the Dexcom share and xDrip and then repairing but the Dexcom never seems to think it is connected. Sometimes, immediately after pairing, the connection status does change to connected but no data is reported to xDrip. The Dexcom Bluetooth icon only shows during the pairing cycle and then shuts down. It is visible and broadcasting during that time. Bluetooth does work on many other devices with this phone so I believe the problem is between Dexcom and xDrip. Please let me know if I can help in any way.

joshlrob avatar Apr 21 '16 22:04 joshlrob

I see the same issue with the current Beta release 2.0.5_2 with Andriod 6.01 on LG G Vista 2 with a Dexcom Share 2 Pediatric device. ( we just had to replace our receiver, previous receiver worked fine with phone and Xdrip) I enabled Settings -> Apps -> xDrip -> Permissions and enabling Location. I have reconnected the device a number of times; double checked the ten character Dexcom Receiver serial number

The new receiver is the same model number MT22608 same rev number LBL-0107785 rev05, just manufacutred 4 months latter 2015-08-06, vs 2015-04-17

Looking at the Error list, it is hitting DexShareCollectionService: Got the status 133 bug, bad news..... already forgot the device twice and still running into the issue.

gstoner avatar May 28 '16 18:05 gstoner

Dexcom Receiver Software is S10542 Rev 3.0.1.030, I went back to try Version 2.01 and 2.02 of Xdrip

Now I am seeing in the Error list ERRR GATT_READ_NOT_PERMITED2 ERRR GATT_READ_INVAILD_ATRIBUTE_LENGTH0 ERRR GATT_FAILURE 0 ERRR GATT_INVALID_OFFSET 2 ERRR GATT_INSUFFICENT_ENCRYPTION2 ERRR GATT_REQUEST_NOT_SUPPORTED 2 ......

gstoner avatar May 28 '16 18:05 gstoner

You also have error BgToSpeech teardownTTS()called but instance is null with Beta release 2.0.5_2 that going on, THe bluetooth discovery is working properly in eariler release, 2.05_2 is having hard time discovering the Dexcomm as bluetooth device. I am going to try an older device Samsung GIII

gstoner avatar May 28 '16 18:05 gstoner

Double check to see if the receiver can connect to Share2 app on iPHONE, everything works. There is discovery and pairing issue with the current application.

gstoner avatar May 28 '16 21:05 gstoner

I did find the phone can pair the Dexcom receiver when I use the Andriod Setting Menu--> Network-> Bluetooth Connections Available and select DEXCOMRX. Resetting to factory setting to see if can get this to work again.

gstoner avatar May 28 '16 21:05 gstoner

After factory reset, Looking at the Error list, it is hitting DexShareCollectionService: 133 bug, bad news.....

gstoner avatar May 29 '16 00:05 gstoner

Same issue here, and quite frustrating. I've documented my experiences in issue #138, and here's the summary:

  • xDrip current beta version on Droid Turbo. Dexcom G4 with Share.
  • Collector stops every few hours and no data is gathered until I manually re-enter the System Status menu and re-start it.
  • Proximity is not the issue. My G4 is within two feet of the Android device during the entire time.
  • Shutting off wifi and/or other bluetooth activities is not a useful workaround, so I haven't bothered trying it.
  • I've tried several proposed fixes (see Issue #138 ) without success
  • The Dexcomdevice continues to perform beautifully with or without xDrip pairing.

I was insanely happy to have Dexcom data on my phone, where I would see it far more often than on my Dexcom device. But after this bug appeared, it's no longer fun.

I have seen 133 bug listed in the error log, but i have no idea what it means ... let alone what do to about it.

kth100077 avatar May 29 '16 17:05 kth100077

Adding in my own data here, some of which I think is semi-unique:

  1. I completely wiped xdrip data from my phone hoping a complete restart would help (saving an archive, though crying over the upcoming loss in 90 day A1C predictions). Unfortunately, the solution didn't work and it lost connection not too many hours alter after the complete reset.

  2. Having given up on manual re-connections (because a few hours on and many off seemed pointless), I left the app to doing its own thing and ignoring it. One thing I'll note in that the connection occasionally comes back for a few hours by itself.

Those are the only new things I have to offer, as everything else mirrors what people have said above: It was fantastic when it worked and I was in love. It doesn't seem distance dependent. etc.

hardaker avatar May 31 '16 22:05 hardaker

I too seem to have a unique issue but it is bluetooth related so I will add it here for the moment rather than raising a new issue.

Phone: Moto E (2nd Gen) - has worked for over a year Android version: 6.0 Android Security Patch Level: February 1, 2016 xDrip App version: beta/2.0.5_2-7a93a06-experimental-xDrip2-beta-205-2-2016.02.20

I have been having increasing problems with missed readings and have found that restarting the collector seemed to fix these temporarily. Recently when I restarted the collector it did not connect again. I tried a BT scan but not there either so I tried Forget Device and since then I have not been able to reconnect to the xbridge.

Another strange thing happened at the same time. My other phone, which is running an xdrip wifi immediately kept grabbing the xdrip BT connection. Even when in wifi mode and not linked by bluetooth, I can see the BT light on the xdrip come on and off as I toggle bluetooth on that phone. It is not connected via the android bluetooth devices and is only remembered as an xdrip device. There do not appear to be any other apps trying to connect to it. However, even when this phone is switched off, my original phone still refuses to connect as it still cannot see it from within the xdrip app.

However, I can see the xdrip under the android bluetooth connections but it will not connect as it prompts for a PIN. Sometimes I get less error messages if I use 000000 but it still does not connect. However, if I go into the xdrip app and do a BT scan it still will not find it and so will not connect to it.

The xdrip is actually working fine because if I switch my other phone (a HTC One) from WiFi wixel to xbridge wixel then it appears straight away there and can pick up BG readings. This phone can also connect in the android bluetooth screen but unlike the Moto it does not prompt for a PIN. I am using a slightly different version of the xdrip app on the HTC (1af3b7e-experimental-xDrip2-beta-205-2-2016.01.12) but I don't think that is the problem as the other version has worked fine on the Moto for ages.

So going back to the original Moto phone, when I switch the xdrip into Wifi wixel mode it works fine so it seems to be purely a bluetooth issue. However, bluetooth still works on the phone for other things (such as file transfers). I also tried just powering up another BLE module with a couple of AA batteries and this cannot be found within the xDrip app either so it does not appear to be a specific problem associated with it remembering/forgetting my xDrip (although both BLEs have the same name).

I've looked in the error log but nothing to see there after an unsuccessful bluetooth scan.

I have also tried loading other xdrip versions but I just get an error saying the app failed to install. It is really frustrating. I am loathe to wipe the phone and rebuild again as from comments above this never seems to fix anything. I also do not want to lose all my history by uninstalling as it would screw up the historical stats etc.

If anyone has any other suggestions they would be really welcome! If all else fails I will go for a wipe and reinstall but I think I will be just more depressed when that doesn't fix anything...

Cagier avatar Jun 09 '16 22:06 Cagier

OK, as no suggestions to above, I have done a factory reset and installed a different version of the xDrip. Still cannot see it in a bluetooth scan within the xDrip app, although my other phone can. I can't help feeling that this is an android-related issue but as I said I can see it in a bluetooth scan under the android bluetooth settings so it is only the xDrip app that cannot see it. The xDrip app still works with wifi devices so using for that at the moment but will have to try buying a new phone to overcome this software issue unless anyone has a better idea?

Cagier avatar Jun 12 '16 22:06 Cagier

If your phone is running Android 6 you need give location permission to xdrip. Other can't see it drom bluetooth. Worked for me

nztianmi avatar Jun 12 '16 23:06 nztianmi