Difference between write and write no response

Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Last seen: 3 weeks 14 hours ago
Joined: 2018-03-20 08:24
Difference between write and write no response

hi Dialog,

    I am curious about the response handling for the two cases "GATT_PROP_WRITE" and "GATT_PROP_WRITE_NO_RESP".  They both seem to use ble_gatts_write_cfm() to response the write request according to the desciption of ble_gatts_write_cfm().  I think the case of "GATT_PROP_WRITE_NO_RESP" should not use ble_gatts_write_cfm() to do a response to client, does it? Or "GATT_PROP_WRITE" should use ble_gatts_write_cfm() twice, and "GATT_PROP_WRITE" just use one. How to handle "with response"  and "without response" in coding? 

 thanks for your help. 


Last seen: 1 year 10 months ago
Joined: 2017-12-14 02:48
Hi nigelyang,

Hi nigelyang,


You are right,

server don't have to pespond to the client when it received a gatt_write_no_rsp event. 

But for gatt_write event, the response is needed, so that you should call the ble_gatts_write_cfm() function to do so.