This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Write without response client example

I'm writing the client-side code for the Nordic DFU service and according to the spec, the DFU packet characteristic uses Write Without Request. Are there any examples of client code for services that use Write Without Request? Particularly, I'm having trouble understanding what the SDK documentation means when it says that WWR "consume[s] an application buffer" while Write (without response) does not.

developer.nordicsemi.com/.../a01052.html

For reference, I'm using SoftDevice S110 with SDK v8.0.0

Thanks.

  • The NUS central example in our SDK (SDK10 and newer) uses write without request (write command). See inside the ble_nus_c_string_send function in ble_nus_c.c.

    If your hardware supports it i recommend using the newest SDK and softdevice.

    I understand that the part about the buffers is confusing. It is actually about internal buffer in the softdevice, and is not something the user needs to think about. The main difference between the two is that the write command does not need an application level acknowledgement before sending the next packet. It can send a lot of packets each connection interval, while a write request can only send one packet each interval. This is because the peripheral must approve the request before a new one can be sent. This approval can be done the earliest on the next connection interval.

    The write command offers better throughput, and that is why it is used in applications where you send a lot of data (like in OTA DFU).

    -Anders

Related