Amazfit Bip: GB hangs on "connecting" or on "fetching activity data"
Before opening an issue please confirm the following:
- I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
- I have searched the issues, and I didn't find a solution to my problem / an answer to my question.
- If you upload an image or other content, please make sure you have read and understood the github policies and terms of services
Your issue is:
I had massive problems with reconnects after signal loss for my Amazfit Bip on Gadgetbridge before 0.29 (see https://github.com/Freeyourgadget/Gadgetbridge/issues/1142). With 0.29.x reconnects now work mostly stably. However, I still occasionally observe two problems:
Gadgetbridge hangs on "connecting" after the connection had been lost. Manually cancelling the connection attempt and re-initiating the connection works fine (no need to cycle BT). The bad thing is that the watch actually displays that the BT connection is established when it is not. I caught this behaviour in the attached log file around 21:00. @pepe404 reported the same behaviour in the above-linked issue. Also, this was mentioned here: https://github.com/Freeyourgadget/Gadgetbridge/issues/1238
Gadgetbridge hangs on "fetching activity data" (I have fetching "activity data on unlock" on). I caught this behaviour in the log file, I think sometime around 15:00, definitely before 15:30.
Your wearable device is:
Amazfit Bip FW 1.0.2.00, HW 0.11.2.4
Your android version is:
Oreo 8.0 (Oneplus 3T OxygenOS)
Your Gadgetbridge version is:
Same here except I can never connect. It just keeps saying connecting.
The debug test for sending works. That's about the only thing that works
Amazfit Bip FW: v1.1.2.05
@TimH54 Thanks for the logs, I will have a look. Did you manually trigger the fetching of activity data or did it happen automatically?
It happened after automatic fetching of activity data on unlock. I have never seen it hang when I had initiated fetching of activity data manually.
@TimH54 your log is from about 0:00 to about 20:07. Where's the part from 21:00?
Sorry, my bad. The issue occurred around 20:00 (not 21:00). After I had noticed it, I had stopped logging.
Regarding activity fetching, this is probably the relevant part in the log:
15:23:45.858 [Binder:5347_4] DEBUG n.f.g.s.b.BtLEQueue - characteristic write: 00000004-0000-3512-2118-0009af100700 (success)
- For some reason, we don't receive anything from the band here.
15:23:52.181 [main] DEBUG n.f.g.s.DeviceCommunicationService - Service startcommand: nodomain.freeyourgadget.gadgetbridge.devices.action.start 15:23:52.183 [main] DEBUG n.f.g.s.DeviceCommunicationService - Service startcommand: nodomain.freeyourgadget.gadgetbridge.devices.action.request_deviceinfo
- Not sure how this happened. Looks like the main activity was recreated. Did you swipe it away and open Gadgetbridge again?
15:24:00.962 [main] DEBUG n.f.g.s.DeviceCommunicationService - Service startcommand: nodomain.freeyourgadget.gadgetbridge.devices.action.disconnect
- And then you disconnected manually.
So 1) is the problem. And in the code we see this:
builder.add(new WaitAction(1000)); // TODO: actually wait for the success-reply
We basically send a write-command too early, i.e. before the previous command was confirmed by the band. So it rightfully ignored us.
Not sure how this happened. Looks like the main activity was recreated. Did you swipe it away and open Gadgetbridge again?
I can't say it with absolute certainty, but I think that I did not swipe the notification away but clicked on it, which opened GadgetBridge. Then, noticing that it hangs on fetching activity data, I disconnected manually and initiated connecting manually afterwards, which worked.
Is this related to the problem of hanging connection or are these two separate issues? In any case, let me know if I can help in any way, e.g. by trying to catch it again with a log file. Thanks a lot for your efforts!
Thanks for the info. No, this is unrelated to connection problems. The connection was fine, we just sent a command too early for the band. Fixing this properly involves some pretty intricate code, that's why the TODO was there in the first place 😎
@cpfeiffer Great that you fixed the issue with the fetching of activity data. But the connection problems are still open, right? Please let me know if I should try to catch them with another log file, or if the one I provided is good enough.
I had this issue also with GB 0.30.0. So, I think it is not completely fixed.
Deleting a branch is permanent. It CANNOT be undone. Continue?