about atts_write_rsp_send func

2 posts / 0 new
Last post
libra_13179
Offline
Last seen:4 years 7 months ago
Joined:2015-06-16 04:43
about atts_write_rsp_send func

hi dialog
1step
@file atts_util.h
/**
****************************************************************************************
* @brief Format the Write Response PDU and send it after receiving a Write Request PDU
* @param[in] conidx Index of the connection with the peer device
* @param[in] atthdl Attribute handle for which to send the response
* @param[in] status ATT error code
****************************************************************************************
*/
空白atts_write_rsp_send (uint8_t conidx uint16_tatthdl, uint8_t status);
2step
call by
static int gattc_write_cmd_ind_handler(ke_msg_id_t const msgid,
struct gattc_write_cmd_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
3step
BLE BOOK
10.6. The Attribute Protocol

The client sends a request to the server to request that the server do something and send back a
response, as depicted in Figure 10–26. A client can send only one request at a time. This reduces the
complexity on the server, reducing the memory requirements, and thereby making it possible to
implement an attribute server using very little code. For each request, there can be only two possible
responses: a response that is directly associated with the request, or an error response that gives
information about why the request failed.

4step
I want to know [atts_write_rsp_send] equivalent to the ATT response of " Figure 10–26. An Attribute Protocol request(Bluetooth Low Energy The Developer-'s Handbook)".
It is right??

Device:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi libra13179,

Hi libra13179,

I dont have this book available at the moment, the response is send every time the client writes a characteristic of the server (except if the command is a write with no response). I suppose that this is what the book implies.

Thanks MT_dialog