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.
Device:
Hi nigelyang,
你是对的,
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.
Br
Yibin