Open justinfriberg opened 2 months ago
Change the MTU to 512 and test again to see if this issue is resolved.
Same behavior with MTU at 512.
I just noticed that even though the request was 512, the response indicated it's still at 517:
D/BluetoothGatt(13764): configureMTU() - device: XX:XX:XX:XX:4E:32 mtu: 512
D/BluetoothGatt(13764): onConfigureMTU() - Device=E0:5A:1B:C6:4E:32 mtu=517 status=0
I just noticed that even though the request was 512, the response indicated it's still at 517:
D/BluetoothGatt(13764): configureMTU() - device: XX:XX:XX:XX:4E:32 mtu: 512 D/BluetoothGatt(13764): onConfigureMTU() - Device=E0:5A:1B:C6:4E:32 mtu=517 status=0
I think you should check if there are issues on the peripheral side. You can use other debug tools like nrf connect to check this.
Will try to get the nrf connect tool running, but wasn't immediately able to get it to load.
It's odd that it works properly on iOS - is your suggestion of checking the peripheral side a MTU failure request? This size issue seems to be due to Android: https://developer.android.com/about/versions/14/behavior-changes-all#mtu-set-to-517.
Will try to get the nrf connect tool running, but wasn't immediately able to get it to load.
It's odd that it works properly on iOS - is your suggestion of checking the peripheral side a MTU failure request? This size issue seems to be due to Android: https://developer.android.com/about/versions/14/behavior-changes-all#mtu-set-to-517.
Yes, as the doc said, this issue maybe caused by the peripheral doesn't negotiate the MTU correctly.
Note: This change doesn't have an impact unless the peripheral device isn't handling the MTU negotiation properly and accepting any MTU size even if it doesn't support it. In such cases, it could cause issues when your app sends large amounts of data from Android 14 devices.
This issue is stale because it has been open for 30 days with no activity.
We're observing a BLE GNSS device notification characteristic that returns a chunk of data every second. This data is generally larger than the MTU (over 514 bytes). On iOS, we get notified each time an MTU chunk is reached. On Android, we only get partial amount, which appears to be the size of whatever is in the last chunk (decoding the bytes bears this out). Not seeing any configuration outside of the requestMTU call to fix this.
Code:
Android:
iOS: