-
Notifications
You must be signed in to change notification settings - Fork 159
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
Disconnection after 3 hours of use #224
Comments
quick first thoughts. The problem, that OH1 disconnects, may happen because of battery getting low in OH1. I will investigate can there be other logic build into the OH1 which could cause the sudden disconnection. For now I can't remember such logic, but I will double check. On the other hand, disconnect may happen by the Android OS too. From the logs, I assume, that BLE connection
|
Hi @JOikarinen thanks for the reply. |
Hi @lmiceli, I did little bit more investigations on what is the However, this is what I learned for now:
@lmiceli even though the scenario is hard to debug (as it takes long to reproduce), do you still always face the problem in your environment or does it happen every now and then? |
I investigated this issue a small step further. If the OH1 runs low of battery, around 6% battery left, it closes the BLE connection:
One important question is that which data stream(s) you have requested when the problem happens? |
hi @JOikarinen many thanks for the continued research. the error that we are facing happens almost every night, always with the status 8. we were hoping the issue could be some battery saving on the side of oh1 but your research and comments suggest we need to keep looking at android and our code.
Adding the api config lines in case it helps. |
Platform on which you observed the bug:
Device on which you observed the bug:
Describe the bug
We use this sdk to connect with the bracelet. we want to record the data overnight. approximately when it takes 3 hours it disconnects.
How to Reproduce
connect to the oh1 device with the sdk and spend all night receiving data.
Expected behavior
We need to record long sessions.
Questions
Are there any limitations? Does Android kill the bluetooh service in any way?
What this message means exactly? => "state changed device newState: 0 status: 8"
We are thinking on buying a verity sense device. Do you think it may work better?
Screenshots and logs
01-13 02:30:51:071 I/CommunicationService(16568) : BDGattCallback/GATT state changed device newState: 0 status: 8
01-13 02:30:51:074 I/CommunicationService(2) : BDDeviceSessionImpl/disconnected
01-13 02:30:51:087 I/CommunicationService(2) : BleHrClient/Stop observing HR
01-13 02:30:51:090 I/CommunicationService(2) : BleGattBase/Remove notification characteristic for 00002a37-0000-1000-8000-00805f9b34fb
01-13 02:30:51:134 I/Reporter(2) : trail step: Error on CommunicationService, message = null
01-13 02:30:51:169 W/Reporter(2) : Error on CommunicationService, message = null
com.polar.sdk.api.errors.PolarDeviceDisconnected
at com.polar.sdk.impl.BDBleApiImpl.handleError(BDBleApiImpl.java:1092)
at com.polar.sdk.impl.BDBleApiImpl.lambda$startStreaming$29$com-polar-sdk-impl-BDBleApiImpl(BDBleApiImpl.java:697)
at com.polar.sdk.impl.BDBleApiImpl$$ExternalSyntheticLambda26.apply(Unknown Source:4)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:94)
at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onError(BasicFuseableSubscriber.java:101)
at io.reactivex.rxjava3.subscribers.SerializedSubscriber.onError(SerializedSubscriber.java:144)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.onError(FlowableDoFinally.java:89)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableCreate$BaseEmitter.errorDownstream(FlowableCreate.java:299)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:539)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.signalError(FlowableCreate.java:489)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableCreate$BaseEmitter.tryOnError(FlowableCreate.java:287)
at com.polar.androidcommunications.common.ble.RxUtils.postError(RxUtils.java:45)
at com.polar.androidcommunications.common.ble.RxUtils.postExceptionAndClearList(RxUtils.java:29)
at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient.clearStreamObservers(BlePMDClient.kt:462)
at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient.reset(BlePMDClient.kt:88)
at com.polar.androidcommunications.enpoints.ble.bluedroid.host.BDDeviceSessionImpl.handleDisconnection(BDDeviceSessionImpl.java:312)
at com.polar.androidcommunications.enpoints.ble.bluedroid.host.BDDeviceListenerImpl$4.deviceDisconnected(BDDeviceListenerImpl.java:371)
at com.polar.androidcommunications.enpoints.ble.bluedroid.host.connection.ConnectionHandler.deviceDisconnected(ConnectionHandler.java:87)
at com.polar.androidcommunications.enpoints.ble.bluedroid.host.BDGattCallback.lambda$onConnectionStateChange$6$com-polar-androidcommunications-enpoints-ble-bluedroid-host-BDGattCallback(BDGattCallback.java:72)
at com.polar.androidcommunications.enpoints.ble.bluedroid.host.BDGattCallback$$ExternalSyntheticLambda2.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:914)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
The text was updated successfully, but these errors were encountered: