Amazfit Bip: GB hangs on "connecting" or on "fetching activity data" #1264

Closed
by TimH54 opened 3 years ago · 11 comments
TimH54 commented 3 years ago (Migrated from github.com)
Owner

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:

  1. 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

  2. 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:

0.29.1

gadgetbridge.log.txt

#### Before opening an issue please confirm the following: - [x] I have read the [wiki](https://github.com/Freeyourgadget/Gadgetbridge/wiki), and I didn't find a solution to my problem / an answer to my question. - [x] I have searched the [issues](https://github.com/Freeyourgadget/Gadgetbridge/issues), and I didn't find a solution to my problem / an answer to my question. - [x] If you upload an image or other content, please make sure you have read and understood the [github policies and terms of services](https://help.github.com/articles/github-terms-of-service/#1-responsibility-for-user-generated-content) #### 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: 1) 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 2) 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: 0.29.1 [gadgetbridge.log.txt](https://github.com/Freeyourgadget/Gadgetbridge/files/2372398/gadgetbridge.log.txt)
mkauzlar commented 3 years ago (Migrated from github.com)
Owner

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
Android: 7.0
GB: 0.29.1

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 Android: 7.0 GB: 0.29.1
Owner

@mkauzlar what kind of phone is this? Samsung S series?

@mkauzlar what kind of phone is this? Samsung S series?
Owner

@TimH54 Thanks for the logs, I will have a look. Did you manually trigger the fetching of activity data or did it happen automatically?

@TimH54 Thanks for the logs, I will have a look. Did you manually trigger the fetching of activity data or did it happen automatically?
Owner

@TimH54 your log is from about 0:00 to about 20:07. Where's the part from 21:00?

@TimH54 your log is from about 0:00 to about 20:07. Where's the part from 21:00?
TimH54 commented 3 years ago (Migrated from github.com)
Poster
Owner

@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.

> @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.
Owner

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)
  1. 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
  1. 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
  1. 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.

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) ``` 1. 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 ``` 2. 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 ``` 3. 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.
TimH54 commented 3 years ago (Migrated from github.com)
Poster
Owner

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!

> 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!
Owner

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 😎

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 :sunglasses:
mkauzlar commented 3 years ago (Migrated from github.com)
Owner

@mkauzlar what kind of phone is this? Samsung S series?

It's an Oukitel K10000 Pro

> @mkauzlar what kind of phone is this? Samsung S series? It's an Oukitel K10000 Pro
TimH54 commented 3 years ago (Migrated from github.com)
Poster
Owner

@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.

@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.
dazzzl commented 3 years ago (Migrated from github.com)
Owner

I had this issue also with GB 0.30.0. So, I think it is not completely fixed.

I had this issue also with GB 0.30.0. So, I think it is not completely fixed.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.