1 Reply Latest reply on Nov 6, 2018 10:28 AM by PY_21

    BLE Server behavior for Read Characteristic Value

      Hello,

       

      1) About response for ignoring

      When client require Read Characteristic Value, although PSoC6 server automatically send value without any application opperation, what error should I respond in case I would like to ignore the request?

       

      2) Timing to response data from Server

      When client require Read Characteristic Value, a event is trrigerd by the server side and the server send response.

      When does the response happen?

       

      is it when event happen?

      is it when the event is released?

       

      Best regards,

        • 1. Re: BLE Server behavior for Read Characteristic Value
          PY_21

          Hello,

           

          1. If we want to ignore the read request we can send error response to the client using the API Cy_BLE_GATTS_SendErrorRsp() in the server sideThis  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 type cy_en_ble_gatt_err_code_t. we can use any of valid GATT error codes. Please refer the API in the BLE component datasheet for more information.

          2. In the server, we have to continuously process the events(using Cy_BLE_ProcessEvents()). As soon as the read request event happens the server will send read response to the client.

           

           

          Thanks,

          P Yugandhar.