-
-
Notifications
You must be signed in to change notification settings - Fork 943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth connection still dropping out #707
Comments
I am having a similar issue. For me, it drops connection all the time, but that at least seems to be due to Sailfish power-management, since it doesn't happen when the screen remains on (and no, setting the suspend policy didn't help). However, after a day of constant connection dropping and reconnects, the watch stopped accepting connections. Every time I tried to connect from the phone side, it would briefly show connection and then give an error that the passcode was incorrect. The only way to fix it was rebooting the watch. |
It is looking like the heart rate monitor is causing Bluetooth issues, are either of you using the HRM, or not? |
I started the hrm at the same time I got the connection issue |
I didn't notice the link at the time, but I do remember at some point in the evening turning it on for a little bit and then switching it off. Later I did experience the connectivity issues. I can't be sure of the exact time, but it sounds plausible that it's the culprit. |
I notice exactly the same. Without HRM, the watch can stay connected for whole days (with occasional re-connects). As soon as HRM is turned on, the Bluetooth connection dies in a matter of an hour if not less. Only resetting the watch helps then. InfiniTime 1.6.0, Sailfish OS 4.2 on Sony Xperia 10 |
I'm having same issue on Android 10 of XiaoMi 9 without using HRM. The first 12 hours or so worked fine, then Bluetooth was dead and no longer discoverable. |
Up-to-date InfiniTime? |
My bad, version was 1.4. I did update it but turned out that I forgot to validate it or I probably pressed reset :( Should I delete my previous comment? It looks silly. |
No, keep it, someone else might make the same discovery. |
I've had the same issue happen twice now (connection working fine for over a day and suddenly watch is undiscoverable until watch reset) |
Same issue here. Thought it was caused by the infini-IOS 0.9.1 update, but nRFConnect also failed to connect to the watch. For me it also happend after having used the HRM. Before using the HRM, the watch could connect to bluetooth for multiple days without needing to be reset. |
Also, the HRM is somehow able to read a heart rate without being on my wrist at all... When laying on my table, it reads random values all over the place... |
I think you might want to make a separate issue for this, since it could be unrelated to the Bluetooth dropping, don't you think? I can confirm now that I did not use the HRM (on purpose anyways), yet the bluetooth connection has dropped within 2 days. Need to do a watch reset to be able to find the watch again under bluetooth devices. |
This still persists in 1.7.0. When I pair the watch with Gadgetbridge, and leave the bluetooth reach, there is no reconnection back when I near, no matter the time I wait for it. I always need to delete the watch and re-pair it again, making pairing almost useless. |
@adocampo Until bond persistence is released the advice has been to not pair, you're given the choice when adding the device to GB. |
Thank you! I'm a first week user of Pinetime and this helps so much! |
I hate to be that guy, but this is still present on 1.8.0, which if I understood correctly what it says on the announcement, shouldn't be happening now. |
So you're getting into a situation where the phone can't see the watch, rebooting the watch does nothing but removing the bond in gadgetbridge and recreating it allows you to reconnect.
|
Well, after a while using it, I'm not quite in the same situation as described, and I must admit BLE reconnection works way better on this version, but not perfect, at least in my scenario, but I'm realizing it is because of GB. Let me explain it.
So, I would say BLE on InfiniTime works as it should, but for some reason, GB is quite unstable on my phone and seems to close by itself now and then, killing my watch functionality... |
Is it possible that your phone has some sort of battery saver which is killing background tasks? edit: I am also android 10/1.8/GB 0.64 but using lineageOS, with a pretty reliable BLE connection. |
The only thing my phone has is it shuts down at deep night (around 2am) and turns on around 6am, the rest of the day it has no restrictions at all. I don't really know why it does that, I don't remember to mess with energy savings at all, but I will take a look into that. |
Are you using secure pairing (PIN) or not? If you're not, rebooting the phone will cause the phone MAC to change and reconnect won't work, you'll have to reconnect manually in GB. I just tested toggling bluetooth with secure pairing and it does reconnect automatically, I had to enable the option in GB to reconnect on BT activation but otherwise it worked as expected, and I think it would also work when rebooting the phone. To enable secure pairing you need to choose 'pair' rather than 'don't pair' when adding the watch in GB, it should ask you for a PIN which will be displayed on the watch. |
Yes, I paired with PIN and it reconnects just nice IF GB app is open, which is not always the case. But as I said, it seems the culprit for closing GB must be my phone |
@adocampo CDM pairing in settings can make it easier for GB to restart when killed by your phone. However if your phone is killing a notification listener accessibility service, then that sounds like OOM and can't trivially be avoided. |
Is your phone running stock android or lineage/aosp etc? Which manufacturer? It sounds to me like GB is being killed in the background, there might be a setting to prevent it. |
It's a POCO X3 Pro with Xiaomi's custom ROM MIUI 12. It has 6GBr RAM and I don't use so many apps: just mail, maps, browser, plex media player and PlexAmp, Youtube, Home Assistant, Telegram, and RocketChat. I have others like Termux, Netlfix, HBO, Prime Video, Disney+ but I use them very sporadically. I have even more than I barely use anytime. So I wouln'd bet for a OOM Kill. I noticed GB doesn't starts automatically, so every night's halt stops GB and it never starts again. I'm going to disable that energy saving option to see if there is something wrong with it and GB. |
MIUI has one of the most aggressive BG service killers, do check what you have in your ultra power saving mode settings and in app's settings under battery optimizations. MIUI also has a separate permission for autostart you can toggle, so check that as well. |
I am on Mi9T with LineageOS and PineTime on InfiniTime 1.8.0 Every morning I cannot reconnect the watch. The only ways are to reboot the watch or even to completely delete it from Gadgetbridge and re-pair it. |
@the-voidl What InfiniTime version, are you pressing pair when asked? |
I originally paired the watch with flashed IT v1.6.0 On the advice of a friend, I paired the device again today under version 1.8.0 without removing it from Gadgetbridge first. |
InfiniTime did not support bonding in 1.6.0. So it might help to remove your watch from Gadgetbridge and re-pair it (accept pairing when asked) so your watch and your phone can bond correctly (using the PIN code). |
I can confirm that this is fully resolved in 1.8.0 :) |
I guess we can close this issue. Feel free to repoen or open a new one in case you encounter issues regarding BLE connection. |
I'm experiencing something similar. I have the HR always on and at night the connection ends up dropping after about 2 hours. During the day it seems to work ok. Once that happens, GadgetBridge is not able to reconnect (but a custom app I have is eventually able to reconnect, after one or two errors), then, GadgetBridge is able to connect again (whithout restarting the watch, although somethimes I disable and reenable the bluetooth on the settings). I'm using 1.13 (it started happening with stock 1.13 but now I'm testing with a small change to prevent the hrs to sleep when the screen is off). When I was using stock, I had the watch set up to wake with shake and wrist and everything + 30s of screen time so it would take as many measures as possible. I haven't yet been able to collect a whole night worth of hr data. I have also tried Sleep as Android with the same results: drop after about 2 hours (in this case, only the modified firmware). |
Oh, now that I think, maybe I can get a HCI log and see whats going on with WireShark. |
Oh I'm pissed off >:( Android has not only made the HCI log feature harder to use, they have completely broken it since it "forgets" old data. That means I don't get the 2-3am data that I need... Maybe trying to retrieve it first thing in the morning... |
After a while, this never happens if I leave the phone charging, so the problem seems to be Android. |
So, I updated to version 1.6, but I still have the issue where after a number of hours that the bluetooth connection drops out, and Gadgetbridge can't reconnect until the watch is restarted. After restarting, pairing works fine.
Steps to reproduce:
Expected behavior:
Connection remains active.
Specs:
Infinitime 1.6 with 1.0 bootloader flashed by Gadgetbridge 0.59.3 on Android 10 on a Samsung Galaxy A51. Is there any other info that would be useful?
The text was updated successfully, but these errors were encountered: