NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.4k stars 1.14k forks source link

Android 10+ asks every 5 minutes for pairing with Dexcom transmitter #1494

Closed vitalykekukh closed 3 years ago

vitalykekukh commented 3 years ago

After updating in October 2020 from android to samsung a50 every 5 minutes xdrip 2020 asks for dexcom Bluetooth connections. The xdrip app released in 2019 works fine. How to remove the request to connect dexcom via bluetooth on a50 smartphone?

vitalykekukh commented 3 years ago

After upgrade to oct 2020 android samsung a50 every 5 minutes xdrip 2020 asks for dexcom bluetooth connection when syncing. If you do not agree with the request to connect the dexcom bluetooth sensor, xdrip sync does not work. The xdrip app released in 2019 works fine. Synchronization of the smartphone and dexcom takes place without a request. How to remove the request to connect dexcom via bluetooth on the a50 smartphone on xdrip later edition of xdrip?

BKrueckeberg commented 3 years ago

I am experiencing what I believe may be the same issue. xDrip making a bluetooth pairing request for the Dexcom transmitter every couple of minutes. It is extremely annoying and frustrating.

This is on a Samsung Galaxy S10 and started happening with the last phone update yesterday.

Galaxy S10 (SM-G973U1) Build Number : G973U1UES4ETJ3 Android version : Q(Android 10) Release Date : 2020-11-02 Security patch level : 2020-11-01

2020.07.13 e14bae1

Have not been able to work around this :(

20201103_221738

tolot27 commented 3 years ago

@BKrueckeberg Can you confirm that the nightly from May 18, 2019 works for you?

@vitalykekukh Please help us by finding the latest version which works for you.

vitalykekukh commented 3 years ago

now this version works well

https://github.com/NightscoutFoundation/xDrip/releases/tag/2019.05.18

tolot27 commented 3 years ago

@vitalykekukh Now, I'm confused. What is the difference between the latest comments with respect to the release tag? Please can you remove redundant comments and just edit a (potentially) wrong comment?

tolot27 commented 3 years ago

@vitalykekukh I cannot believe that 2019.05.18 is the latest version which works because there are only Libre-related changes in 2019.05.19, for instance. It would be really helpful to find the latest tagged version which works for you. Please can you try newer versions of every month after May, 2019 until you found a breaking version and than go stepwise back the tags?

avidprogrammerc commented 3 years ago

I am having the same issue on my Pixel 5. I tried the May 19 version but the same thing happened

BKrueckeberg commented 3 years ago

I tried the 2019.05.18 build on my Samsung Galaxy S10.

I am NOT experiencing the ongoing Bluetooth pairing requests anymore BUT am also loosing transmitter connection after only a handful of successfully received signals. I am seeing 'Aggressively restarting collector service due to lack of reception backoff' being logged every couple of minutes.

Bottom line is that the 2019.05.18 doesn't work. Please let me know how I can support you in figuring out a solution!

Thanks

vitalykekukh commented 3 years ago

The difference between the old and new versions of Android is the enhanced Bluetooth security system. The developers claim that hackers can steal data from a smartphone via Bluetooth. So in the new version of Android, they have enabled an additional pairing request. The 2019 version of xdrip is permanently paired via Bluetooth. To save battery power, the 2020 versions connect via Bluetooth every 5 minutes and then disconnect. Therefore, when paired, Android recognizes the pairing as connecting a new device and issues a request to the smartphone user. In this situation, either the xdrip developers in the new versions will make permanent pairing via Bluetooth, or the Android developers will make it possible to make a one-time request to pair with a known (allowed) device.

BKrueckeberg commented 3 years ago

Thanks for the explanation @vitalykekukh. That would make sense based on what I am experiencing with my phone.

Do you happen to know with what version this power save feature was added exactly? I have tried the 2019.05.18 version but this hasn't worked well for me either (due to other issues).

vitalykekukh commented 3 years ago

If it is not possible to install an earlier version of xdrip, then you need to lower the android firmware. The September 2020 firmware should work.

tolot27 commented 3 years ago

It looks like this issue is caused by the fixes of CVE-2020-12856, specifically A-157038281 [3]. For details see Android Security Bulletin—November 2020.

vitalykekukh commented 3 years ago

You need to write a complaint to the android developers, you need to ask them to fix our problem in the next update!

BKrueckeberg commented 3 years ago

Thanks for your comments guys. It sounds this will become a huge issue for many xdrip users tben unfortunately. I will try to contact Google about it but am not confident my (our) concern(s) will be important enough for them to rethink their strategy. Will you also consider to fall back to the continuous Bluetooth connection for future releases of xdrip? Make it optional maybe?

Navid200 commented 3 years ago

If it is not possible to install an earlier version of xdrip, then you need to lower the android firmware. The September 2020 firmware should work.

What earlier version of xDrip will not have this problem?

Navid200 commented 3 years ago

If it is not possible to install an earlier version of xdrip, then you need to lower the android firmware. The September 2020 firmware should work.

What earlier version of xDrip will not have this problem?

You must install the firmware before September 2020.

You say if it is not possible to install an earlier version of xDrip. It is. My question is if it is possible to install an earlier version, which version? Or, are you saying it is not enough to go back in xDrip, we also need to change the firmware?

vitalykekukh commented 3 years ago

Если нет возможности установить более раннюю версию xdrip, то нужно понизить прошивку андроида. Прошивка от сентября 2020 года должна работать.

В какой более ранней версии xDrip не будет этой проблемы?

Вы должны установить прошивку до сентября 2020 года.

Вы говорите, если невозможно установить более раннюю версию xDrip. Это. У меня вопрос, можно ли установить более раннюю версию, какую версию? Или вы говорите, что недостаточно вернуться в xDrip, нужно еще поменять прошивку?

if this version of xdrip is suitable, then the android firmware does not need to be changed https://github.com/NightscoutFoundation/xDrip/releases/tag/2019.05.18

afreitag33 commented 3 years ago

Update on S10 causing same problem here. Will try the older Xdrip version but second the comment above that an option to stay connected would help a lot.

avidprogrammerc commented 3 years ago

If you are using the new g6 transmitter an old xdrip version won't work afaik. I've gone back to the dexcom app for now but can still use xdrip with dexshare

Navid200 commented 3 years ago

The first person, on facebook, has confirmed that 2019.05.18 has resolved the issue. Of course, he is using G5.

Edit: But, he has connectivity issues with that version.

gfginter commented 3 years ago

I am on a galaxy s10+. I updated today to latest samsung release and now I am receiving this prompt every 5 minutes. Tried other fixes here and reverting to old version of xdrip does not work. I am on a g6.

davide1985 commented 3 years ago

I am on a galaxy s10+. I updated today to latest samsung release and now I am receiving this prompt every 5 minutes. Tried other fixes here and reverting to old version of xdrip does not work. I am on a g6.

Also I have updated my s10 + and I am using the g6 and I am having the same problem. I had to install the dexcom application for now

martinachtman commented 3 years ago

Same here Samsung S10e SEPF_SM970F_10_0024 with G6(reciver 8K) and Xdrip 2020.10.01/a91b660. I'll downgrad/factory reset my phone.

fatalkrutorking commented 3 years ago

I tried the 2019.05.18 build on my Samsung Galaxy S10.

I am NOT experiencing the ongoing Bluetooth pairing requests anymore BUT am also loosing transmitter connection after only a handful of successfully received signals. I am seeing 'Aggressively restarting collector service due to lack of reception backoff' being logged every couple of minutes.

Bottom line is that the 2019.05.18 doesn't work. Please let me know how I can support you in figuring out a solution!

Thanks

Hello, I am experiencing same issue. With the downgrade the BT connection is stable (i guess). But after couple of cycles i loose signal in xDrip. I tried to fix this issue yesterday late in the evening. I was so tired i went to sleep. Today at the morning my transmitter is very low on battery (maybe even dead). I feel it has something to do with this.

vitalykekukh commented 3 years ago

То же самое и с Samsung S10e SEPF_SM970F_10_0024 с G6 (ресивер 8K) и Xdrip 2020.10.01 / a91b660. Я верну свой телефон обратно к заводским настройкам.

Restoring factory settings will not help, the kernel version will remain from October 2020. You need to make an earlier version of Android firmware (kernel).

fatalkrutorking commented 3 years ago

Not sure if this information is helpful but my insulin pump Dana RS is not expreriencing no issue. I am using AAPS to control the pump on my phone. Right now my do not use closed loop since this issue exist.

JanFellner commented 3 years ago

Experiencing the same issue with an updated Samsung Galaxy S10 since yesterday. Sadly the dexcom is the only BLE device i have so i cannot tell if this is a kernel / android issue or xdrip handling issue.

G970FXXU9DTJA G970FXXU9DTJB says the last update page Savety patch level 1.Nov.2020

@martinachtman can you point me on where did you find an older image of the os for this phone? (or how did you actualy downgrade)

It drives me nuts. It feels like locomotive driver having to push the food pedal every 30 seconds...

martinachtman commented 3 years ago

@martinachtman can you point me on where did you find an older image of the os for this phone? (or how did you actualy downgrade)

check https://www.sammobile.com/samsung/galaxy-s10e/firmware/#SM-G970F and https://www.androidinfotech.com/return-back-security-patch-os/#Samsung_Galaxy_Devices

jredders commented 3 years ago

I also see this on my Pixel 3a after the November security update. However, it will go away if I react to the notification quick enough after it pops up. Usually takes 1-2 tries. After that, it works until the phone and G6 lose connection, then repeat...

Navid200 commented 3 years ago

I also see this on my Pixel 3a after the November security update. However, it will go away if I react to the notification quick enough after it pops up. Usually takes 1-2 tries. After that, it works until the phone and G6 lose connection, then repeat...

Is there no option on the notification that would let you automate the response for the following identical notifications?

jredders commented 3 years ago

Is there no option on the notification that would let you automate the response for the following identical notifications?

Nope

tolot27 commented 3 years ago

If you are using the new g6 transmitter an old xdrip version won't work afaik. I've gone back to the dexcom app for now but can still use xdrip with dexshare

@chrisc93 Can you confirm that no pairing request dialog appears with the Dexcom app?

gfginter commented 3 years ago

I received the pairing request once with the Dexcom app and then never again. My connection is stable. I have moved my data source to Dex Sharing.

BKrueckeberg commented 3 years ago

I also went back to using the Dexcom app :(. It is working fine... not seeing any excessive Bluetooth pairing requests.

avidprogrammerc commented 3 years ago

@tolot27 as others have reported there was an initial pairing request but none since.

tolot27 commented 3 years ago

Please can someone send me some logs of the event? The best would be to have the top 500 records of the UserErrors table from the SQLite DB.

Before, please enable verbose logging in settings > less common settings > extra tags for logging and then add there: BluetoothScan:v,DexCollectionService:v,Ob1G5CollectionService:v,Ob1G5StateMachine:v,G5CollectionService:v and post relevant lines here or attach SQLite DB entries.

lanceblaise commented 3 years ago

Android is not going to change this new working of bluetooth. It's up to the app developers to adjust their apps accordingly. No issues with any others apps using bluetooth, including the Dexcom app. So, make xDrip function like the Dexcom app.

maberlin commented 3 years ago

Please can someone send me some logs of the event? The best would be to have the top 500 records of the UserErrors table from the SQLite DB.

Before, please enable verbose logging in settings > less common settings > extra tags for logging and then add there: BluetoothScan:v,DexCollectionService:v,Ob1G5CollectionService:v,Ob1G5StateMachine:v,G5CollectionService:v and post relevant lines here or attach SQLite DB entries.

Hi,

I am also experiencing this problem (Galaxy S9+, also appeared first when doing the Android November update; xDrip latest nightly).

Here you can find my logs - on 9:44, I confirmed the bonding request - on 9:49 I declined.

Thank you very much in advance!

https://user-images.githubusercontent.com/32902785/98437108-11e64980-20e0-11eb-8869-aa0e8e8d0e05.jpg

vytux-com commented 3 years ago

Android is not going to change this new working of bluetooth. It's up to the app developers to adjust their apps accordingly. No issues with any others apps using bluetooth, including the Dexcom app. So, make xDrip function like the Dexcom app.

I would be so sure about all other apps working... I know I was getting repeated pairing requests on my tizen watch too. So much so I actually reverted back to the October security patch

vitalykekukh commented 3 years ago

It is necessary to write complaints about the android update regarding Bluetooth pairing requests. If complaints are massive, then they will be forced to make changes to the android.

tolot27 commented 3 years ago

@maberlin Please can you enable "Minimize Scanning" in the "G5/G6 Debug Settings"? This probably avoids unbonding.

maberlin commented 3 years ago

@maberlin Please can you enable "Minimize Scanning" in the "G5/G6 Debug Settings"? This probably avoids unbonding.

@tolot27 Thanks for your answer. I tried enabling "Minimize Scanning" as well as disabling "Allow OB1 unbonding" and "Allow OB1 initiate bonding", but none of these options resolved the problem. :/

tolot27 commented 3 years ago

@maberlin Please can you send me a new log? Your previous log contains minimize: false.

maberlin commented 3 years ago

@tolot27 Yes, sure: https://user-images.githubusercontent.com/32902785/98445793-e84a1400-2119-11eb-82a1-24ce84583eac.jpg

JonathanM32 commented 3 years ago

Minimize scanning is working somewhat on Pixel 4XL, latest software

detellis commented 3 years ago

I have a Samsung Note 20 Ultra and this morning the device received the November security patch. I started seeing the 'Bluetooth Pairing Request' pop-up after that. Tried fiddling with the pairing and related Bluetooth settings but couldn't get it to read data without first manually accepting the pairing request.

As a fallback I have enabled Dexcom Share in the official app and have set Xdrip to use Dexcom Share Follower as data source. Please note the setting under Cloud Upload -> Dexcom Share Server Upload -> Dexcom USA based account. I had to disable this setting as I am in the UK and would see an SSO login error otherwise.

bsw-del commented 3 years ago

Hey there,I'm very new to xDrip and have been loving it so far. I just got a pixel 5 and all was good until the stupid November update. At first I was getting the bluetooth pair request every 5 minutes, I resolved by re-installing latest nightly (Oct.). Now I have to re-pair each time I lose connection. ( a few times a day). Am interested in helping anyway I can, so if you need me to capture logs, or go and log an issue with Google, please let me know. Thanks to the devs who work on this. So impressed, the Dexcom app was pretty lacklustre in comparison.

JonathanM32 commented 3 years ago

Is there any idea what can be done to fix this issue? xDrip is essentially unusable at the moment

fatalkrutorking commented 3 years ago

Is there any idea what can be done to fix this issue? xDrip is essentially unusable at the moment

I am facing same issue. Was tring to solve it (reinstalling older version of xDrip), but that did not helped me. My last hope is to downgrade Android update which start causing this issue. I do not have functional transmitter at the moment, so I can not do this. Hope someone find the way to fix it.

bsw-del commented 3 years ago

I moved back to the Dexcom app and it has only asked me to pair once (after installation). Running November security patch. Will report back if any issues arise. Would prefer xdrip of course. 😀