I send a sequence of characteristic writes to my device, in code based on the nRF Toolbox. Sometimes I see this error message. Why does it happen and what steps can I take to avoid it?
More specifically: who lacks resources: the phone or the device?
I am using this kind of code:
writeCharacteristic(<characteristic>, <data>)
.with((device, data) -> log(LogContract.Log.Level.APPLICATION, <message_ok>))
.fail((device, status) -> log(LogContract.Log.Level.APPLICATION, "error " + status ))
.enqueue();
and the error message is printed immediately after the code in the .fail() callback (which prints "error 128" - the same value). If I see the fail() callback then the with() callback is not called, and the "Data written to..." message that comes from BleManager onCharacteristicWriteSafe() is not printed.
Also - is there any documentation on the usage of this writeCharacteristic().with().fail().enqueue() construction?