Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 6 Forum Discussions

DaGa_4352226
Level 2
Level 2
10 questions asked 5 replies posted 5 questions asked

Hello Cypress Community

when is  an write  error write_peer generated in the server, should i send also a Cy_BLE_GATTS_WriteRsp to the client? 

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello,

If any write error occurs then the server has to send Error Response to the client using the Cy_BLE_GATTS_SendErrorRsp() API function instead of Cy_BLE_GATTS_WriteRsp(). Cy_BLE_GATTS_SendErrorRsp() function sends an error response to the peer device. The Error Response is used to state that a given request cannot be performed, and to provide the reason as defined in \ref cy_en_ble_gatt_err_code_t.

Please refer to this API in BLE_PDL datasheet for more information (In PSoC Creator, Right click on BLE Component ->Open PDL Documentation).

Thanks,

P Yugandhar.

View solution in original post

0 Likes
1 Reply
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello,

If any write error occurs then the server has to send Error Response to the client using the Cy_BLE_GATTS_SendErrorRsp() API function instead of Cy_BLE_GATTS_WriteRsp(). Cy_BLE_GATTS_SendErrorRsp() function sends an error response to the peer device. The Error Response is used to state that a given request cannot be performed, and to provide the reason as defined in \ref cy_en_ble_gatt_err_code_t.

Please refer to this API in BLE_PDL datasheet for more information (In PSoC Creator, Right click on BLE Component ->Open PDL Documentation).

Thanks,

P Yugandhar.

0 Likes