-
Notifications
You must be signed in to change notification settings - Fork 582
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
Significant BLE Slowness After Reconnection on Android 15 QPR1 with RxAndroidBle #858
Comments
Thank you for the report. Have you seen any library logs that would have |
@dariuszseweryn Thank you for your reply. I enabled debug logging for RxAndroidBle and tested both the first-time connection (with pairing/bonding) and subsequent connections to the BLE device. Here is what I observed: First-Time Connection (Pairing/Bonding):
Subsequent Connections (After Initial Pairing/Bonding):
Behavior Across Multiple Devices:
Our Implementation:
Request for Your Insights: We would greatly appreciate any insights or recommendations you might have to further investigate or work around this issue. Thank you again for your assistance! |
My suspicion: It may be that Android 15 negotiates lower connection priority after initial setup. You could check if the connection parameters are updated on Android 14 — I guess not. As a workaround, setting connection priority after it was changed by Android 15 could help. |
Thank you for your suggestion regarding setting the BLE connection priority after it was changed by Android 15. I implemented this workaround as follows: After establishing the connection, I set the BLE connection priority to CONNECTION_PRIORITY_HIGH to ensure stable communication. Here is a brief code snippet showing the implementation:
Observations:
Thank you again for your support! |
Describe the bug
After successfully connecting and bonding with a BLE device using RxAndroidBle, subsequent connections experience significant delays, particularly during MTU requests and characteristic read/write operations. This issue is observed primarily on devices running Android 15 QPR1 Beta and appears to be related to changes in the Bluetooth stack on this version.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
BLE connections should be stable and fast across initial and subsequent reconnections, similar to the behavior observed on Android 14 and below.
Smartphone:
Logs from the application when bug occurs
Start of connection and noticeable delay during MTU request
2024-09-04 19:03:43.205 12221-12439 [Bluetooth...vity L:119 app.theranica.neriviomigra D QUEUED ConnectOperation(128601542)
2024-09-04 19:03:43.207 12221-12361 [Bluetooth...vity L:119 app.theranica.neriviomigra D STARTED ConnectOperation(128601542)
2024-09-04 19:03:43.211 12221-12363 BluetoothGatt app.theranica.neriviomigra D connect() - device: XX:XX:XX:XX:17:3F, auto: false
2024-09-04 19:03:43.590 12221-12461 BluetoothGatt app.theranica.neriviomigra D onClientConnectionState() - status=0 clientIf=6 connected=true device=00:A0:50:0D:17:3F
2024-09-04 19:03:44.600 12221-12451 [Bluetooth...$2$2 L:352 app.theranica.neriviomigra D Requesting MTU
2024-09-04 19:03:44.614 12221-12363 BluetoothGatt app.theranica.neriviomigra D configureMTU() - device: XX:XX:XX:XX:17:3F mtu: 512
2024-09-04 19:03:47.607 12221-12453 [Bluetooth...$2$1 L:470 app.theranica.neriviomigra D Retrying MTU request: attempt 1
2024-09-04 19:03:48.928 12221-12461 BluetoothGatt app.theranica.neriviomigra D onConfigureMTU() - Device=00:A0:50:0D:17:3F mtu=512 status=0
2024-09-04 19:03:48.937 12221-13137 [Bluetooth...vity L:119 app.theranica.neriviomigra D FINISHED MtuRequestOperation(104128157) in 4328 ms
Delay in characteristic read after service discovery
2024-09-04 19:03:48.958 12221-12363 BluetoothGatt app.theranica.neriviomigra D discoverServices() - device: XX:XX:XX:XX:17:3F
2024-09-04 19:03:48.967 12221-12461 BluetoothGatt app.theranica.neriviomigra D onSearchComplete() = Device=00:A0:50:0D:17:3F Status=0
2024-09-04 19:03:48.973 12221-13137 [Bluetooth...vity L:119 app.theranica.neriviomigra D STARTED CharacteristicReadOperation(204334072)
2024-09-04 19:03:50.909 12221-12461 [Bluetooth...vity L:118 app.theranica.neriviomigra I MAC='00:A0:50:0D:17:3F' onCharacteristicRead(), status=0, value=[uuid='71387662-eb78-11e6-b006-92361f002671', hexValue=[31, 20, 30, 20, 65, 62, 39, 33, ...]]
2024-09-04 19:03:50.913 12221-13137 [Bluetooth...vity L:119 app.theranica.neriviomigra D FINISHED CharacteristicReadOperation(204334072) in 1938 ms
Further delays in characteristic read/write operations
2024-09-04 19:03:51.901 12221-12461 [Bluetooth...vity L:118 app.theranica.neriviomigra I MAC='00:A0:50:0D:17:3F' onCharacteristicRead(), status=0, value=[uuid='71387662-eb78-11e6-b006-92361f002671', hexValue=[31, 20, 30, 20, 65, 62, 39, 33, ...]]
2024-09-04 19:03:51.903 12221-13137 [Bluetooth...vity L:119 app.theranica.neriviomigra D FINISHED CharacteristicReadOperation(114573011) in 974 ms
Additional context
We are looking for any insights or suggestions from your side that might help us further investigate or work around this issue. If there's any additional information or specific scenarios you need, please let us know.
The text was updated successfully, but these errors were encountered: