40#ifndef _BT_HAL_MANAGER_H_
41#define _BT_HAL_MANAGER_H_
52#define btMAJOR_VERSION 5
58#define btMINOR_VERSION 1
64#define btPATCH_VERSION 0
72#define btSTR_HELPER( x, y, z ) # x "." # y "." # z
73#define btSTR( x, y, z ) btSTR_HELPER( x, y, z )
80#define btSTRING_VERSION btSTR( btMAJOR_VERSION, btMINOR_VERSION, btPATCH_VERSION )
85#define btBLE_ADD_BLOB_SERVICE_SUPPORTED_BIT 0x0001
86#define btBLE_ADD_BLE_DYNAMIC_PRIVACY 0x0002
87#define btBLE_BLE_CENTRAL_WHITELISTING 0x0004
111 eBTAuthReqKeyPress = 0x05,
474 uint32_t ulNumProperties,
490 uint32_t ulNumProperties,
507 uint8_t ucMin16Digit );
530 uint32_t ulPassKey );
598 uint16_t usNumPackets );
638 uint8_t ucTxPowerValue,
879 bool * bConnectionState );
909 uint32_t ulPasskey );
1001 const void * ( *pxGetClassicAdapter )( void );
1008 const void * ( *pxGetLeAdapter )( void );
1014 uint32_t ( * pxGetLastError )( void );
1023 BTStatus_t ( * pxGetStackFeaturesSupport )( uint32_t * pulFeatureMask );
const BTInterface_t * BTGetBluetoothInterface(void)
uint8_t BTSecurityLevel_t
Definition: bt_hal_manager.h:100
void(* BTBondedCallback_t)(BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, bool bIsBonded)
Definition: bt_hal_manager.h:644
uint8_t BTAuthReq_t
Definition: bt_hal_manager.h:113
This BT HAL provides the interfaces to control the Bluetooth power states ,local device control and d...
void(* BTPinRequestCallback_t)(BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxBdName, uint32_t ulCod, uint8_t ucMin16Digit)
Callback Invoked on Pin Request.
Definition: bt_hal_manager.h:504
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.
Definition: bt_hal_manager.h:660
void(* BTReadRssiCallback_t)(BTBdaddr_t *pxBda, uint32_t ulRssi, BTStatus_t xStatus)
Read RSSI Callback. Invoked on pxReadRssi.
Definition: bt_hal_manager.h:609
void(* BTDutModeRecvCallback_t)(uint16_t usOpcode, uint8_t *pucBuf, size_t xLen)
Bluetooth Test Mode Callback. Invoked when remote device uses pxDutModeSend.
Definition: bt_hal_manager.h:581
void(* BTLeTestModeCallback_t)(BTStatus_t xStatus, uint16_t usNumPackets)
LE Test mode callbacks. Invoked on pxLeTestMode.
Definition: bt_hal_manager.h:597
void(* BTSlaveSecurityRequestCallBack_t)(BTBdaddr_t *pxBda, BTSecurityLevel_t xSecurityLevel, bool bBonding)
Security request callback. Invoked on master from remote slave security request event.
Definition: bt_hal_manager.h:622
void(* BTDevicePropertiesCallback_t)(BTStatus_t xStatus, uint32_t ulNumProperties, BTProperty_t *pxProperties)
GET/SET local device Properties callback.
Definition: bt_hal_manager.h:473
void(* BTSspRequestCallback_t)(BTBdaddr_t *pxRemoteBdAddr, BTBdname_t *pxRemoteBdName, uint32_t ulCod, BTSspVariant_t xPairingVariant, uint32_t ulPassKey)
Callback Invoked on SSP event.
Definition: bt_hal_manager.h:526
void(* BTDeviceStateChangedCallback_t)(BTState_t xState)
Bluetooth state change Callback. Invoked on pxEnable/pxDisable.
Definition: bt_hal_manager.h:462
void(* BTTxPowerCallback_t)(BTBdaddr_t *pxBda, BTTransport_t xTransport, uint8_t ucTxPowerValue, BTStatus_t xStatus)
TX power Callback. Invoked on pxGetTxpower.
Definition: bt_hal_manager.h:636
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,...
Definition: bt_hal_manager.h:546
void(* BTEnergyInfoCallback_t)(BTActivityEnergyInfo *pxEnergyInfo, BTUidTraffic_t *pxUidData)
Callback invoked on pxReadEnergyInfo. Invoked on pxReadEnergyInfo.
Definition: bt_hal_manager.h:568
void(* BTRemoteDevicePropertiesCallback_t)(BTStatus_t xStatus, BTBdaddr_t *pxBdAddr, uint32_t ulNumProperties, BTProperty_t *pxProperties)
GET/SET Remote Device Properties callback. Invoked on pxGetRemoteDeviceProperty, pxSetRemoteDevicePro...
Definition: bt_hal_manager.h:488
#define btADDRESS_LEN
Size in byte of BT/BLE addresses.
Definition: bt_hal_manager_types.h:53
#define btKEY_MAX_LEN
Maximum length of Random key.
Definition: bt_hal_manager_types.h:59
BTStatus_t
Bluetooth Error Status .
Definition: bt_hal_manager_types.h:111
BTSspVariant_t
Bluetooth SSP Bonding Variant.
Definition: bt_hal_manager.h:342
BTAuthFailureReason_t
Authentication failure reasons.
Definition: bt_hal_manager.h:150
BTBondState_t
Bluetooth Bond state.
Definition: bt_hal_manager.h:331
BTTransport_t
Preferred physical Transport for GATT connection .
Definition: bt_hal_manager.h:120
BTPropertyType_t
Bluetooth local device and Remote Device property types. Properties common to both adapter and remote...
Definition: bt_hal_manager.h:192
BTState_t
Bluetooth power State.
Definition: bt_hal_manager.h:131
BTDeviceType_t
Bluetooth Device Type.
Definition: bt_hal_manager.h:320
BTAclDisconnectReason_t
Bluetooth ACL Disconnect Reason From Bluetooth Core Spec 5.0 Vol 2, Part D Error Codes Unknown discon...
Definition: bt_hal_manager.h:391
BTAclState_t
Bluetooth ACL connection state.
Definition: bt_hal_manager.h:379
@ eBTsspVariantPasskeyEntry
Definition: bt_hal_manager.h:344
@ eBTsspVariantPasskeyNotification
Definition: bt_hal_manager.h:346
@ eBTsspVariantPasskeyConfirmation
Definition: bt_hal_manager.h:343
@ eBTsspVariantConsent
Definition: bt_hal_manager.h:345
@ eBTauthFailConnTimeout
Definition: bt_hal_manager.h:163
@ eBTauthFailSmpOobFail
Definition: bt_hal_manager.h:161
@ eBTauthFailUnspecified
Definition: bt_hal_manager.h:171
@ eBTauthFailSmpPairNotSupport
Definition: bt_hal_manager.h:165
@ eBTauthFailSmpEncKeySize
Definition: bt_hal_manager.h:173
@ eBTauthFailSmpTimeout
Definition: bt_hal_manager.h:158
@ eBTauthFailPeerUser
Definition: bt_hal_manager.h:170
@ eBTauthFailSmpBrPairInProg
Definition: bt_hal_manager.h:179
@ eBTauthFailSmpUnknown
Definition: bt_hal_manager.h:167
@ eBTauthFailSmpDhkeyCheckFail
Definition: bt_hal_manager.h:177
@ eBTauthFailSmpFail
Definition: bt_hal_manager.h:162
@ eBTauthFailSmpRepeatedAttempt
Definition: bt_hal_manager.h:175
@ eBTauthFailUnitKey
Definition: bt_hal_manager.h:155
@ eBTauthFailLmpRespTimeout
Definition: bt_hal_manager.h:152
@ eBTauthFailInsuffSecurity
Definition: bt_hal_manager.h:169
@ eBTauthFailEncrypMode
Definition: bt_hal_manager.h:154
@ eBTauthFailSmpPasskeyFail
Definition: bt_hal_manager.h:160
@ eBTauthFailSmpXtransDeriveNotAllow
Definition: bt_hal_manager.h:180
@ eBTauthFailSmp
Definition: bt_hal_manager.h:164
@ eBTauthFailSmpNumericComparFail
Definition: bt_hal_manager.h:178
@ eBTauthFailHciErr
Definition: bt_hal_manager.h:182
@ eBTauthFailHostRejectSecurity
Definition: bt_hal_manager.h:168
@ eBTauthFailStackErr
Definition: bt_hal_manager.h:181
@ eBTauthFailPageTimeout
Definition: bt_hal_manager.h:159
@ eBTauthFailSmpInvalidParameters
Definition: bt_hal_manager.h:176
@ eBTauthFailSmpCmdNotSupport
Definition: bt_hal_manager.h:174
@ eBTauthFailSmpUnknownIo
Definition: bt_hal_manager.h:166
@ eBTauthFailSmpCfrmValue
Definition: bt_hal_manager.h:156
@ eBTauthFailSmpAuthReqFail
Definition: bt_hal_manager.h:172
@ eBTauthFailSmpEnc
Definition: bt_hal_manager.h:157
@ eBTauthSuccess
Definition: bt_hal_manager.h:151
@ eBTauthFailKeyMissing
Definition: bt_hal_manager.h:153
@ eBTbondStateBonding
Definition: bt_hal_manager.h:333
@ eBTbondStateNone
Definition: bt_hal_manager.h:332
@ eBTbondStateBonded
Definition: bt_hal_manager.h:334
@ BTTransportAuto
Definition: bt_hal_manager.h:121
@ BTTransportLe
Definition: bt_hal_manager.h:123
@ BTTransportBredr
Definition: bt_hal_manager.h:122
@ eBTpropertyBondable
Definition: bt_hal_manager.h:256
@ eBTpropertyAdapterBondedDevices
Definition: bt_hal_manager.h:220
@ eBTpropertyLocalMTUSize
Definition: bt_hal_manager.h:249
@ eBTpropertyRemoteFriendlyName
Definition: bt_hal_manager.h:228
@ eBTpropertyBdaddr
Definition: bt_hal_manager.h:205
@ eBTpropertyIO
Definition: bt_hal_manager.h:267
@ eBTpropertyBdname
Definition: bt_hal_manager.h:198
@ eBTpropertyConnectable
Definition: bt_hal_manager.h:274
@ eBTpropertyRemoteVersionInfo
Definition: bt_hal_manager.h:242
@ eBTpropertySecureConnectionOnly
Definition: bt_hal_manager.h:285
@ eBTpropertyTypeOfDevice
Definition: bt_hal_manager.h:212
@ eBTpropertyRemoteRssi
Definition: bt_hal_manager.h:235
@ eBTAuthReqBonding
Definition: bt_hal_manager.h:108
@ eBTAuthReqSecureConnect
Definition: bt_hal_manager.h:110
@ eBTAuthReqMitm
Definition: bt_hal_manager.h:109
@ eBTstateOn
Definition: bt_hal_manager.h:133
@ eBTstateOff
Definition: bt_hal_manager.h:132
@ eBTdeviceDevtypeBle
Definition: bt_hal_manager.h:322
@ eBTdeviceDevtypeDual
Definition: bt_hal_manager.h:323
@ eBTdeviceDevtypeBredr
Definition: bt_hal_manager.h:321
@ eBTaclInqRspDataTooLarge
Definition: bt_hal_manager.h:443
@ eBTaclHostRejectSecurity
Definition: bt_hal_manager.h:406
@ eBTaclInsuffcientSecurity
Definition: bt_hal_manager.h:438
@ eBTaclMaxNumOfConnections
Definition: bt_hal_manager.h:401
@ eBTaclPeerPowerOff
Definition: bt_hal_manager.h:413
@ eBTaclIllegalParameterFmt
Definition: bt_hal_manager.h:410
@ eBTaclUnspecified
Definition: bt_hal_manager.h:423
@ eBTaclInvalidLmpParam
Definition: bt_hal_manager.h:422
@ eBTaclHostUser
Definition: bt_hal_manager.h:414
@ eBTaclUnsupportedRemFeature
Definition: bt_hal_manager.h:418
@ eBTaclHwFailure
Definition: bt_hal_manager.h:395
@ eBTaclEncryModeNotAcceptable
Definition: bt_hal_manager.h:429
@ eBTaclMaxNumOfScos
Definition: bt_hal_manager.h:402
@ eBTaclLmpErrTransCollision
Definition: bt_hal_manager.h:427
@ eBTaclHostTimeout
Definition: bt_hal_manager.h:408
@ eBTaclRoleSwitchPending
Definition: bt_hal_manager.h:440
@ eBTaclQosUnacceptableParam
Definition: bt_hal_manager.h:435
@ eBTaclUnacceptConnInterval
Definition: bt_hal_manager.h:448
@ eBTaclMemFull
Definition: bt_hal_manager.h:399
@ eBTaclRoleChangeNotAllowed
Definition: bt_hal_manager.h:425
@ eBTaclUnitKeyUsed
Definition: bt_hal_manager.h:430
@ eBTaclControllerBusy
Definition: bt_hal_manager.h:447
@ eBTaclScoAirRejected
Definition: bt_hal_manager.h:421
@ eBTaclConnectionTimeout
Definition: bt_hal_manager.h:400
@ eBTaclUnsupportedValue
Definition: bt_hal_manager.h:409
@ eBTaclConnectionExists
Definition: bt_hal_manager.h:403
@ eBTaclIllegalCommand
Definition: bt_hal_manager.h:393
@ eBTaclQosNotSupported
Definition: bt_hal_manager.h:431
@ eBTaclConnToutDueToMicFailure
Definition: bt_hal_manager.h:450
@ eBTaclHostRejectDevice
Definition: bt_hal_manager.h:407
@ eBTaclCommandDisallowed
Definition: bt_hal_manager.h:404
@ eBTaclChanClassifNotSupported
Definition: bt_hal_manager.h:437
@ eBTaclLmpResponseTimeout
Definition: bt_hal_manager.h:426
@ eBTaclParamOutOfRange
Definition: bt_hal_manager.h:439
@ eBTaclUnknownLmpPdu
Definition: bt_hal_manager.h:417
@ eBTaclHostRejectResource
Definition: bt_hal_manager.h:405
@ eBTaclReservedSlotViolation
Definition: bt_hal_manager.h:441
@ eBTaclKeyMissing
Definition: bt_hal_manager.h:398
@ eBTaclPeerUser
Definition: bt_hal_manager.h:411
@ eBTaclRepeatedAttempts
Definition: bt_hal_manager.h:415
@ eBTaclAuthFailure
Definition: bt_hal_manager.h:397
@ eBTaclInstantPassed
Definition: bt_hal_manager.h:432
@ eBTaclConnFailedEstablishment
Definition: bt_hal_manager.h:451
@ eBTaclPairingNotAllowed
Definition: bt_hal_manager.h:416
@ eBTaclDiffTransactionCollision
Definition: bt_hal_manager.h:434
@ eBTaclLmpPduNotAllowed
Definition: bt_hal_manager.h:428
@ eBTaclScoIntervalRejected
Definition: bt_hal_manager.h:420
@ eBTaclSuccess
Definition: bt_hal_manager.h:392
@ eBTaclQosRejected
Definition: bt_hal_manager.h:436
@ eBTaclScoOffsetRejected
Definition: bt_hal_manager.h:419
@ eBTaclSimplePairingNotSupported
Definition: bt_hal_manager.h:444
@ eBTaclMacConnectionFailed
Definition: bt_hal_manager.h:452
@ eBTaclNoConnection
Definition: bt_hal_manager.h:394
@ eBTaclPeerLowResources
Definition: bt_hal_manager.h:412
@ eBTaclRejNoSuitableChannel
Definition: bt_hal_manager.h:446
@ eBTaclUnsupportedLmpFeature
Definition: bt_hal_manager.h:424
@ eBTaclHostBusyPairing
Definition: bt_hal_manager.h:445
@ eBTaclRoleSwitchFailed
Definition: bt_hal_manager.h:442
@ eBTaclDirectedAdvertisingTimeout
Definition: bt_hal_manager.h:449
@ eBTaclPageTimeout
Definition: bt_hal_manager.h:396
@ eBTaclPairingWithUnitKeyNotSupported
Definition: bt_hal_manager.h:433
@ eBTSecLevelAuthenticatedPairing
Definition: bt_hal_manager.h:97
@ eBTSecLevelUnauthenticatedPairing
Definition: bt_hal_manager.h:96
@ eBTSecLevelNoSecurity
Definition: bt_hal_manager.h:95
@ eBTSecLevelSecureConnect
Definition: bt_hal_manager.h:98
@ eBTaclDisconnected
Definition: bt_hal_manager.h:381
@ eBTaclConnected
Definition: bt_hal_manager.h:380
Energy info.
Definition: bt_hal_manager.h:354
uint64_t ullRxTime
Definition: bt_hal_manager.h:358
uint64_t ullTxTime
Definition: bt_hal_manager.h:357
uint8_t ucStatus
Definition: bt_hal_manager.h:355
uint8_t ucCtrlState
Definition: bt_hal_manager.h:356
uint64_t ullIdleTime
Definition: bt_hal_manager.h:359
uint64_t ullEnergyUsed
Definition: bt_hal_manager.h:360
BT/BLE address.
Definition: bt_hal_manager_types.h:77
Device Name.
Definition: bt_hal_manager_types.h:86
Bluetooth DM callback structure.
Definition: bt_hal_manager.h:671
BTPinRequestCallback_t pxPinRequestCb
Definition: bt_hal_manager.h:675
BTEnergyInfoCallback_t pxEnergyInfoCb
Definition: bt_hal_manager.h:681
BTPairingStateChangedCallback_t pxPairingStateChangedCb
Definition: bt_hal_manager.h:677
BTDevicePropertiesCallback_t pxAdapterPropertiesCb
Definition: bt_hal_manager.h:673
BTReadRssiCallback_t pxReadRssiCb
Definition: bt_hal_manager.h:682
BTAclStateChangedCallback_t pxAclStateChangedCb
Definition: bt_hal_manager.h:685
BTLeTestModeCallback_t pxleTestModeCb
Definition: bt_hal_manager.h:680
BTSspRequestCallback_t pxSspRequestCb
Definition: bt_hal_manager.h:676
BTDutModeRecvCallback_t pxDutModeRecvCb
Definition: bt_hal_manager.h:679
BTSlaveSecurityRequestCallBack_t pxSlaveSecurityRequestCb
Definition: bt_hal_manager.h:684
BTDeviceStateChangedCallback_t pxDeviceStateChangedCb
Definition: bt_hal_manager.h:672
BTBondedCallback_t pxBondedCb
Definition: bt_hal_manager.h:678
BTRemoteDevicePropertiesCallback_t pxRemoteDevicePropertiesCb
Definition: bt_hal_manager.h:674
BTTxPowerCallback_t pxTxPowerCb
Definition: bt_hal_manager.h:683
Represents the standard SAL device management interface.
Definition: bt_hal_manager.h:693
Bluetooth Out Of Band data for bonding.
Definition: bt_hal_manager.h:304
Bluetooth PinKey Code, Valid only for BT legacy.
Definition: bt_hal_manager.h:141
Bluetooth Adapter Property data structure.
Definition: bt_hal_manager.h:293
void * pvVal
Definition: bt_hal_manager.h:296
size_t xLen
Definition: bt_hal_manager.h:295
BTPropertyType_t xType
Definition: bt_hal_manager.h:294
UUID traffic info.
Definition: bt_hal_manager.h:368
int32_t lAppUid
Definition: bt_hal_manager.h:369
uint64_t ullRxBytes
Definition: bt_hal_manager.h:371
uint64_t ullTxBytes
Definition: bt_hal_manager.h:370