I am invoking the writeCharacteristic both using the WRITE_TYPE_NO_RESPONSE and without it.Am I supposed to get the response out of both or one or none? Is there any callback to catch this response? Does onReliableWriteCompleted callBack ensures the successful delivery of the Message at the BLE device side(from the Phone) or does it implies that the message has been sent to the device(From the Phone) successfully and has been released in air.
Asked
Active
Viewed 4,139 times
1 Answers
2
If you use the WRITE_TYPE_NO_RESPONSE, you will get the onCharacteristicWrite callback as soon as the stack is ready and has space to accept a new request. This does not mean the other side has received it.
If you don't use WRITE_TYPE_NO_RESPONSE, you will get the onCharacteristicWrite callback as soon as the remote device has sent back a Write Response.
The onReliableWriteCompleted will be called when the remote side has acknowledged everything.

Emil
- 16,784
- 2
- 41
- 52
-
whats the difference between the last two?Both seems same to me unless there is a multiple write. – Raulp Jun 15 '17 at 04:14
-
1You can read about reliable writes in Bluetooth Core specification Volume 3, Part G, Chapter 4.9.5. Basically the peripheral sends the data back to the central that then confirms that it equals what it first sent. Really strange feature according to me, since the packets are already CRC verified over the air. – Emil Jun 15 '17 at 13:22