FreeRTOS: BLE
BLE
Return to main page ↑
BTGattClientInterface_t Struct Reference

#include <bt_hal_gatt_client.h>

Data Fields

BTStatus_t(* pxRegisterClient )(BTUuid_t *pxUuid)
 Registers a GATT client application with the stack. Triggers BTRegisterClientCallback_t. More...
 
BTStatus_t(* pxUnregisterClient )(uint8_t ucClientIf)
 Unregister a client application from the stack. This api does not trigger a callback. More...
 
BTStatus_t(* pxGattClientInit )(const BTGattClientCallbacks_t *pxCallbacks)
 Initializes the interface and provides callback routines. This api does not trigger a callback. More...
 
BTStatus_t(* pxConnect )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, bool bIsDirect, BTTransport_t xTransport)
 Create a connection to a remote LE or dual-mode device. Triggers BTConnectCallback_t. More...
 
BTStatus_t(* pxDisconnect )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usConnId)
 Disconnect a remote device or cancel a pending connection. Triggers BTDisconnectCallback_t. More...
 
BTStatus_t(* pxRefresh )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr)
 Clear the attribute cache for a given device. This API does not trigger a callback. More...
 
BTStatus_t(* pxSearchService )(uint16_t usConnId, BTUuid_t *pxFilterUuid)
 Enumerate all GATT services on a connected device. Optionally, the results can be filtered for a given UUID. Triggers BTSearchCompleteCallback_t. More...
 
BTStatus_t(* pxReadCharacteristic )(uint16_t usConnId, uint16_t usHandle, uint32_t ulAuthReq)
 Read a characteristic on a remote device. Triggers BTReadCharacteristicCallback_t. More...
 
BTStatus_t(* pxWriteCharacteristic )(uint16_t usConnId, uint16_t usHandle, BTAttrWriteRequests_t xWriteType, size_t xLen, uint32_t ulAuthReq, char *pcValue)
 Write a characteristic on a remote device. Triggers BTWriteCharacteristicCallback_t. More...
 
BTStatus_t(* pxReadDescriptor )(uint16_t usConnId, uint16_t usHandle, uint32_t ulAuthReq)
 Read the descriptor for a given characteristic on a remote device. Triggers BTReadDescriptorCallback_t. More...
 
BTStatus_t(* pxWriteDescriptor )(uint16_t usConnId, uint16_t usHandle, BTAttrWriteRequests_t xWriteType, size_t xLen, uint32_t ulAuthReq, char *pcValue)
 Write a remote descriptor for a given characteristic on a remote device. Triggers BTWriteDescriptorCallback_t. More...
 
BTStatus_t(* pxExecuteWrite )(uint16_t usConnId, bool bExecute)
 Execute (or abort) a prepared write operation. Triggers BTExecuteWriteCallback_t. More...
 
BTStatus_t(* pxRegisterForNotification )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usHandle)
 Register to receive notifications or indications for a given characteristic. Triggers BTRegisterForNotificationCallback_t. More...
 
BTStatus_t(* pxUnregisterForNotification )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usHandle)
 Deregister a previous request for notifications/indications. Triggers BTRegisterForNotificationCallback_t. More...
 
BTStatus_t(* pxReadRemoteRssi )(uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr)
 Request RSSI for a given remote device. Triggers BTReadRemoteRssiCallback_t in found in bt_hal_gatt_types.h. More...
 
BTTransport_t(* pxGetDeviceType )(const BTBdaddr_t *pxBdAddr)
 Determine the type of the remote device (LE, BR/EDR, Dual-mode). This api does not trigger a callback. More...
 
BTStatus_t(* pxConfigureMtu )(uint16_t usConnId, uint16_t usMtu)
 Configure the MTU for a given connection. Triggers BTConfigureMtuCallback_t. More...
 
BTStatus_t(* pxTestCommand )(uint32_t ulCommand, BTGattTestParams_t *pxParams)
 Test mode interface. More...
 
BTStatus_t(* pxGetGattDb )(uint16_t usConnId)
 Get gatt db content. Triggers BTGetGattDbCallback_t. More...
 

Detailed Description

Represents the standard BT-GATT client interface.

Field Documentation

◆ pxRegisterClient

BTStatus_t( * BTGattClientInterface_t::pxRegisterClient) (BTUuid_t *pxUuid)

Registers a GATT client application with the stack. Triggers BTRegisterClientCallback_t.

Parameters
[in]pxUuidServer UUID.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxUnregisterClient

BTStatus_t( * BTGattClientInterface_t::pxUnregisterClient) (uint8_t ucClientIf)

Unregister a client application from the stack. This api does not trigger a callback.

Parameters
[in]ucClientIfClient interface, returned on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxGattClientInit

BTStatus_t( * BTGattClientInterface_t::pxGattClientInit) (const BTGattClientCallbacks_t *pxCallbacks)

Initializes the interface and provides callback routines. This api does not trigger a callback.

Parameters
[in]pxCallbacksInitialized callbacks for GATT client.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxConnect

BTStatus_t( * BTGattClientInterface_t::pxConnect) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, bool bIsDirect, BTTransport_t xTransport)

Create a connection to a remote LE or dual-mode device. Triggers BTConnectCallback_t.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
[in]bIsDirectSet to True for direct connection.
[in]xTransportSpecify if BLE or BT classic is being used.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxDisconnect

BTStatus_t( * BTGattClientInterface_t::pxDisconnect) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usConnId)

Disconnect a remote device or cancel a pending connection. Triggers BTDisconnectCallback_t.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectCallback_t is invoked.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxRefresh

BTStatus_t( * BTGattClientInterface_t::pxRefresh) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr)

Clear the attribute cache for a given device. This API does not trigger a callback.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxSearchService

BTStatus_t( * BTGattClientInterface_t::pxSearchService) (uint16_t usConnId, BTUuid_t *pxFilterUuid)

Enumerate all GATT services on a connected device. Optionally, the results can be filtered for a given UUID. Triggers BTSearchCompleteCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]pxFilterUuidFilter UUID, if set will filter by UUID. If set to NULL, no filtering will occur.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxReadCharacteristic

BTStatus_t( * BTGattClientInterface_t::pxReadCharacteristic) (uint16_t usConnId, uint16_t usHandle, uint32_t ulAuthReq)

Read a characteristic on a remote device. Triggers BTReadCharacteristicCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usHandleHandle of the characteristic to be read.
[in]ulAuthReqAuthentication requirement.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxWriteCharacteristic

BTStatus_t( * BTGattClientInterface_t::pxWriteCharacteristic) (uint16_t usConnId, uint16_t usHandle, BTAttrWriteRequests_t xWriteType, size_t xLen, uint32_t ulAuthReq, char *pcValue)

Write a characteristic on a remote device. Triggers BTWriteCharacteristicCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usHandleHandle of the characteristic to be written.
[in]xWriteTypeWrite request type.
[in]xLenData length of data to be written to characteristic attribute.
[in]ulAuthReqAuthentication requirement.
[in]pcValueData to be written to characteristic attribute.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxReadDescriptor

BTStatus_t( * BTGattClientInterface_t::pxReadDescriptor) (uint16_t usConnId, uint16_t usHandle, uint32_t ulAuthReq)

Read the descriptor for a given characteristic on a remote device. Triggers BTReadDescriptorCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usHandleHandle of the descriptor to be read.
[in]ulAuthReqAuthentication requirement.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxWriteDescriptor

BTStatus_t( * BTGattClientInterface_t::pxWriteDescriptor) (uint16_t usConnId, uint16_t usHandle, BTAttrWriteRequests_t xWriteType, size_t xLen, uint32_t ulAuthReq, char *pcValue)

Write a remote descriptor for a given characteristic on a remote device. Triggers BTWriteDescriptorCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usHandleHandle of the descriptor to be read.
[in]xWriteTypeWrite request type.
[in]xLenData length of data to be written to descriptor attribute.
[in]ulAuthReqAuthentication requirement.
[in]pcValueData to be written to descriptor attribute.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxExecuteWrite

BTStatus_t( * BTGattClientInterface_t::pxExecuteWrite) (uint16_t usConnId, bool bExecute)

Execute (or abort) a prepared write operation. Triggers BTExecuteWriteCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]bExecuteIf set to True, will execute the prepared write. If set to false, will abort prepared write.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxRegisterForNotification

BTStatus_t( * BTGattClientInterface_t::pxRegisterForNotification) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usHandle)

Register to receive notifications or indications for a given characteristic. Triggers BTRegisterForNotificationCallback_t.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
[in]usHandleHandle number of attribute registered for notifications.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxUnregisterForNotification

BTStatus_t( * BTGattClientInterface_t::pxUnregisterForNotification) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr, uint16_t usHandle)

Deregister a previous request for notifications/indications. Triggers BTRegisterForNotificationCallback_t.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
[in]usHandleHandle number of attribute deregistered for notifications.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxReadRemoteRssi

BTStatus_t( * BTGattClientInterface_t::pxReadRemoteRssi) (uint8_t ucClientIf, const BTBdaddr_t *pxBdAddr)

Request RSSI for a given remote device. Triggers BTReadRemoteRssiCallback_t in found in bt_hal_gatt_types.h.

Parameters
[in]ucClientIfClient interface, return on the callback BTRegisterClientCallback_t after successful pxRegisterClient call.
[in]pxBdAddrAddress of the Remote device.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxGetDeviceType

BTTransport_t( * BTGattClientInterface_t::pxGetDeviceType) (const BTBdaddr_t *pxBdAddr)

Determine the type of the remote device (LE, BR/EDR, Dual-mode). This api does not trigger a callback.

Parameters
[in]pxBdAddrAddress of the Remote device.
Returns
Returns eBTStatusSuccess on successful call.

◆ pxConfigureMtu

BTStatus_t( * BTGattClientInterface_t::pxConfigureMtu) (uint16_t usConnId, uint16_t usMtu)

Configure the MTU for a given connection. Triggers BTConfigureMtuCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
[in]usMtuMTU size.
Returns
returns eBTStatusSuccess if operation succeeded.

◆ pxTestCommand

BTStatus_t( * BTGattClientInterface_t::pxTestCommand) (uint32_t ulCommand, BTGattTestParams_t *pxParams)

Test mode interface.

Parameters
[in]ulCommandTest command to be executed.
[in]pxParamsParameters for test command interface.
Returns
returns eBTStatusSuccess if operation succeeded.

◆ pxGetGattDb

BTStatus_t( * BTGattClientInterface_t::pxGetGattDb) (uint16_t usConnId)

Get gatt db content. Triggers BTGetGattDbCallback_t.

Parameters
[in]usConnIdConnection Identifier, created and returned on connection event, when BTConnectionCallback_t is invoked.
Returns
returns eBTStatusSuccess if operation succeeded.

The documentation for this struct was generated from the following file: