j-kaltes / Juggluco

Android app for Freestyle Libre 1,2 and 3 and Chinese Sibionics sensors
GNU General Public License v3.0
217 stars 56 forks source link

Issues with Bluetooth connection with sensor using watch as collector and Juggluco #94

Open Npavkov opened 11 months ago

Npavkov commented 11 months ago

I still have this continuing issue with BT connection using juggluco and different watch faces. When using the standard juggluco watchface, the BT connection is rock solid ALL DAY LONG, but when ANY other watchface is used, the BT connection drops repeatedly. When switching back to juggluco standard watchface the connection goes back to ROCK SOLID. I have done some extensive research of the logcat logs and I do not see any indication that Wearos is terminating the BT connection or watch app. I have attached a logcat of the issue where I have recreated this issue. There is plenty of memory available on watch with the watchfaces loaded so wearos id NOT terminating due to low memory. Like I said using standard Juggluco watchface, ROCK SOLID connection all day long, Nut connection fails repeated using ANY OTHER watchface. If I switch back to standard Juggluco watchface, it goes back to ROCK SOLID, without resetting the BT connection on the watch. Would you take a look at the Logcat log and see if you are able to determine why the BT connection fails with any watchface OTHER THAN juggluco standard one? I would appreciate any input you can provide. watchloga.txt

j-kaltes commented 11 months ago

In the logcat I found: 11-07 15:57:00.447 522 1438 D MARsmini_FreecessController: freezePackage tk.glucodata uid:10168 LEV Juggluco is probably frozen because you don't use it any longer for the watch face. You should give Juggluco running in the background permission in the Samsung Galaxy Wearable app.

Npavkov commented 11 months ago

Jugguco was given background permission via ADB, and does show as running in the background on the watch. Any suggestions would be appreciated.

Please Note the only thing that I do during these instances is to switch BACK to the juggluco watchface (I do not restart any apps or the watch) and the BT connection will start back up again.

Npavkov commented 11 months ago

Jugguco was given background permission via ADB, and does show as running in the background on the watch. Any suggestions would be appreciated.

Please Note the only thing that I do during these instances is to switch BACK to the juggluco watchface (I do not restart any apps or the watch) and the BT connection will start back up again.

Npavkov commented 11 months ago

Is there ANYONE ELSE seeing differences in the direct sensor bluetooth connection when using a NON-Juggluco watchface (even a standard clockface with hour,minute,and secondhand ONLY with no other watchface complications) as opposed to using the standard Juggluco watchface? I continue to see a major difference in the connection with the sensor when using ANY OTHER watchface other than juggluco standard watchface, that seems to maintain a ROCK SOLID connection with the sensor. During my tests I have been able to recreate the issues by having juggluco watch loaded and showing Rocksolid connection, then switch to ANY OTHER WATCHFACE. within 10 mins or so then connection begins to drop repeatedly, then when I change back to juggluco watchface it goes back to ROCKSOLID connection. NOTE: NO OTHER operation is performed when this happens other than switching watchfaces, NO RESETS of the connection or apps, NO rebooting of anything, NOT EVEN TOUCHING THE WATCH at all UNTIL switching back to the juggluco watchface. This is a strong indication that the issue with the connection drops IS NOT caused by WEAROS or the UI of the watch terminating for low memory or inactivity,etc. I can accept the OS terminating the connection under some conditions, However I can not accept the OS starting the connection back up afterward to allow juggluco to reconnect to the bluetooth connection with the sensor (without user doing anything!!) AND I am unable to wrap my head around why the standard juggluco watchface HAS NO SUCH ISSUES with the connection, but ONLY experiences issues when using any other watchface while juggluco is running. as a Software troubleshooting engineer for major US company for many years, by trade, This indicates to me that juggluco does SOMETHING different during the processing the sensor bluetooth messages when using a different watchfaces as opposed to using a standard Juggluco watchface.

I use this juggluco watchface (Rock SOLID BT Connection!!): Samsung_SM-R875U_2023_10_18_17_39_35

I have recreated this issue multiple times using different watchfaces available on the watch and can re-produce the results each time. I could be wrong BUT I am convinced this is caused by Juggluco processing, NOT WEAROS or watch UI processing of the BT connection.

Can ANYONE else try to reproduce this issue?

Npavkov commented 11 months ago

Thank You, Thank You, Thank you for fixing this issue with the update of juggluco to version 7.1.12. This makes Juggluco so much more useful to me....Thanks again.

j-kaltes commented 11 months ago

The update didn't change anything that could have possibly alleviated your problems. Either your problems are not solved or Samsung or Google have changed something.

Npavkov commented 11 months ago

Well, this is still happening. I have not been able to determine what is different about the jugglucco watch face compared to all other watchfaces when it comes to bluetooth connection. Please take another look to determine if anything can be changed in code to alleviate this issue. could this be a TIMING issue on when the bluetooth signal is read from the sensor. That might explain why the connection works for up to 30 mins + before it starts failing all together?

j-kaltes commented 11 months ago

When I test it out, I always turn on "Floating Glucose". Do you use "Floating glucose"? With "Floating glucose: Juggluco is also in the foreground so reason for WearOS not to freeze it.

Npavkov commented 11 months ago

Jaap, thank you for the suggestion, unfortunately, it did not have much effect if any with the Bluetooth connection. This issue is really weird….. When I use the watchface referred to in the issue description, the Bluetooth connection is rock solid for days, only missing maybe a handful of 1 minute bg readings all day long. BUT once I change watchface to some other one, the juggluco Bluetooth connections remains fine for 15-30 mins, then starts dropping the BT connection. Most of the time it becomes necessary to turn off Bluetooth and then restart it, then within 10 mins the connection reconnects and juggluco goes another 10-30 minutes and drops again. However AS SOON AS I switch back to juggluco watchface referred to above, then it goes back to ROCK SOLID for days again…… so when using the juggluco watchface, it runs fine, but ANY OTHER watchface, then there is Bluetooth issues again. I am wondering if there may be issues with the timing of the reading of the bg readings causing the bg reading to NOT be read at the right time, after 10-30 mins, However, the juggluco watchface does NOT experience the same Bluetooth connection issues….. if it could be determined what is different about Juggluco’s watchface compared to ALL the other ones???

From: Jaap Korthals Altes @.> Sent: Friday, December 1, 2023 9:24 AM To: j-kaltes/Juggluco @.> Cc: Npavkov @.>; State change @.> Subject: Re: [j-kaltes/Juggluco] Issues with Bluetooth connection with sensor using watch as collector and Juggluco (Issue #94)

When I test it out, I always turn on "Floating Glucose". Do you use "Floating glucose"? With "Floating glucose: Juggluco is also in the foreground so reason for WearOS not to freeze it.

— Reply to this email directly, view it on GitHub https://github.com/j-kaltes/Juggluco/issues/94#issuecomment-1836202357 , or unsubscribe https://github.com/notifications/unsubscribe-auth/A7E46IZK7X5QWN2R4N6NVNLYHHSAZAVCNFSM6AAAAAA7E76OIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGIYDEMZVG4 . You are receiving this because you modified the open/close state. https://github.com/notifications/beacon/A7E46I4D2BAYF5TP45K2RG3YHHSAZA5CNFSM6AAAAAA7E76OIWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTNOI4XK.gif Message ID: @. @.> >

Npavkov commented 10 months ago

Wearos does NOT seem to be freezing Juggluco when the juggluco watchface is used..???

rbvitrb commented 1 month ago

Hello Npavkov, I have issues with direct watch sensor connection, can't manage to establish the connection, I get status error 133 on watch, which watch are you using? Which juggluco app version? Do you have any tips on this matter? I am using Xiaomi watch 2