-
Notifications
You must be signed in to change notification settings - Fork 419
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
cannot receive connection state change after removeBond() sometimes #363
Comments
Thank you for the report. I'll have a look. |
Hi @philips77, thank you. btw, there may be other two questions.
|
Hello, could you try the proposed solution and check if it works? It's a bit difficult to test it, but you may already have a setup for doing that. Could you place logs from 1. and 2. after applying the PR? Is the behaviour as intended? |
Released in 2.4.0-beta03. Please test if it works for you. We're getting ready to release 2.4.0 final next week. |
our office has been temporarily closed since last week because of covid-19 :( |
hi @philips77 after 2 month lockdown in shanghai, i finally come back to office to test this issue.
Moreover, system BOND broadcast still seemed to not be handled correctly on 2.5.0, If add a log before
|
removeBond()
is called likeremoveBond().then(callback).enqueue()
for checking the bond state after remove bond. and there are two different behaviors after that.Connection state changed
is logged andonServicesInvalidated
is invoked,BOND_STATE_CHANGED
is not logged and removeBond callback is not invoked.BOND_STATE_CHANGED
is received andonServicesInvalidated
is not invoked.in the 1st situation, though the removeBond callback is not invoked, we known the device is disconnected and can reconnect the device as designed.
in the 2nd situation, because
gatt.close()
is called butonServicesInvalidated()
is not invoked, we don't known the device is actually disconnected, it leads to some mistake. we have to check connection state again in removeBond callback. I think it should not be a expected result.after check the source code in nordic ble library, this problem may relate to issue #157. if i remove
close()
call inBleManagerHandler.java
for #157, logs remain same when 1st situation occurs. but for the 2nd one,Connection state changed
can be received andonServicesInvalidated
is invoked, and the connection state can be well handled.The text was updated successfully, but these errors were encountered: