-
Notifications
You must be signed in to change notification settings - Fork 588
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
Stuck with Connecting state #178
Comments
Nice one. It seems to be a race condition in the |
Is it possible to configure timeout value for ble operation? |
From connection observable you can unsubscribe at any moment and it should be handled by the library. |
Unsubscribing is not helping. The result is even worse. |
As I understand the problem occurs here in RxBleRadioOperationDisconnect (line 62):
After calling |
True. Another thing that did not manifest before. |
I think I am struggling with this as well. How is the fix coming along? |
Fix for the original cause is ready and waiting on a private PR to be reviewed by @uKL but he has a quite full plate at the moment. I hope that he will have a moment tomorrow to check it out. The fix for the manifestation (Disconnect) I will make tomorrow. |
Is there any way to push my own ConnectionModule into the RxAndroidBle Graph? |
Unfortunately - There is no possibility to do this. You would have to compile your own version from the sources. |
What a pity. |
@dariuszseweryn could you tell me what was the problem at RxBleRadioOperationConnect? |
|
…BluetoothGatt` is available. #178 Reviewers: pawel.urban Reviewed By: pawel.urban Differential Revision: https://phabricator.polidea.com/D2325
Summary: #178 Reviewers: pawel.urban Reviewed By: pawel.urban Differential Revision: https://phabricator.polidea.com/D2327
Reviewers: michal.zielinski, pawel.urban Reviewed By: pawel.urban Differential Revision: https://phabricator.polidea.com/D2321
@kanat I have pushed fixes for all issues found by you. These should be available in the |
@dariuszseweryn yes, sure, I can try it with real device. |
See https://github.com/Polidea/RxAndroidBle |
Actually I've tried it with my own fixes, seems it works :) |
@dariuszseweryn It works, thanks. |
@dariuszseweryn, is it possible to get frozen version of |
Great news. I will try to publish Your own version will be more bulletproof. SNAPSHOTs tend to change but regression is rarely an issue. |
@kanat I have just released |
@dariuszseweryn Great news, thanks! |
conn_stuck_key.txt
Summary
Stuck with Connecting state
Preconditions
I'm just calling
device.establishConnection(false)
Steps to reproduce actual result
device.establishConnection(false)
device.establishConnection(false)
Actual result
CONNECTING state
04-21 16:48:15.335 25090-25183/ru.starline.key E/ConnectionManager: (Key-1-1:2184) [connect] RxBleDeviceImpl{bluetoothDevice=StarLine BLE(F8:5B:60:89:CD:8A)} (autoConnect='false')
And I get
04-21 16:48:50.354 25090-25219/ru.starline.key E/ConnectionManager: (RxComputationScheduler-3:2194) [connect] error: BleGattCallbackTimeoutException{macAddress=null, bleGattOperationType=BleGattOperation{description='CONNECTION_STATE'}}
I don't understand why mac address is null
Also you can see at logs that Connection was established:
04-21 16:48:15.357 25090-25112/ru.starline.key D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=F8:5B:60:89:CD:8A
04-21 16:48:15.357 25090-25112/ru.starline.key D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
Expected result
CONNECTED state
The text was updated successfully, but these errors were encountered: