BLE Samsung : problems writing to characteristic

443 views Asked by At

I have some simple code that runs fine on Android 4.3 (non samsung). When translating to Samsung's BLE SDK for < 4.3, I find that I can read and be notified but I can't write to my characteristic

BluetoothGattCharacteristic characteristic = mBluetoothGatt.getService(device_, UUID_SERVICE).getCharacteristic(UUID_CHARACTERISTIC);
characteristic.setValue(new byte[]{0x01});
mBluetoothGatt.writeCharacteristic(characteristic);

Any idea what's wrong ? I don't get any error/exception. onCharacteristicWrite is not called either, and when checking with the 4.3 device I see the characteristic hasn't changed.

1

There are 1 answers

3
Thomas On BEST ANSWER

What was wrong : I had to space read and writes more (200 ms seemed to work)