-
Notifications
You must be signed in to change notification settings - Fork 418
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
after bonding, then call writeCharacteristic, it fail #498
base: main
Are you sure you want to change the base?
after bonding, then call writeCharacteristic, it fail #498
Conversation
@philips77 Is there an ETA? |
The issue with your proposal is that it may work for you case but we have to test it on different Android versions. As you see few lines above, for Android versions lower than Oreo we do call |
But I agree, if you're using if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
if (request != null) {
// Repeat the last command in that case.
enqueueFirst(request);
break;
}
}
if (request != null) {
// Request should be repeated automatically.
return;
}
break; |
Also, if you're using Android-BLE-Library/ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java Lines 399 to 403 in 004e664
Could you post the logs, so that I can trace what's going on there? |
Ok, I did some digging. Android-BLE-Library/ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java Lines 788 to 803 in 004e664
When removing bond completes (which by the way will disconnect the device), this will be called: Android-BLE-Library/ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java Lines 370 to 375 in 004e664
and the Then, when bonded, you should get: Android-BLE-Library/ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java Lines 399 to 403 in 004e664
which should also call nextRequest(true) after the switch.
|
Logs from |
When testing on Pixel 5 with Android 14 the following scenario:
The phone bonds successfully and I'm getting read result afterwards:
What phone and Android version are you working with? |
I've had issues similar to this with the following scenario:
What fixed it for me was changing the 2 instances of:
to:
|
Could you prepare another PR with that change? I think it seems legit. |
I use a wrong email in the commit for #479. Now re-commit using the correct email address for CLA @philips77 . Please review and merge to main branch