COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
Bluetooth Device Management Callbacks

Callbacks for Bluetooth Device Management Interface. More...

Typedefs

typedef void(* BTDeviceStateChangedCallback_t) (BTState_t xState)
 Bluetooth state change Callback. Invoked on pxEnable/pxDisable.
 
typedef void(* BTDevicePropertiesCallback_t) (BTStatus_t xStatus, uint32_t ulNumProperties, BTProperty_t *pxProperties)
 GET/SET local device Properties callback.
 
typedef void(* BTRemoteDevicePropertiesCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxBdAddr, uint32_t ulNumProperties, BTProperty_t *pxProperties)
 GET/SET Remote Device Properties callback. Invoked on pxGetRemoteDeviceProperty, pxSetRemoteDeviceProperty, pxGetAllRemoteDeviceProperties.
 
typedef void(* BTPinRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxBdName, uint32_t ulCod, uint8_t ucMin16Digit)
 Callback Invoked on Pin Request.
 
typedef void(* BTSspRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxRemoteBdName, uint32_t ulCod, BTSspVariant_t xPairingVariant, uint32_t ulPassKey)
 Callback Invoked on SSP event.
 
typedef void(* BTPairingStateChangedCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, BTBondState_t xState, BTSecurityLevel_t xSecurityLevel, BTAuthFailureReason_t xReason)
 Bluetooth pairing state changed event callback. Invoked in response to create_bond, cancel_bond or remove_bond reason field is valid only in case of xStatus == eBTStatusFail. Invoked on pairing event.
 
typedef void(* BTEnergyInfoCallback_t) (BTActivityEnergyInfo *pxEnergyInfo, BTUidTraffic_t *pxUidData)
 Callback invoked on pxReadEnergyInfo. Invoked on pxReadEnergyInfo.
 
typedef void(* BTDutModeRecvCallback_t) (uint16_t usOpcode, uint8_t *pucBuf, size_t xLen)
 Bluetooth Test Mode Callback. Invoked when remote device uses pxDutModeSend.
 
typedef void(* BTLeTestModeCallback_t) (BTStatus_t xStatus, uint16_t usNumPackets)
 LE Test mode callbacks. Invoked on pxLeTestMode.
 
typedef void(* BTReadRssiCallback_t) (BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)
 Read RSSI Callback. Invoked on pxReadRssi.
 
typedef void(* BTSlaveSecurityRequestCallBack_t) (BTBdaddr_t *pxBda, BTSecurityLevel_t xSecurityLevel, bool bBonding)
 Security request callback. Invoked on master from remote slave security request event.
 
typedef void(* BTTxPowerCallback_t) (BTBdaddr_t *pxBda, BTTransport_t xTransport, uint8_t ucTxPowerValue, BTStatus_t xStatus)
 TX power Callback. Invoked on pxGetTxpower.
 
typedef void(* BTAclStateChangedCallback_t) (BTStatus_t xStatus, const BTBdaddr_t *pxRemoteBdAddr, BTAclState_t xState, BTTransport_t xTransport, BTAclDisconnectReason_t xReason)
 Callback invoked in response to ACL connection state change.
 

Detailed Description

Callbacks for Bluetooth Device Management Interface.

Typedef Documentation

◆ BTDeviceStateChangedCallback_t

typedef void(* BTDeviceStateChangedCallback_t) (BTState_t xState)

Bluetooth state change Callback. Invoked on pxEnable/pxDisable.

Parameters
[in]xStateDevice event, triggered on state change. (switched on or off).

◆ BTDevicePropertiesCallback_t

typedef void(* BTDevicePropertiesCallback_t) (BTStatus_t xStatus, uint32_t ulNumProperties, BTProperty_t *pxProperties)

GET/SET local device Properties callback.

Parameters
[in]xStatusReturns eBTStatusSuccess if operation succeeded.
[in]ulNumPropertiesNumber of properties returned.
[in]pxPropertiesArray of properties.

◆ BTRemoteDevicePropertiesCallback_t

typedef void(* BTRemoteDevicePropertiesCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxBdAddr, uint32_t ulNumProperties, BTProperty_t *pxProperties)

GET/SET Remote Device Properties callback. Invoked on pxGetRemoteDeviceProperty, pxSetRemoteDeviceProperty, pxGetAllRemoteDeviceProperties.

Parameters
[in]xStatusReturns eBTStatusSuccess if operation succeeded.
[in]pxBdAddrAddress of the Remote device.
[in]ulNumPropertiesNumber of properties returned.
[in]pxPropertiesArray of properties.

◆ BTPinRequestCallback_t

typedef void(* BTPinRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxBdName, uint32_t ulCod, uint8_t ucMin16Digit)

Callback Invoked on Pin Request.

Parameters
[in]pxRemoteBdAddrremote Device address
[in]pxBdNameremote Device name
[in]ulCodcod
[in]ucMin16Digitpin Bluetooth Legacy PinKey Request callback

◆ BTSspRequestCallback_t

typedef void(* BTSspRequestCallback_t) (BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxRemoteBdName, uint32_t ulCod, BTSspVariant_t xPairingVariant, uint32_t ulPassKey)

Callback Invoked on SSP event.

Bluetooth SSP Request callback - Just Works & Numeric Comparison pass_key - Shall be 0 for eBTSspPairingVariantConsent & eBTSspPairingPasskeyEntry.

Parameters
[in]pxRemoteBdAddrRemote device Address.
[in]pxRemoteBdNameRemote device Name (NULL if not available.
[in]ulCodClass Of Device.
[in]xPairingVariantParing variant.
[in]ulPassKeyPass Key.

◆ BTPairingStateChangedCallback_t

typedef void(* BTPairingStateChangedCallback_t) (BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, BTBondState_t xState, BTSecurityLevel_t xSecurityLevel, BTAuthFailureReason_t xReason)

Bluetooth pairing state changed event callback. Invoked in response to create_bond, cancel_bond or remove_bond reason field is valid only in case of xStatus == eBTStatusFail. Invoked on pairing event.

Parameters
[in]xStatusReturns eBTStatusSuccess if operation succeeded.
[in]pxRemoteBdAddrRemote device Address.
[in]xStateBonded state value.
[in]xReasonAuthentication failure status.
[in]xSecurityLevelSecurity level (mode 1, level 1, 2 ,3 ,4).

◆ BTEnergyInfoCallback_t

typedef void(* BTEnergyInfoCallback_t) (BTActivityEnergyInfo *pxEnergyInfo, BTUidTraffic_t *pxUidData)

Callback invoked on pxReadEnergyInfo. Invoked on pxReadEnergyInfo.

Ctrl_state-Current controller state-Active-1,scan-2,or idle-3 state as defined by HCI spec. If the ctrl_state value is 0, it means the API call failed Time values-In milliseconds as returned by the controller Energy used-Value as returned by the controller Status-Provides the status of the read_energy_info API call uid_data provides an array of BTUidTraffic_t, where the array is terminated by an element withapp_uid set to -1.

Parameters
[in]pxEnergyInfoEnergy information.
[in]pxUidDataUID data traffic.

◆ BTDutModeRecvCallback_t

typedef void(* BTDutModeRecvCallback_t) (uint16_t usOpcode, uint8_t *pucBuf, size_t xLen)

Bluetooth Test Mode Callback. Invoked when remote device uses pxDutModeSend.

Parameters
[in]usOpcode
[in]pucBuf
[in]xLen

◆ BTLeTestModeCallback_t

typedef void(* BTLeTestModeCallback_t) (BTStatus_t xStatus, uint16_t usNumPackets)

LE Test mode callbacks. Invoked on pxLeTestMode.

Parameters
[in]xStatusReturns eBTStatusSuccess if operation succeeded.
[in]usNumPackets

◆ BTReadRssiCallback_t

typedef void(* BTReadRssiCallback_t) (BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)

Read RSSI Callback. Invoked on pxReadRssi.

Parameters
[in]pxBdaRemote device address.
[in]ulRssi
[in]xStatusReturns eBTStatusSuccess if operation succeeded.

◆ BTSlaveSecurityRequestCallBack_t

typedef void(* BTSlaveSecurityRequestCallBack_t) (BTBdaddr_t *pxBda, BTSecurityLevel_t xSecurityLevel, bool bBonding)

Security request callback. Invoked on master from remote slave security request event.

Parameters
[in]pxBdaRemote device address.
[in]xSecurityLevelRequest security
[in]bBondingTrue is bonding is requested

◆ BTTxPowerCallback_t

typedef void(* BTTxPowerCallback_t) (BTBdaddr_t *pxBda, BTTransport_t xTransport, uint8_t ucTxPowerValue, BTStatus_t xStatus)

TX power Callback. Invoked on pxGetTxpower.

Parameters
[in]pxBdaRemote device address.
[in]xTransportSpecify if BLE and BT classic is being used.
[in]ucTxPowerValueTx Power value.
[in]xStatusReturns eBTStatusSuccess if operation succeeded.

◆ BTAclStateChangedCallback_t

typedef void(* BTAclStateChangedCallback_t) (BTStatus_t xStatus, const BTBdaddr_t *pxRemoteBdAddr, BTAclState_t xState, BTTransport_t xTransport, BTAclDisconnectReason_t xReason)

Callback invoked in response to ACL connection state change.

Parameters
[in]xStatusReturns eBTStatusSuccess if operation succeeded.
[in]pxRemoteBdAddrAddress of the remote device.
[in]xStateACL connection state.
[in]xTransportTransport type as in BTTransport_t. If transport type is unknown, use BTTransportAuto.
[in]xReasonContains ACL disconnect reason when xState is eBTaclStateDisconnected.