I am currently writing an app which attempts to send some values to my bluetooth LE Device.
Now, everything with the following code goes well until the onCharacteristicWrite
-callback gets called with the status code 253.
This code does not match any error code given in any GATT-android-classes.
vibrateStrengthChar = device.getService(UUID.fromString(
"3dda0001-957f-7d4a-34a6-74696673696d")).getCharacteristic(UUID.fromString(
"3dda0002-957f-7d4a-34a6-74696673696d"));
vibrateStrengthChar.setValue(new byte[]{2, 15, 8, strength});
log(device.writeCharacteristic(vibrateStrengthChar) ? "written." : "error");
Can anyone tell me what that code means and how i could fix that?
The Problem in my case was that the BLE device threw that error, indicating that the handshake was not fully accomplished, so that error is quite device- and application-specific