nRF5 SDK v12.1.0
Experimental: Queued Writes Application
This example requires one of the following SoftDevices: S130, S132

Important: Before you run this example, make sure to program the SoftDevice.

The Queued Writes Application is an example that demonstrates the use of Queued Writes. It covers the GATT prepare write and execute write operations. The example uses a proprietary Queued Write Service with a single characteristic that supports reliable write operations. The service uses the Queued Writes module to handle prepare and execute write operations.

Before validating that writes have been executed, the service calls the application with the received data. The example application rejects the write operation if the first byte of the received data is 0, and accepts it otherwise.

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ble_peripheral\experimental_ble_app_queued_writes

Testing

Test the Queued Writes Application with the Master Control Panel by performing the following steps:

  1. Compile and program the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  2. Connect to the device from Master Control Panel (the device will be advertising as 'Queued_Write'), then perform service discovery. Observe that the BSP_INDICATE_CONNECTED state is indicated.
  3. In the UART over BLE service, select the UUID:0002 characteristic (No values read). In the value field, put a hexadecimal value starting with 0x00 (for example, 0001020304050607080910111213141516171819202122232425). Click the Write long button.
  4. In the log pane, observe that the write operation is rejected with the error code INSUFFICIENT AUTHORIZATION.
  5. Perform another write long operation on the same characteristic with a first byte that is not zero (for example, 4201020304050607080910111213141516171819202122232425).
  6. Observe that the write is accepted.

Documentation feedback | Developer Zone | Subscribe | Updated