I'm developing a BLE central application (server) and testing it on my Samsung Galaxy S8. The application was working before my phone decided to update (from 7.1.0 to 8.0.0).
I'm doing a standard read from a known characteristic / service. The device is connecting properly in the function
public void onConnectionStateChange(final BluetoothGatt gatt, int status, int newState)
and the expected service appears in the function
public void onServicesDiscovered(final BluetoothGatt gatt, int status)
. In both of these callbacks, status
is equal to 0. So everything seems like it is working until I call
gatt.readCharacteristic(characteristic);
from the onServicesDiscovered
callback, after which there is a long pause and then a call to
public void onCharacteristicRead(final BluetoothGatt gatt, final BluetoothGattCharacteristic characteristic, int status)
with status equal to 133 and "null" when I check the characteristic's value with Log.d("DEBUG", "" + characteristic.getStringValue(0));
. characteristic.getValue()
is also returning null.
The strangest thing is that this code was all working successfully before the update. (I've copied the BLE code into a new project now to isolate it, and believe that I've copied the appropriate permissions from the original project.)
What would cause error 133 in this particular callback? I can't seem to find 133 in the documentation (https://developer.android.com/reference/android/bluetooth/BluetoothGatt), so even just help interpreting the error would be a good step.