COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
bt_hal_gatt_client.h File Reference

BT GATT Client provides the interfaces to use Bluetooth GATT client feature. More...

#include <stdint.h>
#include "bt_hal_gatt_types.h"
#include "bt_hal_manager_types.h"

Go to the source code of this file.

Data Structures

struct  BTGattUnformattedValue_t
 Buffer type for unformatted reads/writes. More...
 
struct  BTGattReadParams_t
 Parameters for GATT read operations. More...
 
struct  BTGattWriteParams_t
 Parameters for GATT write operations. More...
 
struct  BTGattNotifyParams_t
 Parameters for attribute change notifications. More...
 
struct  BTGattTestParams_t
 Parameters for test command interface. More...
 
struct  BTGattClientCallbacks_t
 Represents the BT-GATT client callbacks. More...
 
struct  BTGattClientInterface_t
 Represents the standard BT-GATT client interface. More...
 

Typedefs

typedef void(* BTRegisterClientCallback_t) (BTGattStatus_t xStatus, uint8_t ucClientIf, BTUuid_t *pxAppUuid)
 Callback invoked in response pxRegisterClient when the GATT client registration has been completed.
 
typedef void(* BTSearchCompleteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)
 Callback invoked in response to pxSearchService when the GATT service search has been completed.
 
typedef void(* BTRegisterForNotificationCallback_t) (uint16_t usConnId, bool bRegistered, BTGattStatus_t xStatus, uint16_t usHandle)
 Callback invoked in response to pxRegisterForNotification and pxUnregisterForNotification.
 
typedef void(* BTNotifyCallback_t) (uint16_t usConnId, BTGattNotifyParams_t *pxData)
 Remote device notification callback, invoked when a remote device sends a notification or indication that a client has registered for.
 
typedef void(* BTReadCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)
 Reports result of a GATT read operation. Triggered by pxReadCharacteristic.
 
typedef void(* BTWriteCharacteristicCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)
 GATT write characteristic operation callback. Triggered by pxWriteCharacteristic.
 
typedef void(* BTExecuteWriteCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus)
 GATT execute prepared write callback. Triggered by pxExecuteWrite.
 
typedef void(* BTReadDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, BTGattReadParams_t *pxData)
 Callback invoked in response to pxReadDescriptor.
 
typedef void(* BTWriteDescriptorCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint16_t usHandle)
 Callback invoked in response to pxWriteDescriptor.
 
typedef void(* BTListenCallback_t) (BTGattStatus_t xStatus, uint32_t ulServerIf)
 Callback indicating the status of a listen() operation.
 
typedef void(* BTConfigureMtuCallback_t) (uint16_t usConnId, BTGattStatus_t xStatus, uint32_t ulMtu)
 Callback invoked when the MTU for a given connection changes. Triggered by pxConfigureMtu.
 
typedef void(* BTGetGattDbCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxDb, uint32_t ulCount)
 GATT get database callback. Triggered by pxGetGattDb.
 
typedef void(* BTServicesRemovedCallback_t) (uint16_t usConnId, uint16_t usStartHandle, uint16_t usEndHandle)
 GATT services between startHandle and endHandle were removed.
 
typedef void(* BTServicesAddedCallback_t) (uint16_t usConnId, BTGattDbElement_t *pxAdded, uint32_t ulAddedCount)
 GATT services were added.
 

Enumerations

enum  BTGattcError_t {
  eBTGattcCommandSuccess = 0 , eBTGattcCommandStarted = 1 , eBTGattcCommandBusy = 2 , eBTGattcCommandStored = 3 ,
  eBTGattcNoResources = 4 , eBTGattcModeUnsupported = 5 , eBTGattcIllegalValue = 6 , eBTGattcIncorrectState = 7 ,
  eBTGattcUnknownAddr = 8 , eBTGattcDeviceTimeout = 9 , eBTGattcInvalidControllerOutput = 10 , eBTGattcSecurityError = 11 ,
  eBTGattcDelayedEncryptionCheck = 12 , eBTGattcErrProcessing = 13
}
 BT GATT client error codes. More...
 

Detailed Description

BT GATT Client provides the interfaces to use Bluetooth GATT client feature.

Before calling any GATT client function, the Generic Access Profile needs to be initialized (see bt_hal_manager.h and bt_hal_manager_adapter.h). After GAP has been initialized, pxGattClientInit must be called to register callbacks. After this, pxConnect can be called to connect to a GATT server.