39 #include "iot_ble_config.h" 282 uint32_t connInterval );
297 BTSecurityLevel_t securityLevel,
429 #if ( IOT_BLE_ADD_CUSTOM_SERVICES == 1 ) 436 void IotBle_AddCustomServicesCb(
void );
440 #if ( IOT_BLE_SET_CUSTOM_ADVERTISEMENT_MSG == 1 ) Definition: iot_ble.h:105
void(* IotBle_PairingStateChanged_t)(BTStatus_t status, BTBdaddr_t *pRemoteBdAddr, BTBondState_t bondstate, BTSecurityLevel_t securityLevel, BTAuthFailureReason_t reason)
Callback invoked when pairing state is changed.
Definition: iot_ble.h:294
IotBle_ConnParameterUpdateRequestCallback_t pConnParameterUpdateRequestCb
Definition: iot_ble.h:335
uint16_t handle
Definition: iot_ble.h:175
BTBondState_t
Definition: bt_hal_manager.h:308
BLE Attribute event.
Definition: iot_ble.h:193
void(* IotBle_NumericComparisonCallback_t)(BTBdaddr_t *pRemoteBdAddr, uint32_t passKey)
Callback invoked on pairing request from remote device.
Definition: iot_ble.h:308
size_t size
Definition: iot_ble.h:213
IotBleExecWriteEventParams_t * pParamExecWrite
Definition: iot_ble.h:199
Parameters for indication sent event.
Definition: iot_ble.h:182
BTStatus_t status
Definition: iot_ble.h:174
BTUuid_t * pUUID2
Definition: iot_ble.h:58
Definition: iot_ble.h:319
Definition: iot_ble.h:320
Definition: iot_ble.h:317
uint16_t offset
Definition: iot_ble.h:136
uint16_t connId
Definition: iot_ble.h:90
IotBleAttributeEventType_t
Attribute event type.
Definition: iot_ble.h:98
Parameters for write executed event.
Definition: iot_ble.h:160
BTBdaddr_t remoteBdAddr
Definition: iot_ble.h:87
uint16_t attrHandle
Definition: iot_ble.h:150
uint32_t maxInterval
Definition: iot_ble.h:54
char * pManufacturerData
Definition: iot_ble.h:55
Declares and implements doubly-linked lists and queues.
uint32_t appearance
Definition: iot_ble.h:52
char * pServiceData
Definition: iot_ble.h:56
uint32_t length
Definition: iot_ble.h:148
uint16_t connId
Definition: iot_ble.h:132
Definition: iot_ble.h:322
uint32_t transId
Definition: iot_ble.h:133
bool needRsp
Definition: iot_ble.h:152
void(* IotBle_MtuChangedCallback_t)(uint16_t connId, uint16_t mtu)
Callback invoked when the MTU for a given connection changes.
Definition: iot_ble.h:238
BTRspErrorStatus_t
Error status sent inside response to a read or write from the client.
Definition: bt_hal_gatt_server.h:53
uint16_t connId
Definition: iot_ble.h:149
BTStatus_t IotBle_RemoveBond(const BTBdaddr_t *pRemoteBdAddr)
Remove a bonded device. Will trigger pBondedCb.
BTStatus_t IotBle_DeleteService(BTService_t *pService)
Delete a local service.
Definition: iot_ble.h:101
Link member placed in structs of a list or queue.
Definition: iot_ble_linear_containers.h:55
IotBleRespConfirmEventParams_t * pParamRespConfirm
Definition: iot_ble.h:200
Definition: iot_ble.h:100
bool execWrite
Definition: iot_ble.h:165
void(* IotBleAttributeEventCallback_t)(IotBleAttributeEvent_t *pEventParam)
Callback called when a request on a attribute is made by the remote device.
Definition: iot_ble.h:122
void(* IotBle_ConnParameterUpdateRequestCallback_t)(BTStatus_t status, const BTBdaddr_t *pRemoteBdAddr, IotBleConnectionParam_t *pConnectionParam, uint32_t connInterval)
Callback invoked on BLE_ConnParameterUpdateRequest from remote device.
Definition: iot_ble.h:279
Definition: iot_ble.h:104
BTStatus_t IotBle_SetStopAdvCallback(IotBle_StopAdvCallback_t pStopAdvCb)
Sets an application defined callback invoked when an advertisement duration has ended or advertisemen...
BTStatus_t IotBle_Init(void)
Starting point. Initialize the BLE stack and its services. It is up to the application to decide when...
BTStatus_t IotBle_ConfirmNumericComparisonKeys(BTBdaddr_t *pBdAddr, bool keyAccepted)
Confirm key for numeric comparison.
Basic info contained in an attribute. This is common to all attributes.
Definition: iot_ble.h:211
uint32_t minInterval
Definition: iot_ble.h:72
BTBdaddr_t * pRemoteBdAddr
Definition: iot_ble.h:163
BTAuthFailureReason_t
Authentication failure reasons.
Definition: bt_hal_manager.h:134
bool isPrep
Definition: iot_ble.h:153
bool isBonded
Definition: iot_ble.h:91
BTStatus_t IotBle_SetDeviceName(const char *pName, size_t length)
Set device name for BLE.
BTStatus_t IotBle_GetConnectionInfo(uint16_t connId, IotBleConnectionInfoListElement_t **pConnectionInfo)
Get connection info for a specific connection ID.
uint16_t attrHandle
Definition: iot_ble.h:135
BTBdaddr_t * pRemoteBdAddr
Definition: iot_ble.h:146
bool includeTxPower
Definition: iot_ble.h:61
uint32_t latency
Definition: iot_ble.h:74
Contains the connection info. Return when requested by IotBleGetConnectionInfoList.
Definition: iot_ble.h:83
uint16_t offset
Definition: iot_ble.h:151
BTStatus_t eventStatus
Definition: iot_ble.h:227
IotBleWriteEventParams_t * pParamWrite
Definition: iot_ble.h:198
IotLink_t clientCharDescrListHead
Definition: iot_ble.h:89
void(* IotBle_StopAdvCallback_t)(BTStatus_t status)
Callback indicating the status of stop advertisement operation. Invoked on BLE_StopAdv.
Definition: iot_ble.h:268
BTStatus_t IotBle_On(void)
Turns on the BLE radio.
IotBleAttributeEventType_t xEventType
Definition: iot_ble.h:203
BTStatus_t IotBle_CreateService(BTService_t *pService, IotBleAttributeEventCallback_t pEventsCallbacks[])
Create a new service.
IotBle_NumericComparisonCallback_t pNumericComparisonCb
Definition: iot_ble.h:336
BTStatus_t IotBle_SendIndication(IotBleEventResponse_t *pResp, uint16_t connId, bool confirm)
Send value indication to a remote device.
void * pvPtr
Definition: iot_ble.h:337
Structure containing all advertisement parameters.
Definition: iot_ble.h:50
BTSecurityLevel_t securityLevel
Definition: iot_ble.h:88
size_t attrDataOffset
Definition: iot_ble.h:226
BLE Event response.
Definition: iot_ble.h:223
BTStatus_t IotBle_ConnParameterUpdateRequest(const BTBdaddr_t *pRemoteBdAddr, IotBleConnectionParam_t *pConnectionParam)
Request an update of the connection parameters.
uint32_t timeout
Definition: iot_ble.h:75
uint32_t minInterval
Definition: iot_ble.h:53
uint16_t serviceDataLen
Definition: iot_ble.h:60
void(* IotBle_StartAdvCallback_t)(BTStatus_t status)
Callback indicating the status of start advertisement operation. Invoked on BLE_StartAdv.
Definition: iot_ble.h:260
UUID.
Definition: bt_hal_manager_types.h:83
BTStatus_t IotBle_UnRegisterEventCb(IotBleEvents_t event, IotBleEventsCallbacks_t bleEventsCallbacks)
Remove a subscription to an event. Note: API should not be invoked from within the event callback...
T HAL provides the standard defintions used by BT GATT interfaces.
BTBdaddr_t * pRemoteBdAddr
Definition: iot_ble.h:134
Advertising Name Format.
Definition: bt_hal_manager_adapter_ble.h:100
IotLink_t connectionList
Definition: iot_ble.h:85
uint16_t connId
Definition: iot_ble.h:185
uint8_t * pValue
Definition: iot_ble.h:147
IotBleIndicationSentEventParams_t * pParamIndicationSent
Definition: iot_ble.h:201
BTRspErrorStatus_t rspErrorStatus
Definition: iot_ble.h:228
uint8_t * pData
Definition: iot_ble.h:214
size_t handle
Definition: iot_ble.h:216
IotBleEvents_t
enum listing all the BLE events (not directly triggered by a function call)
Definition: iot_ble.h:315
BTUuid_t uuid
Definition: iot_ble.h:215
Definition: iot_ble.h:318
IotBleAttributeData_t * pAttrData
Definition: iot_ble.h:225
uint32_t transId
Definition: iot_ble.h:162
BTGattAdvName_t name
Definition: iot_ble.h:62
Parameters for read event.
Definition: iot_ble.h:130
BTStatus_t
Bluetooth Error Status .
Definition: bt_hal_manager_types.h:97
uint32_t transId
Definition: iot_ble.h:145
BTAttribute_t * pAttribute
Definition: iot_ble.h:184
IotBle_MtuChangedCallback_t pMtuChangedCb
Definition: iot_ble.h:332
Connection parameters.
Definition: iot_ble.h:70
Parameters for write event.
Definition: iot_ble.h:143
BTStatus_t status
Definition: iot_ble.h:186
BTStatus_t IotBle_Off(void)
Turns off the BLE radio.
uint32_t maxInterval
Definition: iot_ble.h:73
BTStatus_t IotBle_StartAdv(IotBle_StartAdvCallback_t pStartAdvCb)
Start advertisements to listen for incoming connections. Triggers IotBle_StartAdvCallback_t.
IotBle_PairingStateChanged_t pGAPPairingStateChangedCb
Definition: iot_ble.h:334
IotBleReadEventParams_t * pParamRead
Definition: iot_ble.h:197
BLE events not directly triggered by a function call. Most of them are triggered by a remote device m...
Definition: iot_ble.h:330
Definition: iot_ble.h:102
BT/BLE address.
Definition: bt_hal_manager_types.h:66
Definition: iot_ble.h:103
uint16_t connId
Definition: iot_ble.h:164
void(* IotBle_ConnectionCallback_t)(BTStatus_t status, uint16_t connId, bool connected, BTBdaddr_t *pRemoteBdAddr)
Callback indicating that a remote device has connected or been disconnected.
Definition: iot_ble.h:249
bool setScanRsp
Definition: iot_ble.h:63
uint16_t manufacturerLen
Definition: iot_ble.h:59
BTStatus_t IotBle_SendResponse(IotBleEventResponse_t *pResp, uint16_t connId, uint32_t transId)
Send response to the remote device.
Definition: iot_ble.h:321
Parameters for confirmation response event.
Definition: iot_ble.h:172
IotBleConnectionParam_t connectionParams
Definition: iot_ble.h:86
BT GATT Server provides the interfaces to use Bluetooth GATT server feature.
Generic BLE attribute.
Definition: bt_hal_gatt_types.h:233
IotBle_ConnectionCallback_t pConnectionCb
Definition: iot_ble.h:333
BTUuid_t * pUUID1
Definition: iot_ble.h:57
BTStatus_t IotBle_RegisterEventCb(IotBleEvents_t event, IotBleEventsCallbacks_t bleEventsCallbacks)
Used to route event to whatever service requests it.
BTStatus_t IotBle_GetConnectionInfoList(IotLink_t **pConnectionInfoList)
Send response to the remote device.
BTStatus_t IotBle_StopAdv(IotBle_StopAdvCallback_t pStopAdvCb)
Stop advertisements to listen for incoming connections. Triggers IotBle_StopAdvCallback_t.