Verify that a notification was sent at the LL

Notifications are acknowledged at the link layer. How can I check that it is safe to send a new notification? In Figure 68 of RSL10_Firmware_Reference.pdf document it appears that GATT_CMP_EVT status event could be checked.

It is noted in the RW-BLE-GATT-IS.pdf documentation, "It is strongly recommended that the application/upper layer should wait for the GATTC_CMP_EVT of the current GATT request before making additional request. " Are GATT_CMP_EVT and GATTC_CMP_EVT the same thing?

@l-hargrove

I was looking at our example (peripheral_server) and only if KE_MSG_CONSUMED = 0 , that it is safe to send a new notification.

I believe that CEVA has updated their documents and they went from GATT_CMP_EVT to GATTC_CMP_EVT .

int GATTC_CmpEvt(ke_msg_id_t const msg_id,
                 struct gattc_cmp_evt const *param,
                 ke_task_id_t const dest_id, ke_task_id_t const src_id)
{
    /* Retrieve the index of environment structure representing peer device */
    signed int device_indx = Find_Connected_Device_Index(KE_IDX_GET(src_id));

    if (device_indx == INVALID_DEV_IDX)
    {
        return (KE_MSG_CONSUMED);
    }

    if (param->operation == GATTC_NOTIFY)
    {
        if (param->status == GAP_ERR_NO_ERROR ||
            param->status == GAP_ERR_DISCONNECTED)
        {
            cs_env[device_indx].sent_success = true;
        }
    }

    return (KE_MSG_CONSUMED);
}

// Status returned by a task when handling a message
enum ke_msg_status_tag
{
    KE_MSG_CONSUMED = 0, ///< consumed, msg and ext are freed by the kernel
    KE_MSG_NO_FREE,      ///< consumed, nothing is freed by the kernel
    KE_MSG_SAVED,        ///< not consumed, will be pushed in the saved queue
};

Also you can see there is a picture to show this procedure in RSL10 firmware reference document.

Thank you for using our community forum.