1 Reply Latest reply on Sep 15, 2019 6:39 AM by PY_21

    Should the server send a Cy_BLE_GATTS_WriteRsp if was an error?

    DaGa_4352226

      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? 

        • 1. Re: Should the server send a Cy_BLE_GATTS_WriteRsp if was an error?
          PY_21

          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.