-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Watch does not automatically reconnect to GadgetBridge after turning airplane mode on and off #302
Comments
hmm I'm not able to reproduce this issue running same versions. Do you experience the same if you toggle Bluetooth off/on on the phone? |
Yes, exact same result. |
This kind of issue is really hard to debug, and is probably caused by a mix of PineTime HW, InfiniTime, phone HW and software stack. |
Not knowing that behaviour is most likely the 'cause' of the problem... i.e. I would probably have had a similar complaint if I didn't know that turning the screen on wakes up advertising. But only the OP can answer that question.
Maybe a future thought could be have periodic advertising... say once every five minutes or so, for 10 seconds or whatever (I'm sure there's some convention that can be followed - or not!) ... i.e. try and make itself available if the phone wants to reconnect. |
I made a couple more tries to try to understand what is happening. In nRF Connect when I disable/enable bt the "bonded" tab in nRF Connect gets wiped, but the scanner does detect watch - as not bonded. |
Whether the device is bonded or not has no impact on the device appearing
in the scanner tab. It is merely a list of all the devices which are
currently advertising, with greyed out entries for those devices that have
recently advertise, but not presently advertising (Bluetooth advertising
of presence). Disabling and enabling bluetooth should also not lose bonding
or pairing... that suggests there is something wrong with your configuration.
Can you try this... Start a scan (in NRF Connect), wait for a few seconds
and confirm the InfiniTime is not active. Then whilst NRF Connect is still
scanning, press the button on the pinetime momentarily so the screen comes
on. Does it show up then? If so, it is working as intended.
…On Thu, 22 Apr 2021, 1:27 am github user, ***@***.***> wrote:
I made a couple more tries to try to understand what is happening.
It seems that it is not limited to Gadgetbridge since it also happens with
nRF Connect.
In nRF Connect when I disable/enable bt the "bonded" tab in nRF Connect
gets wiped, but the scanner does detect watch - as not bonded.
If i try to manually connect sometimes it connects, but most of the time
it timeouts/errors - logger says Error 133 (0x85) GATT ERROR. Which is
probably not very helpful.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJ66KKSSXGTJEWYYJZ56UDTJ3VFVANCNFSM43III6HQ>
.
|
I have the same unstable connection problem with gadgetbridge, only workaround is unpair/repair the pinetime |
I can confirm the same issue with reconnection as @diegosolor . Connections gets lost and some times pinetime does not appear in gadgetbridge. Only solution in that case is to restart the watch. For reference I'm using a Oneplus Nord with A droid 11. I'm a bit lost with how to debug it but let me know if I can do anything to provide help/info about the reconnection issue. |
Sometimes I have to tell gadgetbridge to connect twice... I.e. connect, press and hold to disconnect after a few seconds of no activity, and then connect again. With the pinetime screen on to ensure it is actually advertising. If you need to restart the watch, you could be running what seems to be a time-related issue when the bluetooth locks up at somewhere around 20 hours of uptime, and the watch needs restarting. |
Independent of airplane mode: Mine (1.0.0) disconnects sometimes from gadgetbridge, and then does not appear on the nRF scanner, and then can only be reconnected by restarting the pinetime AND re-pairing. This also happened after a very short time, not 20h. |
I'm having the exact same behaviour as @blaueente . I get multiple disconnects per day and I need to restart the pinetime in order to be able to pair it again. In gadgetbridge it is not enough to click reconnect since it seems it does not manage to reconnect, so only option is: remove pinetime from gadgetbridge -> restart pinetime -> pair again. |
I am on arch Linux arm danct12s Image. I’m using it on my pinephone, when I restart my phone like when I update the Bluetooth says it’s disconnected. But it was connected before the reboot. (my PineTime) But sometimes rarely it will reconnect itself after a while but 80% of the time I have to restart my watch to make it reconnect or disconnect from amazfish and then reset that back up. For it to register. |
Today I upgraded Gadgetbridge to latest version 0.58.0 and so far I had a way more stable connection and automatic reconnect working. I'll give more info after testing it for a couple days but I highly recommend the upgrade. |
On the latest version of Gadgetbridge. I pretty much have to restart the PineTime every 20 hours to connect, but it does then reconnect immediately after booting back up. Quite annoying, and I often miss calls because it takes a while for me to realize that the connection has dropped. |
I can add, that not only activating airplane mode causes this behavior. Disabling bluetooth for a while triggers this issue as well, even on the newest firmware (1.2 at this time) and newest gadgetbridge (0.58.1) on GrapheneOS (RQ3A.210705.001.2021.07.07.19) I even have to remove it from gadgetbridge first, restart the phone AND the Pinetime to get a working connection, so this might be somewhat related, but not the same issue.. |
I can report that upon Airplane mode on/off, PineTime, running Infinitime FW v1.1.0 w/Hebrew support, cannot reconnect automatically/manually using latest Gadgetbridge (v0.58.2). Workaround is "disconnecting" watch via GB, re-pairing via Android settings (PineTime disappears from "Previously connected devices") and then connecting via GB. Phone is a Planet Computer Cosmo Communicator running Android v9, Build number Cosmo-9.0-Planet-02032021-V25, Custom build version alps-mpp-p0.mp1-V5.313 |
Same issue with firmware 1.3.0. |
I have the same problem. |
Another one here. I just received two PineTime's, the current firmware is v1.2.0. The behaviour is identical on both devices, and with two different Android phones running Gadgetbridge. My experience is as per #527 - there's no need for airplane mode, or any shenanigans on the phone, at some point, when the watch is idle, it will disconnect and will no longer advertise until a restart is forced. As others have noted, the Bluetooth indication on the watch face disappears, and (naively) I assume the Bluetooth radio has been powered down. |
Same problem here as well with v1.3.0 an Gadgetbridge. |
The watch also gets disconnected after some time (even if it's connected all the time), as someone described above and doesn't reconnect anymore after approx. 20h. Well, in my case (I've tested it already several times) it is NOT sufficient just to restart the watch. EDIT: Tried it without re-pairing and voila, just a restart of the watch is necessary, so I was wrong. (But Gadgetbridge still hangs as described if I try to go this route) |
I just wanted to chime in and say, if I reboot my phone, it won't connect to my pinetime without unpairing and repairing with GadgetBridge. (stuck on waiting for reconnect) PineTime:
Phone:
GadgetBridge:
|
Chiming in with the same problem. Received watch, updated firmware from 1.2.0 to 1.3.0, paired with Gadgetbridge, disabled Bluetooth, enabled Bluetooth... no connection anymore. PineTime:
Phone:
GadgetBridge:
Restarting (resetting?) the watch via button long-press fixed it for the moment. Until I disable and enable Bluetooth again. (Maybe adding an BT advertisement indicator to the watch UI might help see if it's advertising at all?) Edit Edit2 Edit3 |
I can confirm I have the same problem with a new PineTime. Just like @heinrich-ulbricht I received watch, updated firmware from 1.2.0 to 1.3.0, paired with Gadgetbridge, disabled Bluetooth, enabled Bluetooth... no connection anymore. I have had some better connectivity with nRF Connect compared to GB. GB seems to dislike reconnecting when toggling Bluetooth while nRF will usually reconnect. However, after a while, like noted in issue #527 the PineTime itself will no longer broadcast via BLE. Might it be that this issue and #527 are connected but due to two different issues, one that GB is a flaky and the other where PineTime stops broadcasting? Is it possible to add into the settings the ability to turn Bluetooth on/off and force the service to restart without restarting the entire device? On/off may be nice for those looking to maximize battery and security and restarting the BLE broadcast may help with debugging. |
It doesn't if the disconnection is too long, primarily because making a new connection itself is very unreliable right now. Once InfiniTime can keep a connection in-range and has working reconnects, Gadgetbridge's auto-reconnection can be dialed up. |
@Avamander thank you for the clarification. |
This issue seems to be a rather complex one due to the number of potentially involved parts (and parties):
Furthermore only some users seem affected. (Otherwise this would have priority over new features? Can we estimate how many users are affected?) So the issue might prove hard to reproduce for those who are capable of analyzing and/or fixing this issue. From an end user's point of view it's frustrating. The connection between watch and phone is unusable for me. Going out of range sometimes is enough to kill the Bluetooth connection, but I also often go to full flight mode (with Bluetooth disabled) and back. I then have to re-pair, which takes time and after some time I don't bother anymore. I also see that this issue has been known a long time already which gives me the fear it will never be fixed. From a developer's point of view I'd like to help get this sorted out. I just don't know how and somebody would have to tell me what to do to diagnose this. Reading logs with adb? Can do. Fire up a dev environment? Not so sure. What else? How is the current state for this issue? Is somebody currently working on it? Can we assume that this will sort itself out with future updates to software and/or hardware? Back in the Windows Phone times I used to write: I really want this to work. Seems like I'm back again writing: I really, really, reeeeeally want this to work!! |
My PineTime is having similar issues. It won't reconnect after a few minutes. Nevertheless, existing connections can last for hours. I have not yet checked what's the longest it will last. Upon resetting I sync to both my laptop, using Siglo, and my stock Android phone, using GadgetBridge, one after the other before the PineTime's screen turns off. After disconnecting, the paired device needs to be removed from GadgetBridge and the PineTime needs to be reset for it to connect to either device. UPDATE: I managed to re-connect the PineTime with GadgetBridge after two days without pairing. The paired device had to be removed and re-paired to GadgetBridge for it to connect. This was on firmware 1.3.0. PineTime:
Phone:
GadgetBridge:
Laptop:
Siglo:
|
This morning, the PT disconnected from GB. Why? I don't know: probably at the moment when I connected the Heart Rate BPM, but I don't know exactly. |
On my side I don't have this issue, I'm using: maybe Gadgetbridge 0.60.0 fixes this issue ? |
It's way better then before. It still disconnects from time to time, but so far I could always reconnect. Previously I needed to restart the pineTime for that to work. |
Not fixed for me, still have to trick GB into connecting by adding and then selecting "don't add" but ONLY after airplane mode. Same versions except a Fairphone. |
I've been running 1.6.0 for almost 36 hours now and have not had to restart the PT once to fix it advertising/showing up. With GB 0.59.3 or 0.60 I have issues reconnecting after anything that cycles Bluetooth off, including toggling BT, toggling airplane mode, or sometimes a restart. For GB I usually have to remove the device to re-add it after restarting the phone. Sometimes it takes several phone restarts, sometimes one, or sometimes just letting them sit disconnected for minutes/hours. Even clearing the GB cache does not help. With nRF Connect 4.24.3 I also have issues reconnecting after a BT toggle. However, a restart allows it to reconnect. IF GB has failed to connect before trying nRF then I cannot get nRF to connect to the PT. Connecting nRF before GB does not always allow GB to reconnect to the PT. I even tried to fix this by restarting my PT and that did not change the behavior noted above. So I think (maybe??) that the PT side of this issue may be resolved. Unless PT is storing BLE connection info across restarts that disables new connections, which I doubt. Do we think that this may be closed from a PT perspective but still open from a GB, nRF Connect (maybe Android OS) perspective? |
I think it is also worth mentioning the incredible work done by those that have been looking into these issues. This is very clearly a difficult bug and the amount of time and pain to fix them, let alone track them down, is incredible. |
I wanted to add my congratulations and thanks for this fix. I've had my PineTime for a month and this has been one of the few (minor) troubles with InfinniTime. Now that it's fixed, this humble watch moves closer to rivalling the big boys! |
I've just spent a half hour restarting the PineTime, restarting GadgetBridge, and trying to pair the two through the BT control panel in Android. Nothing works. The closest I get is a failed "Pairing..." message in the control panel, and "Creating bond with InfiniTime"/ "Bonding with Infinitime"/"Attempting to pair with InfiniTime"/"Trying to connect with InfiniTime" in GadgetBridge, all of which end with the watch and phone not connected. Doesn't matter if the screen is on or off once GadgetBridge or the OS discovers the watch. I can seen that things are much improved in 1.5 and 1.6 but I'm running 1.4 and can't upgrade until I can connect. Any advice? |
You could try another app (e.g. NRF Connect). |
@stillmanff InfiniTime doesn't require pairing/bonding so don't try that through the bluetooth control panel. Unpair it from the bluetooth control panel and just open gadgetbridge and try connecting using that. |
It didn't successfully pair at all, so there's nothing to unpair. However, I updated Gadgetbridge to 0.60, an update that didn't show up last night when I was trying. As soon as I did that, the PineTime connected, first try, with pairing. Thanks for the advice. |
After some (short) time the watch disconnects from BT and can't be scanned, connected or bonded again. Android says 'This device needs an application'. Stop and restart BT on the phone doesn't solve the issue. Nrf can't scan the watch either. Restarting the watch brings BT back again, and removing/adding in GadgetBridge brings it back there. |
It's still borked for me on the latest GB and IT versions but i have found a bit of a workaround. Basically, when GB gets stuck on "connecting" you press and hold the tile until it says "Not connected.". I know that it is not much of a workaround, but it doesn't require rebooting or re-pairing. |
For those having this kind of issue with reconnecting to Gadgetbridge, could you check these points:
Also, as some of you experience issues after turning the airplane off and on : why are you doing this? I'm not saying there's no issue and that you shouldn't go into airplane mode, but it looks like a "degraged case" that might be difficult to debug, as every BLE stack of every BLE device probably behave differently... |
@JF002 I'm not sure why others go to airplane mode but I know I cycle Bluetooth due to battery and based on phone use. Where I work I may have to leave my phone in another office/area away from me for several hours. Or, sometimes I'm at my desk, with my phone right in front of me, and don't need notifications to sync. With Bluetooth on, my phone lasts one day at best but cycling WiFi and Bluetooth I can get 2+ days. So cycling Bluetooth is an important use case to account for. I have not had any PineTime/InfiniTime issues with Bluetooth since 1.6 came out. But I have had issues with Android/GB. If I cycle Bluetooth, nothing other than a phone restart will allow GB to sync. No restart of the PT is needed. GB still sees the PT, and attempts to connect, but it simply will not, even if I restart my PT. So I don't think cycling Bluetooth is a PT/IT issue right now, I think it's an Android/GB issue. I have also noticed some odd behavior with GB now that we can stay connected for days (thank you for that fix!). I have noticed that after ~3-4 days GB will have intermittent connection to IT. It seems related to whether my phone's screen is on or off. When I turn the phone screen on it quickly reconnects (PT screen does not have to be on but it can help speed up the reconnect, cycling PT screen alone does not fix it). Once reconnected it stays connected when the screen goes off, until it decides to disconnect. I have not been able to determine what the period is between disconnects but it happens a few times per day. Only a phone restart corrects this behavior too. I don't think either #302 nor the additional item I note are PT/IT bugs. And I'm not sure if this other behavior is related to this subject bug, and thus something odd with Android/GB Bluetooth handling. (sorry to bring up an unlisted bug deep in a possibly unrelated thread). Does GB happen to have a bug being tracked related to #302? Do we know if those using other non-GB connections are having similar issues? |
@bearclaws8 do you have HRM turned on on your PT? See #707 |
@JF002 everything checked. I put my phone into airplane mode at night. I'm sleeping in the basement. Due to a low signal strength, my phone boosts up the transmitter power (can I say it like that?) which drains my battery. At night, I only need my phone as a clock and to wake me up in the moeging |
@akutuzov I honestly don't remember. But given how long my PT had been on it is quite possible my kids or myself had turned on the HRM at some point. I'll keep an eye on it and thanks for noting that bug for me. 👍 |
Works for me too. |
I have trouble when my phone restarts or the watch goes out of range. The range issue may be better since 1.6 though. I have the HRM off. I did have it on earlier. |
Confirm it works.
This is mandatory |
Pushing the button is not mandatory. It does how ever make the watch advertise faster, Which makes it easier to connect to. with #625 it was changed to always advertise even when disconnected. Per the wearable specs from the big wigs. |
I went ahead and updated the firmware and it seems like the majority of the issues have subsided if not been entirely addressed (For reference, I do have the Device Companion Pairing setting enabled in Gadget Bridge) |
Each and all issues related to reconnection or pairing should now be held until #796 is merged. After it is merged and an issue is encountered again, a new issue must be opened. |
InfiniTime version: 1.0.0 RC3
Gadgetbridge version: 0.56.1
Steps to reproduce:
The workaround I have found is to fully disconnect in GB - status "Not connected" and then pair the watch again.
Restarting the watch or Gadgetbridge did not seem to help.
I don't know if the problem is with GB or IT but it would be nice if the two could automatically reconnect in this scenario if possible.
The text was updated successfully, but these errors were encountered: