BT GATT Server provides the interfaces to use Bluetooth GATT server feature. More...
#include "bt_hal_gatt_types.h"
Go to the source code of this file.
Data Structures | |
struct | BTGattValue_t |
GATT value type used in response to remote read/Write requests. More... | |
union | BTGattResponse_t |
GATT response to read and write. More... | |
struct | BTGattServerCallbacks_t |
Callback structure for GATT server. More... | |
struct | BTGattServerInterface_t |
Represents the standard BT-GATT server interface. More... | |
Typedefs | |
typedef void(* | BTRegisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxAppUuid) |
Callback invoked in response to pxRegisterServer. | |
typedef void(* | BTUnregisterServerCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf) |
Callback invoked in response to pxUnregisterServer. | |
typedef void(* | BTConnectionCallback_t) (uint16_t usConnId, uint8_t ucServerIf, bool bConnected, BTBdaddr_t *pxBda) |
Callback invoked on a connection event. | |
typedef void(* | BTServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTGattSrvcId_t *pxSrvcId, uint16_t usServiceHandle) |
Callback invoked in response to pxAddService. | |
typedef void(* | BTIncludedServiceAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle, uint16_t usInclSrvcHandle) |
Callback invoked in response to pxAddIncludedService. | |
typedef void(* | BTCharacteristicAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usCharHandle) |
Callback invoked in response to pxAddCharacteristic. | |
typedef void(* | BTSetValCallback_t) (BTStatus_t xStatus, uint16_t usAttrHandle) |
Callback invoked in response to pxSetVal. | |
typedef void(* | BTDescriptorAddedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, BTUuid_t *pxUuid, uint16_t usServiceHandle, uint16_t usDescrHandle) |
Callback invoked in response to pxAddDescriptor. | |
typedef void(* | BTServiceStartedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStartService. | |
typedef void(* | BTServiceStoppedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxStopService. | |
typedef void(* | BTServiceDeletedCallback_t) (BTStatus_t xStatus, uint8_t ucServerIf, uint16_t usServiceHandle) |
Callback invoked in response to pxDeleteService. | |
typedef void(* | BTRequestReadCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset) |
Callback invoked on read event. | |
typedef void(* | BTRequestWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, uint16_t usAttrHandle, uint16_t usOffset, size_t xLength, bool bNeedRsp, bool bIsPrep, uint8_t *pucValue) |
Callback invoked on write event. | |
typedef void(* | BTRequestExecWriteCallback_t) (uint16_t usConnId, uint32_t ulTransId, BTBdaddr_t *pxBda, bool bExecWrite) |
Callback invoked on execute write event. | |
typedef void(* | BTResponseConfirmationCallback_t) (BTStatus_t xStatus, uint16_t usHandle) |
Callback triggered in response to sendResponse if the remote device sends a confirmation. | |
typedef void(* | BTIndicationSentCallback_t) (uint16_t usConnId, BTStatus_t xStatus) |
Callback on confirmation device from the remote device to an indication. Or confirm a Notification as been sent. | |
typedef void(* | BTMtuChangedCallback_t) (uint16_t usConnId, uint16_t usMtu) |
Callback invoked when the MTU for a given connection changes. | |
typedef void(* | BTWhiteListChangedCallback_t) (const BTBdaddr_t *pxBdAddr, bool bIsAdded) |
Callback for notifying modification in white list. | |
Enumerations | |
enum | BTRspErrorStatus_t { eBTRspErrorNone = 0 , eBTRspErrorNo_mitm = 1 , eBTRspErrorMitm = 2 , eBTRspErrorSignedNoMitm = 3 , eBTRspErrorSignedMitm = 4 } |
Error status sent inside response to a read or write from the client. More... | |
BT GATT Server provides the interfaces to use Bluetooth GATT server feature.
Before calling any GATT server function, the Generic Access Profile needs to be initialized (see bt_hal_manager.h and bt_hal_manager_adapter*.h). bt_hal_manager.h give the starting point. After GAP has been initialized, the functions need to be called in that order: