Issue: After setting MTU>23 on Samsung Device (S10e) running Android 10 and writing data to a characteristic the connection times-out and is closed.
Root cause: The reason for the timeout is the phone hardware is not actually sending anything...so the end device does not respond(ack).
How do I know it’s not an end device issue: This problem does not occur with other devices (pixel) and is also doesn’t occur on the S10 if it’s running Android 9.
Details: We are using requestMtu in BluetoothGatt to change the MTU to 185, and then onMtuChanged return mtu value is 185 and status Is GATT_SUCCESS. When we send the longer message which is about 40 bytes, the return value of writeCharacteristic of BluetoothGatt is true, but the onCharacteristicWrite callback will give us a 133 status code, which is not GATT_SUCCESS. Then the devices will disconnect.
Why do I need a larger MTU: What we expect is to be able to use a bigger MTU so that we can send data to end-device to provision Wi-Fi credentials. The end device was built to only accept the credentials all at one time(assumes MTU>23 wouldn’t be an issue. So we have field devices that customers can’t use.
Question: Is there any ideas or workaround that we can try?
Phone info: Samsung s10e Os: Android 10 Android security patch: March 1, 2020
End-Device info: ESP32