1 Reply Latest reply on Nov 12, 2020 10:38 AM by PY_21

    Is there a way to know when the BLE actually does a notification?

    EyGe_3183606

      Hi,

       

      I have PSOC 4.

       

      My question is if there is a way to know when the BLE actually does a notification?

      I mean, currently, the function CyBle_GattsNotification is non blocking which means that when the function returns it does not mean that a notification was actually sent.

       

      That means that even if I get CYBLE_ERROR_OK returned, I don't know that the notification actually occurred.

      Is there a way (like in case of broadcast) to assign a callback function to get an interrupt once the notification is sent so that I know it was sent and when it was sent?

       

      Thanks

        • 1. Re: Is there a way to know when the BLE actually does a notification?
          PY_21

          Hello EyGe_3183606 ,

           

          As per the BLE specification, BLE Data packets sent through BLE notification are not acknowledged in the application layer. When you use notifications, there will not be any acknowledgment in the application layer, but there will be acknowledgment in the link layer. This means that when the peer sends the packets, the next packet will not be sent unless the sender receives an acknowledgement at the link layer. This ensures that there are no missing packets.

          For acknowledgement, you can use Indication instead of Notification. For indication, the sender will call the API CyBle_GattsIndication() api and at the GATT Client's end CYBLE_EVT_GATTC_HANDLE_VALUE_IND event will be received. The client should respond back to the server when the data is received by calling an API CyBle_GattcConfirmation(). This function call results in CYBLE_EVT_GATTS_HANDLE_VALUE_CNF event at the GATT Server's end.

           

          Thanks,
          P Yugandhar.

          1 of 1 people found this helpful