nRF5 SDK v16.0.0
Queued Writes
This information applies to the following SoftDevices: S132, S140

Writing to a GATT characteristic can be done in a single write command or in a series of commands. Splitting the write operation into several commands makes it possible to write attribute values that are longer than a single packet. Such a series of write commands, called a Queued Write operation, consists of multiple prepare write commands followed by one execute write command.

The Queued Writes module provides an implementation of Queued Writes, using the Generic Attribute Profile (GATT) Server interface of the SoftDevice. Add this module to your GATT server implementation to enable support for Queued Writes for some or all of the characteristics. A GATT client can then write to these characteristics using a series of commands.

To initialize an instance of the module, call the nrf_ble_qwr_init function. You must provide an initialization structure that contains an error handler, a buffer for storing the received data, and a callback function. Next, call nrf_ble_qwr_attr_register repeatedly to register each characteristic attribute for which you want to enable Queued Writes. Attributes are identified by their handles.

The callback function is used to authorize write requests. When the module receives an execute write request, it calls the callback function with an NRF_BLE_QWR_EVT_AUTH_REQUEST event to determine whether the request should be accepted:


Documentation feedback | Developer Zone | Subscribe | Updated