Skip to content
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

BluetoothGatt.close() is not being called immediately after BluetoothGattCallback.onConnectionStateChange() receives STATE_DISCONNECTED #84

Closed
dariuszseweryn opened this issue Oct 25, 2016 · 0 comments
Assignees
Labels
bug Bug that is caused by the library

Comments

@dariuszseweryn
Copy link
Owner

dariuszseweryn commented Oct 25, 2016

Summary


As in the topic.

Preconditions


None.

Steps to reproduce actual result

  1. Connect to a device
  2. Disconnect from a device
  3. Repeat until observed

    Actual result


10-25 14:07:18.325 16858-16858/com.polidea.rxandroidble.sample D/RxBle#Radio:   QUEUED RxBleRadioOperationConnect(1108215744)
10-25 14:07:18.326 16858-16873/com.polidea.rxandroidble.sample D/RxBle#Radio:  STARTED RxBleRadioOperationConnect(1108215744)
10-25 14:07:18.340 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: connect() - device: D0:5F:B8:3C:7C:7E, auto: false
10-25 14:07:18.340 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: registerApp()
10-25 14:07:18.340 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: registerApp() - UUID=96a7a77b-5ff9-4cd2-ba7f-7035d8c09e61
10-25 14:07:18.342 16858-16870/com.polidea.rxandroidble.sample D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
10-25 14:07:19.202 16858-16870/com.polidea.rxandroidble.sample D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=D0:5F:B8:3C:7C:7E
10-25 14:07:19.203 16858-16870/com.polidea.rxandroidble.sample D/RxBle#BluetoothGatt: onConnectionStateChange newState=2 status=0
10-25 14:07:19.205 16858-17025/com.polidea.rxandroidble.sample D/XXX: Connection: com.polidea.rxandroidble.internal.connection.RxBleConnectionImpl@420eddc8
10-25 14:07:19.207 16858-17025/com.polidea.rxandroidble.sample D/RxBle#RadioOperationConnect$$Lambda: No subscribers, finishing operation
10-25 14:07:19.208 16858-16873/com.polidea.rxandroidble.sample D/RxBle#Radio: FINISHED RxBleRadioOperationConnect(1108215744)
10-25 14:07:19.869 16858-16858/com.polidea.rxandroidble.sample D/RxBle#Radio:   QUEUED RxBleRadioOperationDisconnect(1108216488)
10-25 14:07:19.872 16858-16873/com.polidea.rxandroidble.sample D/RxBle#Radio:  STARTED RxBleRadioOperationDisconnect(1108216488)
10-25 14:07:19.887 16858-16858/com.polidea.rxandroidble.sample D/BluetoothManager: getConnectionState()
10-25 14:07:19.887 16858-16858/com.polidea.rxandroidble.sample D/BluetoothManager: getConnectedDevices
10-25 14:07:19.890 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: cancelOpen() - device: D0:5F:B8:3C:7C:7E
10-25 14:07:19.891 16858-16870/com.polidea.rxandroidble.sample D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=D0:5F:B8:3C:7C:7E
10-25 14:07:19.892 16858-16870/com.polidea.rxandroidble.sample D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0
10-25 14:07:29.894 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: close()
10-25 14:07:29.894 16858-16858/com.polidea.rxandroidble.sample D/BluetoothGatt: unregisterApp() - mClientIf=5
10-25 14:07:29.907 16858-16873/com.polidea.rxandroidble.sample D/RxBle#Radio: FINISHED RxBleRadioOperationDisconnect(1108216488)

Expected result


Call to `BluetoothGatt.close()` should happen right after `10-25 14:07:19.892 16858-16870/com.polidea.rxandroidble.sample D/RxBle#BluetoothGatt: onConnectionStateChange newState=0 status=0`
@dariuszseweryn dariuszseweryn changed the title BluetoothGatt.close() is not being called immediately after BluetoothGattCallback.onConnectionStateChange() recieves STATE_DISCONNECTED BluetoothGatt.close() is not being called immediately after BluetoothGattCallback.onConnectionStateChange() receives STATE_DISCONNECTED Oct 25, 2016
@dariuszseweryn dariuszseweryn self-assigned this Oct 25, 2016
@dariuszseweryn dariuszseweryn added the bug Bug that is caused by the library label Oct 25, 2016
dariuszseweryn added a commit that referenced this issue Oct 25, 2016
Summary: #84

Reviewers: michal.zielinski, pawel.urban

Reviewed By: pawel.urban

Differential Revision: https://phabricator.polidea.com/D1906
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is caused by the library
Projects
None yet
Development

No branches or pull requests

1 participant