Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What causes "Error (0x80) GATT NO RESOURCES"?

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?

Parents Reply Children
No Data
Related