GATT Client and Server Functions¶
-
group
group_ble_common_api_gatt_functions
These are APIs common to both GATT Client role and GATT Server role.
You may use them in either roles.
No letter is appended to the API name: Cy_BLE_GATT_
Defines
-
Cy_BLE_GATT_GetBusyStatus
(attId)¶ This function returns a status of the BLE Stack (busy or not busy).
The status is changed after the CY_BLE_EVT_STACK_BUSY_STATUS event.
- Parameters
attId – Identifies the active ATT connection Instance.
- Returns
uint8_t: The busy status.
CY_BLE_STACK_STATE_BUSY - The BLE Stack is busy.
CY_BLE_STACK_STATE_FREE - The BLE Stack is not busy.
Functions
-
cy_en_ble_api_result_t
Cy_BLE_GATT_GetMtuSize
(cy_stc_ble_gatt_xchg_mtu_param_t *param)¶ This function provides the GATT MTU size used by BLE Stack.
If this function is called after the GATT MTU Exchange procedure, it will provide the negotiated MTU size (Minimum(Server Rx MTU, Client Rx MTU)), or else it will provide the default MTU size (23 bytes). This is a blocking function. No event is generated on calling this function.
Errors codes
Description
CY_BLE_SUCCESS
On successful operation
CY_BLE_ERROR_INVALID_PARAMETER
If a NULL or an invalid connection handle was passed
- Parameters
param – A pointer of type ‘cy_stc_ble_gatt_xchg_mtu_param_t
’. param->connHandle: input parameter
param->mtu: output parameter
- Returns
cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. Following are the possible error codes.
-