in amazonfreertossdk/src/main/java/software/amazon/freertos/amazonfreertossdk/AmazonFreeRTOSDevice.java [1226:1243]
private boolean writeCharacteristic(final String serviceUuid, final String characteristicUuid, final byte[] value) {
BluetoothGattCharacteristic characteristic = getCharacteristic(serviceUuid, characteristicUuid);
if (characteristic != null) {
characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT);
Log.d(TAG, "<-<-<- Writing to characteristic: " + uuidToName.get(characteristicUuid)
+ " with data: " + bytesToHexString(value));
mValueWritten = value;
characteristic.setValue(value);
if (!mBluetoothGatt.writeCharacteristic(characteristic)) {
mRWinProgress = false;
Log.e(TAG, "Failed to write characteristic.");
} else {
mRWinProgress = true;
return true;
}
}
return false;
}