TI BLE5-Stack API Documentation  2.02.07.00
Modules | Files | Functions
HCI

This module implements the Host Controller Interface. For a detailed usage section describing how to send these commands and receive events, see the HCI Section of the User's Guide. More...

Modules

 HCI Events
 
 HCI Function Maps
 

Files

file  hci_tl.h
 Types, constants, external functions etc. for the BLE HCI Transport Layer.
 

Functions

hciStatus_t HCI_EXT_BuildRevisionCmd (uint8 mode, uint16 userRevNum)
 
hciStatus_t HCI_EXT_CoexEnableCmd (uint8 enable)
 
hciStatus_t HCI_EXT_ConnEventNoticeCmd (uint16 connHandle, uint8 taskID, uint16 taskEvent)
 
hciStatus_t HCI_EXT_DecryptCmd (uint8 *key, uint8 *encText)
 
hciStatus_t HCI_EXT_DisconnectImmedCmd (uint16 connHandle)
 
hciStatus_t HCI_EXT_EnablePTMCmd (void)
 
hciStatus_t HCI_EXT_EndModemTestCmd (void)
 
hciStatus_t HCI_EXT_EnhancedModemHopTestTxCmd (uint8 payloadLen, uint8 payloadType, uint8 rfPhy)
 
hciStatus_t HCI_EXT_EnhancedModemTestRxCmd (uint8 rfPhy, uint8 rfChan)
 
hciStatus_t HCI_EXT_EnhancedModemTestTxCmd (uint8 cwMode, uint8 rfPhy, uint8 rfChan)
 
hciStatus_t HCI_EXT_GetActiveConnInfoCmd (uint8 connId, hciActiveConnInfo_t *activeConnInfo)
 This API is used to get connection related information required to follow the target connection with a BLE conneciton monitor. More...
 
hciStatus_t HCI_EXT_GetConnInfoCmd (uint8 *numAllocConns, uint8 *numActiveConns, hciConnInfo_t *activeConnInfo)
 
hciStatus_t HCI_EXT_ModemHopTestTxCmd (void)
 
hciStatus_t HCI_EXT_ModemTestRxCmd (uint8 rxChan)
 
hciStatus_t HCI_EXT_ModemTestTxCmd (uint8 cwMode, uint8 txChan)
 
hciStatus_t HCI_EXT_NumComplPktsLimitCmd (uint8 limit, uint8 flushOnEvt)
 
hciStatus_t HCI_EXT_OnePktPerEvtCmd (uint8 control)
 
hciStatus_t HCI_EXT_PacketErrorRateCmd (uint16 connHandle, uint8 command)
 
hciStatus_t HCI_EXT_PERbyChanCmd (uint16 connHandle, perByChan_t *perByChan)
 
hciStatus_t HCI_EXT_ReadRandAddrCmd (void)
 
hciStatus_t HCI_EXT_ResetSystemCmd (uint8 mode)
 
hciStatus_t HCI_EXT_SaveFreqTuneCmd (void)
 
hciStatus_t HCI_EXT_SetBDADDRCmd (uint8 *bdAddr)
 
hciStatus_t HCI_EXT_SetDtmTxPktCntCmd (uint16 txPktCnt)
 
hciStatus_t HCI_EXT_SetExtScanChannels (uint8 extScanChannelsMap)
 This API is used to set the scan channels mapping. More...
 
hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd (uint8 control)
 
hciStatus_t HCI_EXT_SetFreqTuneCmd (uint8 step)
 
hciStatus_t HCI_EXT_SetHostConnChanClassificationCmd (uint8 *chanMap, uint16 connID)
 
hciStatus_t HCI_EXT_SetHostDefChanClassificationCmd (uint8 *chanMap)
 
hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd (uint8 *localFeatures)
 
hciStatus_t HCI_EXT_SetLocationingAccuracyCmd (uint16 handle, uint8 sampleRate1M, uint8 sampleSize1M, uint8 sampleRate2M, uint8 sampleSize2M, uint8 sampleCtrl)
 
hciStatus_t HCI_EXT_SetMaxDataLenCmd (uint16 txOctets, uint16 txTime, uint16 rxOctets, uint16 rxTime)
 
hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd (uint8 txPower)
 
hciStatus_t HCI_EXT_SetPinOutputCmd (uint8 dio, uint8 value)
 
hciStatus_t HCI_EXT_SetQOSDefaultParameters (uint32 paramDefaultVal, uint8 paramType, uint8 taskType)
 This API is used to set the Default QOS Parameters Values. More...
 
hciStatus_t HCI_EXT_SetQOSParameters (uint8 taskType, uint8 paramType, uint32 ParamVal, uint16 taskHandle)
 This API is used to set the QOS Parameters according to the entered parameter type. More...
 
hciStatus_t HCI_EXT_SetRxGainCmd (uint8 rxGain)
 
hciStatus_t HCI_EXT_SetSCACmd (uint16 scaInPPM)
 
hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd (uint8 control)
 
hciStatus_t HCI_EXT_SetTxPowerCmd (uint8 txPower)
 
hciStatus_t HCI_EXT_SetVirtualAdvAddrCmd (uint8 advHandle, uint8 *bdAddr)
 This API is used to set the advertiser's virtual public address. More...
 
hciStatus_t HCI_HostNumCompletedPktCmd (uint8 numHandles, uint16 *connHandles, uint16 *numCompletedPkts)
 
hciStatus_t HCI_LE_AddDeviceToPeriodicAdvListCmd (uint8 advAddrType, uint8 *advAddress, uint8 advSID)
 
hciStatus_t HCI_LE_AddDeviceToResolvingListCmd (uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 *peerIRK, uint8 *localIRK)
 
hciStatus_t HCI_LE_AddWhiteListCmd (uint8 addrType, uint8 *devAddr)
 
hciStatus_t HCI_LE_ClearPeriodicAdvListCmd (void)
 
hciStatus_t HCI_LE_ClearResolvingListCmd (void)
 
hciStatus_t HCI_LE_ClearWhiteListCmd (void)
 
hciStatus_t HCI_LE_ConnUpdateCmd (uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
 
hciStatus_t HCI_LE_CreateConnCancelCmd (void)
 
hciStatus_t HCI_LE_CreateConnCmd (uint16 scanInterval, uint16 scanWindow, uint8 initFilterPolicy, uint8 addrTypePeer, uint8 *peerAddr, uint8 ownAddrType, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
 
hciStatus_t HCI_LE_EncryptCmd (uint8 *key, uint8 *plainText)
 
hciStatus_t HCI_LE_EnhancedCteRxTestCmd (uint8 rxChan, uint8 rxPhy, uint8 modIndex, uint8 expectedCteLength, uint8 expectedCteType, uint8 slotDurations, uint8 length, uint8 *pAntenna)
 
hciStatus_t HCI_LE_EnhancedCteTxTestCmd (uint8 txChan, uint8 payloadLen, uint8 payloadType, uint8 txPhy, uint8 cteLength, uint8 cteType, uint8 length, uint8 *pAntenna)
 
hciStatus_t HCI_LE_EnhancedRxTestCmd (uint8 rxChan, uint8 rxPhy, uint8 modIndex)
 
hciStatus_t HCI_LE_EnhancedTxTestCmd (uint8 txChan, uint8 payloadLen, uint8 payloadType, uint8 txPhy)
 
hciStatus_t HCI_LE_GenerateDHKeyCmd (uint8 *publicKey)
 
hciStatus_t HCI_LE_LtkReqNegReplyCmd (uint16 connHandle)
 
hciStatus_t HCI_LE_LtkReqReplyCmd (uint16 connHandle, uint8 *ltk)
 
hciStatus_t HCI_LE_PeriodicAdvCreateSyncCancelCmd (void)
 
hciStatus_t HCI_LE_PeriodicAdvCreateSyncCmd (uint8 options, uint8 advSID, uint8 advAddrType, uint8 *advAddress, uint16 skip, uint16 syncTimeout, uint8 syncCteType)
 
hciStatus_t HCI_LE_PeriodicAdvTerminateSyncCmd (uint16 syncHandle)
 
hciStatus_t HCI_LE_RandCmd (void)
 
hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd (void)
 
hciStatus_t HCI_LE_ReadAntennaInformationCmd (void)
 
hciStatus_t HCI_LE_ReadBufSizeCmd (void)
 
hciStatus_t HCI_LE_ReadChannelMapCmd (uint16 connHandle)
 
hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd (void)
 
hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd (uint8 localIdAddrType, uint8 *localIdAddr)
 
hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd (void)
 
hciStatus_t HCI_LE_ReadMaxDataLenCmd (void)
 
hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd (uint8 peerIdAddrType, uint8 *peerIdAddr)
 
hciStatus_t HCI_LE_ReadPeriodicAdvListSizeCmd (void)
 
hciStatus_t HCI_LE_ReadPhyCmd (uint16 connHandle)
 
hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd (uint16 connHandle)
 
hciStatus_t HCI_LE_ReadResolvingListSizeCmd (void)
 
hciStatus_t HCI_LE_ReadRfPathCompCmd (void)
 
hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd (void)
 
hciStatus_t HCI_LE_ReadSupportedStatesCmd (void)
 
hciStatus_t HCI_LE_ReadTxPowerCmd (void)
 
hciStatus_t HCI_LE_ReadWhiteListSizeCmd (void)
 
hciStatus_t HCI_LE_ReceiverTestCmd (uint8 rxChan)
 
hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd (uint16 connHandle, uint8 reason)
 
hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd (uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
 
hciStatus_t HCI_LE_RemoveDeviceFromPeriodicAdvListCmd (uint8 advAddrType, uint8 *advAddress, uint8 advSID)
 
hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd (uint8 peerIdAddrType, uint8 *peerIdAddr)
 
hciStatus_t HCI_LE_RemoveWhiteListCmd (uint8 addrType, uint8 *devAddr)
 
hciStatus_t HCI_LE_SetAddressResolutionEnableCmd (uint8 addrResolutionEnable)
 
hciStatus_t HCI_LE_SetAdvDataCmd (uint8 dataLen, uint8 *pData)
 
hciStatus_t HCI_LE_SetAdvEnableCmd (uint8 advEnable)
 
hciStatus_t HCI_LE_SetAdvParamCmd (uint16 advIntervalMin, uint16 advIntervalMax, uint8 advType, uint8 ownAddrType, uint8 directAddrType, uint8 *directAddr, uint8 advChannelMap, uint8 advFilterPolicy)
 
hciStatus_t HCI_LE_SetAdvStatus (aeEnableCmd_t *pCmdParams)
 
hciStatus_t HCI_LE_SetConnectionCteReceiveParamsCmd (uint16 connHandle, uint8 samplingEnable, uint8 slotDurations, uint8 length, uint8 *pAntenna)
 
hciStatus_t HCI_LE_SetConnectionCteRequestEnableCmd (uint16 connHandle, uint8 enable, uint16 interval, uint8 length, uint8 type)
 
hciStatus_t HCI_LE_SetConnectionCteResponseEnableCmd (uint16 connHandle, uint8 enable)
 
hciStatus_t HCI_LE_SetConnectionCteTransmitParamsCmd (uint16 connHandle, uint8 types, uint8 length, uint8 *pAntenna)
 
hciStatus_t HCI_LE_SetConnectionlessCteTransmitEnableCmd (uint8 advHandle, uint8 enable)
 Used by the Host to request that the Controller enables or disables the use of Constant Tone Extensions in any periodic advertising. More...
 
hciStatus_t HCI_LE_SetConnectionlessCteTransmitParamsCmd (uint8 advHandle, uint8 cteLen, uint8 cteType, uint8 cteCount, uint8 length, uint8 *pAntenna)
 Used by the Host to set the type, length, and antenna switching pattern for the transmission of Constant Tone Extensions in any periodic advertising. More...
 
hciStatus_t HCI_LE_SetConnectionlessIqSamplingEnableCmd (uint16 syncHandle, uint8 samplingEnable, uint8 slotDurations, uint8 maxSampledCtes, uint8 length, uint8 *pAntenna)
 
hciStatus_t HCI_LE_SetDataLenCmd (uint16 connHandle, uint16 txOctets, uint16 txTime)
 
hciStatus_t HCI_LE_SetDefaultPhyCmd (uint8 allPhys, uint8 txPhy, uint8 rxPhy)
 
hciStatus_t HCI_LE_SetEventMaskCmd (uint8 *pEventMask)
 
hciStatus_t HCI_LE_SetExtAdvData (aeSetDataCmd_t *pCmdParams)
 
hciStatus_t HCI_LE_SetExtScanRspData (aeSetDataCmd_t *pCmdParams)
 
hciStatus_t HCI_LE_SetHostChanClassificationCmd (uint8 *chanMap)
 
hciStatus_t HCI_LE_SetPeriodicAdvDataCmd (uint8 advHandle, uint8 operation, uint8 dataLength, uint8 *data)
 Used to set the advertiser data used in periodic advertising PDUs. This command may be issued at any time after the advertising set identified by the Advertising_Handle parameter has been configured for periodic advertising using the HCI_LE_Set_Periodic_Advertising_Parameters command. More...
 
hciStatus_t HCI_LE_SetPeriodicAdvEnableCmd (uint8 enable, uint8 advHandle)
 Used to request the advertiser to enable or disable the periodic advertising for the advertising set. More...
 
hciStatus_t HCI_LE_SetPeriodicAdvParamsCmd (uint8 advHandle, uint16 periodicAdvIntervalMin, uint16 periodicAdvIntervalMax, uint16 periodicAdvProp)
 
hciStatus_t HCI_LE_SetPeriodicAdvReceiveEnableCmd (uint16 syncHandle, uint8 enable)
 
hciStatus_t HCI_LE_SetPhyCmd (uint16 connHandle, uint8 allPhys, uint8 txPhy, uint8 rxPhy, uint16 phyOpts)
 
hciStatus_t HCI_LE_SetPrivacyModeCmd (uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 privacyMode)
 
hciStatus_t HCI_LE_SetRandomAddressCmd (uint8 *pRandAddr)
 
hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd (uint16 rpaTimeout)
 
hciStatus_t HCI_LE_SetScanEnableCmd (uint8 scanEnable, uint8 filterDuplicates)
 
hciStatus_t HCI_LE_SetScanParamCmd (uint8 scanType, uint16 scanInterval, uint16 scanWindow, uint8 ownAddrType, uint8 filterPolicy)
 
hciStatus_t HCI_LE_SetScanRspDataCmd (uint8 dataLen, uint8 *pData)
 
hciStatus_t HCI_LE_StartEncyptCmd (uint16 connHandle, uint8 *random, uint8 *encDiv, uint8 *ltk)
 
hciStatus_t HCI_LE_TestEndCmd (void)
 
hciStatus_t HCI_LE_TransmitterTestCmd (uint8 txChan, uint8 dataLen, uint8 pktPayload)
 
hciStatus_t HCI_LE_WriteRfPathCompCmd (int16 txPathParam, int16 rxPathParam)
 
hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd (uint16 txOctets, uint16 txTime)
 
hciStatus_t HCI_ReadAuthPayloadTimeoutCmd (uint16 connHandle, uint16 *aptoValue)
 
hciStatus_t HCI_ReadBDADDRCmd (void)
 
hciStatus_t HCI_ReadLocalSupportedCommandsCmd (void)
 
hciStatus_t HCI_ReadLocalSupportedFeaturesCmd (void)
 
hciStatus_t HCI_ReadLocalVersionInfoCmd (void)
 
hciStatus_t HCI_ReadRemoteVersionInfoCmd (uint16 connHandle)
 
hciStatus_t HCI_ReadRssiCmd (uint16 connHandle)
 
hciStatus_t HCI_ReadTransmitPowerLevelCmd (uint16 connHandle, uint8 txPwrType)
 
hciStatus_t HCI_ResetCmd (void)
 
hciStatus_t HCI_SetEventMaskCmd (uint8 *pMask)
 
hciStatus_t HCI_SetEventMaskPage2Cmd (uint8 *pMask)
 
hciStatus_t HCI_WriteAuthPayloadTimeoutCmd (uint16 connHandle, uint16 aptoValue)
 

Detailed Description

This module implements the Host Controller Interface. For a detailed usage section describing how to send these commands and receive events, see the HCI Section of the User's Guide.

Function Documentation

§ HCI_EXT_BuildRevisionCmd()

hciStatus_t HCI_EXT_BuildRevisionCmd ( uint8  mode,
uint16  userRevNum 
)

Set a user revision number or read the build revision number.

This command allows the embedded user code to set their own 16-bit revision number or read the build revision number of the Bluetooth low energy stack library software. The default value of the revision number is zero. When you update a Bluetooth low energy project by adding your own code, use this API to set your own revision number. When called with mode set to HCI_EXT_SET_USER_REVISION, the stack saves this value. No event is returned from this API when used this way.

Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_BUILD_REVISION (only when mode == HCI_EXT_READ_BUILD_REVISION)
Parameters
modeSet User Revision Command
userRevNumuser defined revision number
Returns
HCI_SUCCESS

§ HCI_EXT_CoexEnableCmd()

hciStatus_t HCI_EXT_CoexEnableCmd ( uint8  enable)

Enable or disable the Coex feature.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_COEX_ENABLE
Parameters
enable- 1 to enable and 0 to disable.
Returns
HCI_SUCCESS

§ HCI_EXT_ConnEventNoticeCmd()

hciStatus_t HCI_EXT_ConnEventNoticeCmd ( uint16  connHandle,
uint8  taskID,
uint16  taskEvent 
)

Connection Event Notice Command

For a given connection handle, enable or disable a notification to the specified task using the specified task event whenever a Connection event ends. A non-zero taskEvent value is taken to be "enable", while a zero valued taskEvent taken to be "disable".

Warning
This command does not check if the taskID and/or taskEvent are valid
Note
This command does not return any HCI events but has a meaningful return status.

If configured successfully, it will result in BLE stack events sent as shown in the following example.

Usage
  1. Define the event in the application
    // Application specific event ID for HCI Connection Event End Events
    #define SBP_HCI_CONN_EVT_END_EVT 0x0001
  2. Configure the Bluetooth low energy protocol stack to return the event. This must be done after the connection has been formed.
    HCI_EXT_ConnEventNoticeCmd(pMsg->connHandle, selfEntity, SBP_HCI_CONN_EVT_END_EVT)
  3. Check for and receive these events in the application
    if (ICall_fetchServiceMsg(&src, &dest,
    (void **)&pMsg) == ICALL_ERRNO_SUCCESS)
    {
    uint8 safeToDealloc = TRUE;
    if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity))
    {
    ICall_Stack_Event *pEvt = (ICall_Stack_Event *)pMsg;
    // Check for BLE stack events first
    if (pEvt->signature == 0xffff)
    {
    if (pEvt->event_flag & SBP_HCI_CONN_EVT_END_EVT)
    {
    //Connection event ended. Process as desired.
    }
Parameters
connHandleThe HCI connection ID for connection event notice.
taskIDUser's task ID.
taskEventUser's task event.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS : >1 bit was set in taskEvent

§ HCI_EXT_DecryptCmd()

hciStatus_t HCI_EXT_DecryptCmd ( uint8 *  key,
uint8 *  encText 
)

Decrypt encrypted data using AES128.

Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_DECRYPT
Parameters
keyPointer to 16 byte encryption key. The most significant octet of the data corresponds to key[0] using the notation specified in FIPS 197.
encTextPointer to 16 byte encrypted data. The most significant octet of the key corresponds to key[0] using the notation specified in FIPS 197.
Returns
HCI_SUCCESS

§ HCI_EXT_DisconnectImmedCmd()

hciStatus_t HCI_EXT_DisconnectImmedCmd ( uint16  connHandle)

Disconnect the connection immediately.

This command is used to disconnect a connection immediately. This command can be useful for when a connection needs to be ended without the latency associated with the normal BLE Controller Terminate control procedure.

Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_DISCONNECT_IMMED
hciEvt_DisconnComplete_t
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_EXT_EnablePTMCmd()

hciStatus_t HCI_EXT_EnablePTMCmd ( void  )

Enable Production Test Mode.

This command is used to enable Production Test Mode (PTM). This mode is used by the customer during assembly of their product to allow limited access to the BLE Controller for testing and configuration. This command is only available when the BLE Controller is built without external access to the Controller (i.e. when no transport interface such as RS232 is permitted). This mode will remain enabled until the device is reset. Please see the related application note for additional details.

Returns
HCI_SUCCESS

§ HCI_EXT_EndModemTestCmd()

hciStatus_t HCI_EXT_EndModemTestCmd ( void  )

Shutdown a modem test.

Note
A complete Controller reset will take place.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_END_MODEM_TEST
Returns
HCI_SUCCESS

§ HCI_EXT_EnhancedModemHopTestTxCmd()

hciStatus_t HCI_EXT_EnhancedModemHopTestTxCmd ( uint8  payloadLen,
uint8  payloadType,
uint8  rfPhy 
)

Start Enhanced Modem Hop Tx Test

Start an enhanced BLE5 continuous transmitter direct test mode test using a modulated carrier wave. A test reference data packet is transmitted on a different frequency (linearly stepping through all RF channels 0..39), for a given PHY (1M, 2M, Coded S2, Coded S8), every period (depending on the payload length, as given Vol. 6, Part F, section 4.1.6). Use HCI_EXT_EndModemTestCmd command to end the test.

The BLE device will transmit at maximum power.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_ENHANCED_MODEM_HOP_TEST_TX
Parameters
payloadLenNumber bytes (0..255)in payload for each packet.
payloadTypeDirect Test Mode
rfPhyRF Setup PHY Parameters
Returns
HCI_SUCCESS

§ HCI_EXT_EnhancedModemTestRxCmd()

hciStatus_t HCI_EXT_EnhancedModemTestRxCmd ( uint8  rfPhy,
uint8  rfChan 
)

Start Enhanced Modem Hop RX Test

Start an enhanced BLE5 continuous receiver modem test using a modulated carrier wave tone, at the frequency that corresponds to the specific RF channel, for a given PHY (1M, 2M, Coded S2, or Coded S8). Any received data is discarded. RSSI may be read during this test by using the HCI_ReadRssiCmd. Use HCI_EXT_EndModemTestCmd command to end the test.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Parameters
rfPhyRF Setup PHY Parameters
rfChanReceiver RF channel k=0..39, where BLE F=2402+(k*2MHz).
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_ENHANCED_MODEM_TEST_RX
Returns
HCI_SUCCESS

§ HCI_EXT_EnhancedModemTestTxCmd()

hciStatus_t HCI_EXT_EnhancedModemTestTxCmd ( uint8  cwMode,
uint8  rfPhy,
uint8  rfChan 
)

Start Enhanced Modem TX Test

Start an enhanced BLE5 continuous transmitter modem test, using either a modulated or unmodulated carrier wave tone, at the frequency that corresponds to the specified RF channel for a given PHY (1M, 2M, Coded S2, or Coded S8). Use HCI_EXT_EndModemTestCmd command to end the test.

The BLE device will transmit at maximum power.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_ENHANCED_MODEM_TEST_TX
Parameters
cwModeTX Modulation
rfPhyRF Setup PHY Parameters
rfChanTransmit RF channel k=0..39, where BLE F=2402+(k*2MHz).
Returns
HCI_SUCCESS

§ HCI_EXT_GetActiveConnInfoCmd()

hciStatus_t HCI_EXT_GetActiveConnInfoCmd ( uint8  connId,
hciActiveConnInfo_t *  activeConnInfo 
)

This API is used to get connection related information required to follow the target connection with a BLE conneciton monitor.

input parameters

Parameters
connId- Connection id of an active BLE connection.
activeConnInfo- Pointer for active connection information that is needed to track BLE connection. Note: If not NULL it is the users responsibility to allocate memory for this pointer based on sizeof(hciActiveConnInfo_t) and also to free it when done.

output parameters

Parameters
activeConnInfo- Pointer for active connection information that is needed to track BLE connection.
Returns
LL_STATUS_SUCCESS

§ HCI_EXT_GetConnInfoCmd()

hciStatus_t HCI_EXT_GetConnInfoCmd ( uint8 *  numAllocConns,
uint8 *  numActiveConns,
hciConnInfo_t *  activeConnInfo 
)

Get Connection Info

This API is used to get connection related information, which includes the number of allocated connections, the number of active connections, and for each active connection, the connection ID, the connection role (Master or Slave), the peer address and peer address type. The number of allocated connections is based on a default build value that can be changed using MAX_NUM_BLE_CONNS. The number of active connections refers to active BLE connections.

Note
If all the parameters are NULL, then the command is assumed to have originated from the transport layer. Otherwise, they are assumed to have originated from a direct call by the Application and any non-NULL pointer will be directly used.
Warning
If either parameter is non-NULL, the pointer will be used to store the result. It is the user's responsibility to ensure there is sufficient memory allocated.
Corresponding Events:
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_GET_CONNECTION_INFO
Parameters
numAllocConnsPointer for number of build time connections.
numActiveConnsPointer for number of active BLE connections.
activeConnInfoPointer for active connection information.
numAllocConnsNumber of build time connections allowed.
numActiveConnsNumber of active BLE connections.
activeConnInfoActive connection information.
Returns
HCI_SUCCESS

§ HCI_EXT_ModemHopTestTxCmd()

hciStatus_t HCI_EXT_ModemHopTestTxCmd ( void  )

Start Modem Hop Tx Test

Start a continuous transmitter direct test mode test using a modulated carrier wave and transmitting a 37 byte packet of Pseudo-Random 9-bit data. A packet is transmitted on a different frequency (linearly stepping through all RF channels 0..39) every 625 us. Use HCI_EXT_EndModemTestCmd command to end the test.

The BLE device will transmit at maximum power.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_MODEM_HOP_TEST_TX
Returns
HCI_SUCCESS

§ HCI_EXT_ModemTestRxCmd()

hciStatus_t HCI_EXT_ModemTestRxCmd ( uint8  rxChan)

Start Modem Hop RX Test

Start a continuous receiver modem test using a modulated carrier wave tone, at the frequency that corresponds to the specific RF channel. Any received data is discarded. Receiver gain may be adjusted using the HCI_EXT_SetRxGainCmd. RSSI may be read during this test by using the HCI_ReadRssiCmd. Use HCI_EXT_EndModemTestCmd command to end the test.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Parameters
rxChanReceiver RF channel k=0..39, where BLE F=2402+(k*2MHz).
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_MODEM_TEST_RX
Returns
HCI_SUCCESS

§ HCI_EXT_ModemTestTxCmd()

hciStatus_t HCI_EXT_ModemTestTxCmd ( uint8  cwMode,
uint8  txChan 
)

Start Modem TX Test

Start a continuous transmitter modem test, using either a modulated or unmodulated carrier wave tone, at the frequency that corresponds to the specified RF channel. Use HCI_EXT_EndModemTestCmd command to end the test.

The BLE device will transmit at maximum power.

This modem test can be used to satisfy in part radio regulation requirements as specific in standards such as ARIB STD-T66.

Note
A Controller reset will be issued by HCI_EXT_EndModemTestCmd.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_MODEM_TEST_TX
Parameters
cwModeTX Modulation
txChanTransmit RF channel k=0..39, where BLE F=2402+(k*2MHz).
Returns
HCI_SUCCESS

§ HCI_EXT_NumComplPktsLimitCmd()

hciStatus_t HCI_EXT_NumComplPktsLimitCmd ( uint8  limit,
uint8  flushOnEvt 
)

Set the Number of Completed Packets Limit

This command is used to set the limit on the minimum number of complete packets before a Number of Completed Packets event is returned by the Controller. If the limit is not reached by the end of a connection event, then the hciEvt_NumCompletedPkt_t event will be returned (if non-zero) based on the flushOnEvt flag. The limit can be set from one to HCI_MAX_NUM_CMD_BUFFERS (see HCI_LE_ReadBufSizeCmd). The default limit is 1; the default flushOnEvt flag is FALSE.

Corresponding Events:
hciEvt_NumCompletedPkt_t
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_NUM_COMPLETED_PKTS_LIMIT
Parameters
limitFrom 1 to HCI_MAX_NUM_CMD_BUFFERS.
flushOnEvtNumber of Completed Packets
Returns
HCI_SUCCESS

§ HCI_EXT_OnePktPerEvtCmd()

hciStatus_t HCI_EXT_OnePktPerEvtCmd ( uint8  control)

Set whether a connection will be limited to one packet per event.

Note: When set, all connections will be restricted to one packet per event.

Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_ONE_PKT_PER_EVT
Parameters
controlOne Packet Per Event
Returns
HCI_SUCCESS

§ HCI_EXT_PacketErrorRateCmd()

hciStatus_t HCI_EXT_PacketErrorRateCmd ( uint16  connHandle,
uint8  command 
)

Packet Error Rate Command

Reset or Read the Packet Error Rate counters for a connection.

Note
The counters are only 16 bits. At the shortest connection interval, this provides a bit over 8 minutes of data.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_PER , followed by another
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_PER
Parameters
connHandleThe LL connection ID on which to send this data.
commandPacket Error Rate Command
Returns
HCI_SUCCESS

§ HCI_EXT_PERbyChanCmd()

hciStatus_t HCI_EXT_PERbyChanCmd ( uint16  connHandle,
perByChan_t *  perByChan 
)

Packet Error Rate by Channel Command

This command is used to start or end Packet Error Rate by Channel counter accumulation for a connection, and can be used by an application to make Coexistence assessments. Based on the results, an application can perform an Update Channel Classification command to limit channel interference from other wireless standards.

If perByChan is NULL, counter accumulation will be discontinued. If perByChan is not NULL, then it is assumed that there is sufficient memory for the PER data of type perByChan_t (defined in ll.h)

// Packet Error Rate Information By Channel
typedef struct
{
uint16 numPkts[ LL_MAX_NUM_DATA_CHAN ];
uint16 numCrcErr[ LL_MAX_NUM_DATA_CHAN ];
} perByChan_t;
Note
This command is only allowed as a direct function call, and is only intended to be used by an embedded application.
As indicated, the counters are 16 bits. At the shortest connection interval, this provides a bit over 8 minutes of data.
This command can be used in combination with HCI_EXT_PacketErrorRateCmd.
Warning
It is the user's responsibility to ensure there is sufficient memory allocated. The user is also responsible for maintaining the counters, clearing them if required before starting accumulation.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_PER_BY_CHAN
Parameters
connHandleThe LL connection ID on which to send this data.
perByChanPointer to PER by Channel data, or NULL.
Returns
HCI_SUCCESS

§ HCI_EXT_ReadRandAddrCmd()

hciStatus_t HCI_EXT_ReadRandAddrCmd ( void  )

Read this device's BLE Random Address.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_READ_RAND_ADDR
Returns
HCI_SUCCESS

§ HCI_EXT_ResetSystemCmd()

hciStatus_t HCI_EXT_ResetSystemCmd ( uint8  mode)

Issue a soft or hard system reset.

This command is used to issue a hard or soft system reset. On the CC254x, a hard reset is caused by a watchdog timer timeout, while a soft reset is caused by resetting the PC to zero. On the CC264x, a hard reset is caused by setting the SYSRESET bit in the System Controller Reset Control register.

Note
The soft reset is currently not supported on the CC264x.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_RESET_SYSTEM
Parameters
modeReset Type
Returns
HCI_SUCCESS

§ HCI_EXT_SaveFreqTuneCmd()

hciStatus_t HCI_EXT_SaveFreqTuneCmd ( void  )

Save the frequency tuning value to non-volatile memory.

This setting will be used by the BLE Controller upon reset, and when waking from Sleep.

Note
This is a Production Test Mode only command. See HCI_EXT_EnablePTMCmd
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_FREQ_TUNE
Returns
HCI_SUCCESS

§ HCI_EXT_SetBDADDRCmd()

hciStatus_t HCI_EXT_SetBDADDRCmd ( uint8 *  bdAddr)

Set this device's BLE address (BDADDR).

This address will override the device's address determined when the device is reset (i.e. a hardware reset, not an HCI Controller Reset). To restore the device's initialized address, issue this command with an invalid address.

Note
This command is only allowed when the device's state is Standby.
Warning
This command is intended to only be used during initialization. Changing the device's BDADDR after various BLE operations have already taken place may cause unexpected problems.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_BDADDR
Parameters
bdAddrA pointer to a buffer to hold this device's address. An invalid address (i.e. all FF's) will restore this device's address to the address set at initialization.
Returns
HCI_SUCCESS

§ HCI_EXT_SetDtmTxPktCntCmd()

hciStatus_t HCI_EXT_SetDtmTxPktCntCmd ( uint16  txPktCnt)

Set the DTM transmit packet count.

The default system value for this feature is Direct Test Mode Options.

Corresponding Events
hciEvt_VSCmdComplete_t
Parameters
txPktCntNumber of DTM packets to transmit.
Returns
HCI_SUCCESS

§ HCI_EXT_SetExtScanChannels()

hciStatus_t HCI_EXT_SetExtScanChannels ( uint8  extScanChannelsMap)

This API is used to set the scan channels mapping.

input parameters

Parameters
extScanChannelsMap- channel scan definitions. Note: The parameter can receive the values - LL_SCN_ADV_MAP_CHAN_37, LL_SCN_ADV_MAP_CHAN_38, LL_SCN_ADV_MAP_CHAN_39, LL_SCN_ADV_MAP_CHAN_37_38, LL_SCN_ADV_MAP_CHAN_37_39, LL_SCN_ADV_MAP_CHAN_38_39, LL_SCN_ADV_MAP_CHAN_ALL.

GAP_scanChannels_t.

output parameters

Parameters
None.
Returns
HCI_SUCCESS

§ HCI_EXT_SetFastTxResponseTimeCmd()

hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd ( uint8  control)

Set Fast TX Response Time

This command is used to configure the Link Layer fast transmit response time feature. The default system value for this feature is HCI_EXT_ENABLE_FAST_TX_RESP_TIME. When the Host transmits data, the controller (by default) ensures the packet is sent over the LL connection with as little delay as possible, even when the connection is configured to use slave latency. That is, the transmit response time will tend to be no longer than the connection interval. This results in lower power savings since the LL may need to wake to transmit during connection events that would normally have been skipped. If saving power is more critical than fast transmit response time, then this feature can be disabled using this command. When disabled, the transmit response time will be no longer than slave latency + 1 times the connection interval.

Note
This command is only valid for a Slave controller.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_FAST_TX_RESP_TIME
Parameters
controlFast Tx Response Time
Returns
HCI_SUCCESS

§ HCI_EXT_SetFreqTuneCmd()

hciStatus_t HCI_EXT_SetFreqTuneCmd ( uint8  step)

Set Frequency Tuning

Set the frequency tuning up or down.When the current setting is already at its max value, then stepping up will have no effect. When the current setting is already at its min value, then stepping down will have no effect. This setting will only remain in effect until the device is reset unless HCI_EXT_SaveFreqTuneCmd is used to save it in non-volatile memory.

Note
This is a Production Test Mode only command. See HCI_EXT_EnablePTMCmd.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_FREQ_TUNE
Parameters
stepFrequency Tuning
Returns
HCI_SUCCESS

§ HCI_EXT_SetHostConnChanClassificationCmd()

hciStatus_t HCI_EXT_SetHostConnChanClassificationCmd ( uint8 *  chanMap,
uint16  connID 
)

Update the channel map of specific connection.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_SET_HOST_CONNECTION_CHANNEL_CLASSIFICATION
Parameters
chanMapPointer to the new channel map.
connIDconnection handle
Returns
HCI_SUCCESS

§ HCI_EXT_SetHostDefChanClassificationCmd()

hciStatus_t HCI_EXT_SetHostDefChanClassificationCmd ( uint8 *  chanMap)

Update the default channel map.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_SET_HOST_DEFAULT_CHANNEL_CLASSIFICATION
Parameters
chanMapPointer to the new channel map.
Returns
HCI_SUCCESS

§ HCI_EXT_SetLocalSupportedFeaturesCmd()

hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd ( uint8 *  localFeatures)

Write this device's supported features.

This command is used to set the Controller's Local Supported Features. For a complete list of supported LE features, see the BT Spec.

Note
This command can be issued either before or after one or more connections are formed. However, the local features set in this manner are only effective if performed before a Feature Exchange Procedure has been initiated by the Master. Once this control procedure has been completed for a particular connection, only the exchanged feature set for that connection will be used. Since the Link Layer may initiate the feature exchange procedure autonomously, it is best to use this command before the connection is formed.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_LOCAL_SUPPORTED_FEATURES
Parameters
localFeaturesPointer to eight bytes of local features.
Returns
HCI_SUCCESS

§ HCI_EXT_SetLocationingAccuracyCmd()

hciStatus_t HCI_EXT_SetLocationingAccuracyCmd ( uint16  handle,
uint8  sampleRate1M,
uint8  sampleSize1M,
uint8  sampleRate2M,
uint8  sampleSize2M,
uint8  sampleCtrl 
)

Set CTE accuracy for 1M and 2M PHY

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_SET_LOCATIONING_ACCURACY
Parameters
handle- Connection handle (0x0XXX) or periodic advertising train handle (0x1XXX).
sampleRate1Msample rate for PHY 1M range : 1 - least accuracy (as in 5.1 spec) to 4 - most accuracy
sampleSize1Msample size for PHY 1M range : 1 - 8 bits (as in 5.1 spec) or 2 - 16 bits (more accurate)
sampleRate2Msample rate for PHY 2M range : 1 - least accuracy (as in 5.1 spec) to 4 - most accuracy
sampleSize2Msample size for PHY 2M range : 1 - 8 bits (as in 5.1 spec) or 2 - 16 bits (more accurate)
sampleCtrl- sample control flags range : range : bit0=0 - Default filtering, bit0=1 - RAW_RF(no filtering), , bit1..7=0 - spare
Returns
HCI_SUCCESS

§ HCI_EXT_SetMaxDataLenCmd()

hciStatus_t HCI_EXT_SetMaxDataLenCmd ( uint16  txOctets,
uint16  txTime,
uint16  rxOctets,
uint16  rxTime 
)

Set the maximum Rx and Tx Octets (in bytes) and Time (in us).

Note
Any parameter not within a valid range will leave the corresponding supportedMax value unchanged.
Corresponding Events:
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_SET_MAX_DATA_LENGTH
Parameters
txOctetsValue of maximum supported Tx octets (in bytes).
txTimeValue of maximum supported Tx time (in us).
rxOctetsValue of maximum supported Rx octets (in bytes).
rxTimeValue of maximum supported Rx time (in us).
Returns
HCI_SUCCESS

§ HCI_EXT_SetMaxDtmTxPowerCmd()

hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd ( uint8  txPower)

Set the maximum transmit output power for DTM.

This command is used to override the RF transmitter output power used by the Direct Test Mode (DTM). Normally, the maximum transmitter output power setting used by DTM is the maximum transmitter output power setting for the device (i.e. 4 dBm for the CC2540; 0 dBm for the CC2541; 5 dBm for the CC264x). This command will change the value used by DTM.

Note
When DTM is ended by a call to HCI_LE_TestEndCmd, or a HCI_ResetCmd is used, the transmitter output power setting is restored to the default value of HCI_EXT_TX_POWER_0_DBM
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_MAX_DTM_TX_POWER
Parameters
txPowerTX Power Index
Returns
HCI_SUCCESS

§ HCI_EXT_SetPinOutputCmd()

hciStatus_t HCI_EXT_SetPinOutputCmd ( uint8  dio,
uint8  value 
)

Set pin as output and initialize it.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_EXT_SET_PIN_OUTPUT
Parameters
dio- pin number.
value- initialize pin value (0 or 1). 0xFF will return the pin to input.
Returns
HCI_SUCCESS

§ HCI_EXT_SetQOSDefaultParameters()

hciStatus_t HCI_EXT_SetQOSDefaultParameters ( uint32  paramDefaultVal,
uint8  paramType,
uint8  taskType 
)

This API is used to set the Default QOS Parameters Values.

/ref did_361975877 /ref did_408769671

input parameters

Parameters
paramDefaultVal- The default value of this qos type. For LL_QOS_TYPE_PRIORITY optional values: LL_QOS_LOW_PRIORITY, LL_QOS_MEDIUM_PRIORITY, LL_QOS_HIGH_PRIORITY. Range [0-2].
paramType- The type of parameter. General: LL_QOS_TYPE_PRIORITY. For connections: LL_QOS_TYPE_CONN_MIN_LENGTH / LL_QOS_TYPE_CONN_MAX_LENGTH.
taskType- The type of task we would like to change it's default value. For Connections task type: LL_QOS_CONN_TASK_TYPE. For Advertise task type: LL_QOS_ADV_TASK_TYPE. For Scan task type: LL_QOS_SCN_TASK_TYPE. For Initiator task type: LL_QOS_INIT_TASK_TYPE. For Periodic Advertise task type: LL_QOS_PERIODIC_ADV_TASK_TYPE. For Periodic Scan task type: LL_QOS_PERIODIC_SCN_TASK_TYPE. output parameters
None.
Returns
HCI_SUCCESS

§ HCI_EXT_SetQOSParameters()

hciStatus_t HCI_EXT_SetQOSParameters ( uint8  taskType,
uint8  paramType,
uint32  ParamVal,
uint16  taskHandle 
)

This API is used to set the QOS Parameters according to the entered parameter type.

/ref did_361975877 /ref did_408769671

input parameters

Parameters
taskType- The type of task. For Connections task type: LL_QOS_CONN_TASK_TYPE. For Advertise task type: LL_QOS_ADV_TASK_TYPE. For Scan task type: LL_QOS_SCN_TASK_TYPE. For Initiator task type: LL_QOS_INIT_TASK_TYPE. For Periodic Advertise task type: LL_QOS_PERIODIC_ADV_TASK_TYPE. For Periodic Scan task type: LL_QOS_PERIODIC_SCN_TASK_TYPE.
paramType- The type of parameter. General: LL_QOS_TYPE_PRIORITY. For connections: LL_QOS_TYPE_CONN_MIN_LENGTH / LL_QOS_TYPE_CONN_MAX_LENGTH.
paramVal- The value of the parameter. General: LL_QOS_TYPE_PRIORITY optional values: LL_QOS_LOW_PRIORITY, LL_QOS_MEDIUM_PRIORITY, LL_QOS_HIGH_PRIORITY. Range [0-2]. For connections only: LL_QOS_TYPE_CONN_MIN_LENGTH optional values: Time in [us]. for coded connection Range [LL_MIN_LINK_DATA_TIME_CODED (2704 us) - LL_MAX_LINK_DATA_TIME_CODED (17040 us)]. for uncoded connection Range [LL_MIN_LINK_DATA_TIME (328 us) - LL_MAX_LINK_DATA_TIME_UNCODED (2120 us)]. LL_QOS_TYPE_CONN_MAX_LENGTH optional values: Time in [us]. for coded connection Range [LL_MIN_LINK_DATA_TIME_CODED (2704 us) - Connection's Interval ] for uncoded connection Range [LL_MIN_LINK_DATA_TIME (328 us) - Connection's Interval ]

Note: For the LL_QOS_TYPE_CONN_MIN_LENGTH value a margin time is added of LL_TOTAL_MARGIN_TIME_FOR_MIN_CONN_RAT_TICKS. Note: LL_QOS_TYPE_CONN_MAX_LENGTH must be larger than (LL_QOS_TYPE_CONN_MIN_LENGTH + LL_TOTAL_MARGIN_TIME_FOR_MIN_CONN_RAT_TICKS) Value.

Parameters
taskHandle- The Task Handle of which we want to update it's parameters. This variable is not relevent for LL_QOS_SCN_TASK_TYPE / LL_QOS_INIT_TASK_TYPE because There is only 1 set for scanner or initiator.

output parameters

Parameters
None.
Returns
HCI_SUCCESS

§ HCI_EXT_SetRxGainCmd()

hciStatus_t HCI_EXT_SetRxGainCmd ( uint8  rxGain)

Set the receiver gain.

The default system value for this feature is HCI_EXT_RX_GAIN_STD

Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_RX_GAIN
Parameters
rxGainRX Gain
Returns
HCI_SUCCESS

§ HCI_EXT_SetSCACmd()

hciStatus_t HCI_EXT_SetSCACmd ( uint16  scaInPPM)

Set this device's Sleep Clock Accuracy.

For a slave device, this value is directly used, but only if power management is enabled. For a master device, this value is converted into one of eight ordinal values representing a SCA range, as specified in the BT Spec. For a Slave device, the value is directly used. The system default value for a Master and Slave device is 50ppm and 40ppm, respectively.

Note
This command is only allowed when the device is not in a connection. The device's SCA value remains unaffected by a HCI_ResetCmd
For AE, each defined Advertisement Set, and any subsequent Advertisement Set created by calling GapAdv_create, will use the same SCA value. As such, once a connection if formed, the value for the SCA could be changed using this API, thereby allowing subsequent connections to form with different SCA values, if so desired.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_SCA
Parameters
scaInPPMA SCA value in PPM from 0..500.
Returns
HCI_SUCCESS

§ HCI_EXT_SetSlaveLatencyOverrideCmd()

hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd ( uint8  control)

Enable or disable suspending slave latency.

This command is used to enable or disable the Slave Latency Override, allowing the user to ensure that Slave Latency is not applied even though it is active. The default value is HCI_EXT_DISABLE_SL_OVERRIDE

Note
This command will be disallowed if there are no active connection in the slave role.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_OVERRIDE_SL
Parameters
controlSlave Latency Override
Returns
HCI_SUCCESS

§ HCI_EXT_SetTxPowerCmd()

hciStatus_t HCI_EXT_SetTxPowerCmd ( uint8  txPower)

Set the transmit power.

The 'txPower' input parameter should be an index from TX Power Index.

The default system value for this feature is HCI_EXT_TX_POWER_0_DBM

Note
For the CC254x platform, a setting of 4dBm is only allowed for the CC2540.
Corresponding Events
hciEvt_VSCmdComplete_t with cmdOpcode HCI_EXT_SET_TX_POWER
Parameters
txPowerTX Power Index
Returns
HCI_SUCCESS

§ HCI_EXT_SetVirtualAdvAddrCmd()

hciStatus_t HCI_EXT_SetVirtualAdvAddrCmd ( uint8  advHandle,
uint8 *  bdAddr 
)

This API is used to set the advertiser's virtual public address.

Note: This command is only allowed when the advertise set is not active, and its PDU type is Legacy Non-Connectable and Non-Scanable.

/ref 239346186

input parameters

Parameters
handle- advertising handle
bdAddr- the address which will be assigned to the handle

output parameters

Parameters
None.
Returns
LL_STATUS_SUCCESS

§ HCI_HostNumCompletedPktCmd()

hciStatus_t HCI_HostNumCompletedPktCmd ( uint8  numHandles,
uint16 *  connHandles,
uint16 *  numCompletedPkts 
)

Set the number of HCI data packets completed per connection handle

Used by the Host to notify the Controller of the number of HCI data packets that have been completed for each connection handle since this command was previously sent to the controller.

The Host_Number_Of_Conpleted_Packets command is a special command. No event is normally generated after the command has completed. The command should only be issued by the Host if flow control in the direction from controller to the host is on and there is at least one connection, or if the controller is in local loop-back mode.

Note
It is assumed that there will be at most only one handle. Even if more than one handle is provided, the Controller does not track Host buffers as a function of connection handles (and isn't required to do so).
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_HOST_NUM_COMPLETED_PACKETS (if HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS is returned)
Parameters
numHandlesNumber of connection handles.
connHandlesArray of connection handles.
numCompletedPktsArray of number of completed packets.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS

§ HCI_LE_AddDeviceToPeriodicAdvListCmd()

hciStatus_t HCI_LE_AddDeviceToPeriodicAdvListCmd ( uint8  advAddrType,
uint8 *  advAddress,
uint8  advSID 
)

HCI_LE_AddDeviceToPeriodicAdvertiserListCmd

Used a scanner to add an entry, consisting of a single device address and SID, to the Periodic Advertiser list stored in the Controller.

/ref did_286039104

Parameters
advAddrType Advertiser address type - 0x00 - Public or Public Identity Address 0x01 - Random or Random (static) Identity Address
advAddress Advertiser address (6 bytes)
advSID Advertising SID subfield in the ADI field used to identify the Periodic Advertising (Range: 0x00 to 0x0F)
Returns
HCI status

§ HCI_LE_AddDeviceToResolvingListCmd()

hciStatus_t HCI_LE_AddDeviceToResolvingListCmd ( uint8  peerIdAddrType,
uint8 *  peerIdAddr,
uint8 *  peerIRK,
uint8 *  localIRK 
)

Add a device to the resolving list

Add one device to the list of address translations used to resolve Resolvable Private Addresses in the Controller.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ADD_DEVICE_TO_RESOLVING_LIST
Parameters
peerIdAddrTypeDevice Address Type
peerIdAddrPeer device Identity Address.
peerIRKIRK of peer device.
localIRKIRK for own device.
Returns
HCI_SUCCESS

§ HCI_LE_AddWhiteListCmd()

hciStatus_t HCI_LE_AddWhiteListCmd ( uint8  addrType,
uint8 *  devAddr 
)

Add a white list entry.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ADD_WHITE_LIST
Parameters
addrTypeDevice Address Type
devAddrPointer to address of device to put in white list.
Returns
HCI_SUCCESS

§ HCI_LE_ClearPeriodicAdvListCmd()

hciStatus_t HCI_LE_ClearPeriodicAdvListCmd ( void  )

HCI_LE_ClearPeriodicAdvListCmd

Used a scanner to remove all entries from the list of Periodic Advertisers in the Controller.

/ref did_286039104

Returns
HCI status

§ HCI_LE_ClearResolvingListCmd()

hciStatus_t HCI_LE_ClearResolvingListCmd ( void  )

Remove all devices from the whitelist

Remove all devices from the list of address translations used to resolve Resolvable Private addresses in the Controller.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_CLEAR_RESOLVING_LIST
Returns
HCI_SUCCESS

§ HCI_LE_ClearWhiteListCmd()

hciStatus_t HCI_LE_ClearWhiteListCmd ( void  )

Clear the white list.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_CLEAR_WHITE_LIST
Returns
HCI_SUCCESS

§ HCI_LE_ConnUpdateCmd()

hciStatus_t HCI_LE_ConnUpdateCmd ( uint16  connHandle,
uint16  connIntervalMin,
uint16  connIntervalMax,
uint16  connLatency,
uint16  connTimeout,
uint16  minLen,
uint16  maxLen 
)

Update the connection parameters.

Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_CONNECTION_UPDATE
hciEvt_BLEConnUpdateComplete_t
Parameters
connHandleConnection handle.
connIntervalMinMinimum allowed connection interval.
connIntervalMaxMaximum allowed connection interval.
connLatencyNumber of skipped events (slave latency).
connTimeoutConnection supervision timeout.
minLenInfo parameter about min length of conn.
maxLenInfo parameter about max length of conn.
Returns
HCI_SUCCESS

§ HCI_LE_CreateConnCancelCmd()

hciStatus_t HCI_LE_CreateConnCancelCmd ( void  )

Cancel connection.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_CREATE_CONNECTION_CANCEL
Returns
HCI_SUCCESS

§ HCI_LE_CreateConnCmd()

hciStatus_t HCI_LE_CreateConnCmd ( uint16  scanInterval,
uint16  scanWindow,
uint8  initFilterPolicy,
uint8  addrTypePeer,
uint8 *  peerAddr,
uint8  ownAddrType,
uint16  connIntervalMin,
uint16  connIntervalMax,
uint16  connLatency,
uint16  connTimeout,
uint16  minLen,
uint16  maxLen 
)

Create a connection.

Note
When the scanWindow equals the scanInterval then scanning is continuous.
Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_CREATE_CONNECTION
hciEvt_BLEConnComplete_u
Parameters
scanIntervalTime between Init scan events.
scanWindowTime of scan before Init scan event ends.
initFilterPolicyInitiator White List Policy
addrTypePeerDevice Address Type
peerAddrPointer to peer device's address.
ownAddrTypeDevice Address Type
connIntervalMinMinimum allowed connection interval.
connIntervalMaxMaximum allowed connection interval.
connLatencyNumber of skipped events (slave latency).
connTimeoutConnection supervision timeout.
minLenInfo parameter about min length of conn.
maxLenInfo parameter about max length of conn.
Returns
HCI_SUCCESS

§ HCI_LE_EncryptCmd()

hciStatus_t HCI_LE_EncryptCmd ( uint8 *  key,
uint8 *  plainText 
)

Perform an encryption using AES128.

Note
Input parameters are ordered MSB..LSB.
If a task has registered with HCI to receive security events, the hciEvt_CmdComplete_t events resulting from this operation will be sent to it instead of the task that registered with GAP_RegisterForMsgs. This is the case for all of the sample applications. In this case, the event will then be forwarded to the application as a HCI_SMP_EVENT_EVENT stack message.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ENCRYPT
Parameters
keyPointer to 16 byte encryption key.
plainTextPointer to 16 byte plain-text data.
Returns
HCI_SUCCESS

§ HCI_LE_EnhancedCteRxTestCmd()

hciStatus_t HCI_LE_EnhancedCteRxTestCmd ( uint8  rxChan,
uint8  rxPhy,
uint8  modIndex,
uint8  expectedCteLength,
uint8  expectedCteType,
uint8  slotDurations,
uint8  length,
uint8 *  pAntenna 
)

Start Enhanced CTE RX Test

Start a test where the DUT receives reference packets at a fixed interval. The tester generates the test reference packets.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ENHANCED_CTE_RECEIVER_TEST
Parameters
rxChanRx Channel k=0..39, where F=2402+(k*2MHz).
rxPhyRx PHY to use. See 2 Mbps & Coded PHY
modIndexDirect Test Mode Enhanced
expectedCteLength- Expected CTE length in 8 μs units.
expectedCteType- Expected CTE type as bitmask (bit 0 - Allow AoA CTE Response).
slotDurations- Switching and sampling slots in 1 us or 2 us each (1 or 2).
length- The number of Antenna IDs in the pattern (2 to 75).
pAntenna- List of Antenna IDs in the pattern.
Returns
HCI_SUCCESS

§ HCI_LE_EnhancedCteTxTestCmd()

hciStatus_t HCI_LE_EnhancedCteTxTestCmd ( uint8  txChan,
uint8  payloadLen,
uint8  payloadType,
uint8  txPhy,
uint8  cteLength,
uint8  cteType,
uint8  length,
uint8 *  pAntenna 
)

Start Enhanced CTE TX Test

Start a test where the DUT generates test reference packets at a fixed interval. The Controller shall transmit at maximum power.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ENHANCED_CTE_TRANSMITTER_TEST
Parameters
txChanTx RF channel k=0..39, where F=2402+(k*2MHz).
payloadLenByte length (0..37) in payload for each packet.
payloadTypeDirect Test Mode
txPhyTx PHY to use. See 2 Mbps & Coded PHY
cteLength- CTE length in 8 μs units.
cteType- CTE type as bitmask (bit 0 - Allow AoA CTE Response).
length- The number of Antenna IDs in the pattern (2 to 75).
pAntenna- List of Antenna IDs in the pattern.
Returns
HCI_SUCCESS

§ HCI_LE_EnhancedRxTestCmd()

hciStatus_t HCI_LE_EnhancedRxTestCmd ( uint8  rxChan,
uint8  rxPhy,
uint8  modIndex 
)

Start Enhanced RX Test

Start a test where the DUT receives reference packets at a fixed interval. The tester generates the test reference packets.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ENHANCED_RECEIVER_TEST
Parameters
rxChanRx Channel k=0..39, where F=2402+(k*2MHz).
rxPhyRx PHY to use. See 2 Mbps & Coded PHY
modIndexDirect Test Mode Enhanced
Returns
HCI_SUCCESS

§ HCI_LE_EnhancedTxTestCmd()

hciStatus_t HCI_LE_EnhancedTxTestCmd ( uint8  txChan,
uint8  payloadLen,
uint8  payloadType,
uint8  txPhy 
)

Start Enhanced TX Test

Start a test where the DUT generates test reference packets at a fixed interval. The Controller shall transmit at maximum power.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_ENHANCED_TRANSMITTER_TEST
Parameters
txChanTx RF channel k=0..39, where F=2402+(k*2MHz).
payloadLenByte length (0..37) in payload for each packet.
payloadTypeDirect Test Mode
txPhyTx PHY to use. See 2 Mbps & Coded PHY
Returns
HCI_SUCCESS

§ HCI_LE_GenerateDHKeyCmd()

hciStatus_t HCI_LE_GenerateDHKeyCmd ( uint8 *  publicKey)

Generate Diffie-Hellman Key

This LE API is used to initiate the generation of a Diffie-Hellman key in the Controller for use over the LE transport. This command takes the remote P-256 public key as input. The Diffie-Hellman key generation uses the private key generated by LE_Read_Local_P256_Public_Key command.

Warning
This routine will tie up the LL for about 160 ms
Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_GENERATE_DHKEY
hciEvt_BLEGenDHKeyComplete_t
Parameters
publicKeyThe remote P-256 public key (X-Y format).
Returns
HCI_SUCCESS

§ HCI_LE_LtkReqNegReplyCmd()

hciStatus_t HCI_LE_LtkReqNegReplyCmd ( uint16  connHandle)

Send a negative LTK reply to the Controller

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_LTK_REQ_NEG_REPLY
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_LE_LtkReqReplyCmd()

hciStatus_t HCI_LE_LtkReqReplyCmd ( uint16  connHandle,
uint8 *  ltk 
)

Send a positive LTK reply to the controller

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_LTK_REQ_REPLY
Parameters
connHandleConnection handle.
ltkPointer to 16 byte Long Term Key.
Returns
HCI_SUCCESS

§ HCI_LE_PeriodicAdvCreateSyncCancelCmd()

hciStatus_t HCI_LE_PeriodicAdvCreateSyncCancelCmd ( void  )

HCI_LE_PeriodicAdvCreateSyncCancelCmd

Used a scanner to cancel the HCI_LE_Periodic_Advertising_Create_Sync command while it is pending.

/ref did_286039104

Returns
HCI status

§ HCI_LE_PeriodicAdvCreateSyncCmd()

hciStatus_t HCI_LE_PeriodicAdvCreateSyncCmd ( uint8  options,
uint8  advSID,
uint8  advAddrType,
uint8 *  advAddress,
uint16  skip,
uint16  syncTimeout,
uint8  syncCteType 
)

HCI_LE_PeriodicAdvCreateSyncCmd

Used a scanner to synchronize with a periodic advertising train from an advertiser and begin receiving periodic advertising packets.

/ref did_286039104

Parameters
options Clear Bit 0 - Use the advSID, advAddrType, and advAddress parameters to determine which advertiser to listen to. Set Bit 0 - Use the Periodic Advertiser List to determine which advertiser to listen to. Clear Bit 1 - Reporting initially enabled. Set Bit 1 - Reporting initially disabled.
advSID Advertising SID subfield in the ADI field used to identify the Periodic Advertising (Range: 0x00 to 0x0F)
advAddrType Advertiser address type - 0x00 - public ; 0x01 - random
advAddress Advertiser address (6 bytes)
skip The maximum number of periodic advertising events that can be skipped after a successful receive (Range: 0x0000 to 0x01F3)
syncTimeout Synchronization timeout for the periodic advertising train Range: 0x000A to 0x4000 Time = N*10 ms Time Range: 100 ms to 163.84 s
syncCteType Set Bit 0 - Do not sync to packets with an AoA CTE Set Bit 1 - Do not sync to packets with an AoD CTE with 1 us slots Set Bit 2 - Do not sync to packets with an AoD CTE with 2 us slots Set Bit 4 - Do not sync to packets without a CTE
Returns
HCI_Success

§ HCI_LE_PeriodicAdvTerminateSyncCmd()

hciStatus_t HCI_LE_PeriodicAdvTerminateSyncCmd ( uint16  syncHandle)

HCI_LE_PeriodicAdvTerminateSyncCmd

Used a scanner to stop reception of the periodic advertising train identified by the syncHandle parameter.

/ref did_286039104

Parameters
syncHandle- Handle identifying the periodic advertising train (Range: 0x0000 to 0x0EFF) The handle was assigned by the Controller while generating the LE Periodic Advertising Sync Established event
Returns
HCI status

§ HCI_LE_RandCmd()

hciStatus_t HCI_LE_RandCmd ( void  )

Generate a random number.

The random number generation will not complete until any current radio operations end. If this is the case, the "status" of the pReturnParam of the initial hciEvt_CmdComplete_t will be set to LL_STATUS_ERROR_DUE_TO_DELAYED_RESOURCES (0x12). Another hciEvt_CmdComplete_t will be sent after the radio operations end that contains the random number.

Note
If a task has registered with HCI to receive security events, the hciEvt_CmdComplete_t events resulting from this operation will be sent to it instead of the task that registered with GAP_RegisterForMsgs. This is the case for all of the sample applications. In this case, the event will then be forwarded to the application as a HCI_SMP_EVENT_EVENT stack message.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_RAND
Returns
HCI_SUCCESS

§ HCI_LE_ReadAdvChanTxPowerCmd()

hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd ( void  )

Read transmit power when Advertising.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_ADV_CHANNEL_TX_POWER
Returns
HCI_SUCCESS

§ HCI_LE_ReadAntennaInformationCmd()

hciStatus_t HCI_LE_ReadAntennaInformationCmd ( void  )

Read the CTE antenna information.

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_ANTENNA_INFORMATION
Returns
HCI_SUCCESS

§ HCI_LE_ReadBufSizeCmd()

hciStatus_t HCI_LE_ReadBufSizeCmd ( void  )

Determine the maximum ACL data packet size allowed by the Controller.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_BUFFER_SIZE
Returns
HCI_SUCCESS

§ HCI_LE_ReadChannelMapCmd()

hciStatus_t HCI_LE_ReadChannelMapCmd ( uint16  connHandle)

Read a connection's data channel map.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_LE_ReadLocalP256PublicKeyCmd()

hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd ( void  )

Read local P-256 Public Key

Read the local P-256 public key from the Controller. The Controller shall generate a new P-256 public / private key pair upon receipt of this command.

Warning
This routine will tie up the LL for about 160 ms
Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_READ_LOCAL_P256_PUBLIC_KEY
hciEvt_BLEReadP256PublicKeyComplete_t
Returns
HCI_SUCCESS

§ HCI_LE_ReadLocalResolvableAddressCmd()

hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd ( uint8  localIdAddrType,
uint8 *  localIdAddr 
)

Read Local Resolvable Private Address

Get the current local Resolvable Private Address being used for the corresponding local Public or Random (Static) Identity Address.

Warning
The local Resolvable Private Address being used may change after this command is called.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_LOCAL_RESOLVABLE_ADDRESS
Parameters
localIdAddrTypeDevice Address Type
localIdAddrLocal device Identity Address.
Returns
HCI_SUCCESS

§ HCI_LE_ReadLocalSupportedFeaturesCmd()

hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd ( void  )

Read the LE locally supported features.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_LOCAL_SUPPORTED_FEATURES
Returns
HCI_SUCCESS

§ HCI_LE_ReadMaxDataLenCmd()

hciStatus_t HCI_LE_ReadMaxDataLenCmd ( void  )

Read max data length

Read the maximum supported transmit and receive payload octets and packet duration times.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_MAX_DATA_LENGTH
Returns
HCI_SUCCESS

§ HCI_LE_ReadPeerResolvableAddressCmd()

hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd ( uint8  peerIdAddrType,
uint8 *  peerIdAddr 
)

Read the Peer Resolvable Address

Get the current peer Resolvable Private Address being used for the corresponding peer Public or Random (Static) Identity Address.

Warning
The peer's Resolvable Private Address being used may change after this command is called.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_PEER_RESOLVABLE_ADDRESS
Parameters
peerIdAddrTypeDevice Address Type
peerIdAddrPeer device Identity Address.
Returns
HCI_SUCCESS

§ HCI_LE_ReadPeriodicAdvListSizeCmd()

hciStatus_t HCI_LE_ReadPeriodicAdvListSizeCmd ( void  )

HCI_LE_ReadPeriodicAdvListSizeCmd

Used a scanner to read the total number of Periodic Advertiser list entries that can be stored in the Controller.

/ref did_286039104

Returns
HCI status Periodic Advertiser List Size (Range: 0x01 to 0xFF)

§ HCI_LE_ReadPhyCmd()

hciStatus_t HCI_LE_ReadPhyCmd ( uint16  connHandle)

Read the current transmitter and receiver PHY.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_PHY and Return Parameters of - 0: Status 1: Connection Handle LSB 2: Connection Handle MSB 3: Tx PHY 4: Rx PHY
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_LE_ReadRemoteUsedFeaturesCmd()

hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd ( uint16  connHandle)

Read the remote device's used features.

Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_READ_REMOTE_USED_FEATURES
hciEvt_BLEReadRemoteFeatureComplete_t
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_LE_ReadResolvingListSizeCmd()

hciStatus_t HCI_LE_ReadResolvingListSizeCmd ( void  )

Read Resolving List Size

Read the total number of address translation entries in the resolving list that can be stored in the Controller.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_RESOLVING_LIST_SIZE
Returns
HCI_SUCCESS

§ HCI_LE_ReadRfPathCompCmd()

hciStatus_t HCI_LE_ReadRfPathCompCmd ( void  )

Read the Tx and Rx RF Path Compensation values.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_RF_PATH_COMPENSATION
Returns
HCI_SUCCESS

§ HCI_LE_ReadSuggestedDefaultDataLenCmd()

hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd ( void  )

Read Suggested Default Data Length

Read the default maximum transmit packet size and the default maximum packet transmit time to be used for new connections.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH
Returns
HCI_SUCCESS

§ HCI_LE_ReadSupportedStatesCmd()

hciStatus_t HCI_LE_ReadSupportedStatesCmd ( void  )

Read the Controller's supported states.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_SUPPORTED_STATES
Returns
HCI_SUCCESS

§ HCI_LE_ReadTxPowerCmd()

hciStatus_t HCI_LE_ReadTxPowerCmd ( void  )

Read the minimum and maximum supported Tx Power.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_TX_POWER
Returns
HCI_SUCCESS

§ HCI_LE_ReadWhiteListSizeCmd()

hciStatus_t HCI_LE_ReadWhiteListSizeCmd ( void  )

Read the white list.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_READ_WHITE_LIST_SIZE
Returns
HCI_SUCCESS

§ HCI_LE_ReceiverTestCmd()

hciStatus_t HCI_LE_ReceiverTestCmd ( uint8  rxChan)

Start the receiver Direct Test Mode test.

Note
An HCI reset should be issued when done using DTM
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_RECEIVER_TEST
Parameters
rxChanRx Channel k=0..39, where F=2402+(k*2MHz).
Returns
HCI_SUCCESS

§ HCI_LE_RemoteConnParamReqNegReplyCmd()

hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd ( uint16  connHandle,
uint8  reason 
)

Negatively reply to the Connection Parameter Update Request

This LE API is used to negatively reply to the HCI LE Remote Connection Parameter Request event from the Controller. This command indicates that the Host has denied the remote device's request to change connection parameters.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_REMOTE_CONN_PARAM_REQ_NEG_REPLY
Parameters
connHandleConnection handle.
reasonReason connection parameter request was rejected.
Returns
HCI_SUCCESS

§ HCI_LE_RemoteConnParamReqReplyCmd()

hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd ( uint16  connHandle,
uint16  connIntervalMin,
uint16  connIntervalMax,
uint16  connLatency,
uint16  connTimeout,
uint16  minLen,
uint16  maxLen 
)

Positively reply to the Connection Parameter Update Request

This LE API is used to positively reply to the HCI LE Remote Connection Parameter Request event from the Controller. This command indicates that the Host has accepted the remote device's request to change connection parameters.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_REMOTE_CONN_PARAM_REQ_REPLY
Parameters
connHandleConnection handle.
connIntervalMinMinimum allowed connection interval.
connIntervalMaxMaximum allowed connection interval.
connLatencyNumber of skipped events (slave latency).
connTimeoutConnection supervision timeout.
minLenInfo parameter about min length of conn.
maxLenInfo parameter about max length of conn.
Returns
HCI_SUCCESS

§ HCI_LE_RemoveDeviceFromPeriodicAdvListCmd()

hciStatus_t HCI_LE_RemoveDeviceFromPeriodicAdvListCmd ( uint8  advAddrType,
uint8 *  advAddress,
uint8  advSID 
)

HCI_LE_RemoveDeviceFromPeriodicAdvListCmd

Used a scanner to remove one entry from the list of Periodic Advertisers stored in the Controller.

/ref did_286039104

Parameters
advAddrType Advertiser address type - 0x00 - Public or Public Identity Address 0x01 - Random or Random (static) Identity Address
advAddress Advertiser address (6 bytes)
advSID Advertising SID subfield in the ADI field used to identify the Periodic Advertising (Range: 0x00 to 0x0F)
Returns
HCI status

§ HCI_LE_RemoveDeviceFromResolvingListCmd()

hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd ( uint8  peerIdAddrType,
uint8 *  peerIdAddr 
)

Remove a device from the whitelist

Remove one device from the list of address translations used to resolve Resolvable Private Addresses in the Controller.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_REMOVE_DEVICE_FROM_RESOLVING_LIST
Parameters
peerIdAddrTypeDevice Address Type
peerIdAddrPeer device Identity Address.
Returns
HCI_SUCCESS

§ HCI_LE_RemoveWhiteListCmd()

hciStatus_t HCI_LE_RemoveWhiteListCmd ( uint8  addrType,
uint8 *  devAddr 
)

Remove a white list entry.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_REMOVE_WHITE_LIST
Parameters
addrTypeDevice Address Type
devAddrPointer to address of device to remove from the white list.
Returns
HCI_SUCCESS

§ HCI_LE_SetAddressResolutionEnableCmd()

hciStatus_t HCI_LE_SetAddressResolutionEnableCmd ( uint8  addrResolutionEnable)

Disable / Enable Address Resolution

Enable resolution of Resolvable Private Addresses in the Controller. This causes the Controller to use the resolving list whenever the Controller receives a local or peer Resolvable Private Address.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_ADDRESS_RESOLUTION_ENABLE
Parameters
addrResolutionEnablePrivacy 1.2
Returns
HCI_SUCCESS

§ HCI_LE_SetAdvDataCmd()

hciStatus_t HCI_LE_SetAdvDataCmd ( uint8  dataLen,
uint8 *  pData 
)

Set the Advertising data.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_ADV_DATA
Parameters
dataLenLength of Advertising data.
pDataPointer to Advertising data.
Returns
HCI_SUCCESS

§ HCI_LE_SetAdvEnableCmd()

hciStatus_t HCI_LE_SetAdvEnableCmd ( uint8  advEnable)

Turn Advertising on or off.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_ADV_ENABLE
Parameters
advEnableAdvertiser Commands
Returns
HCI_SUCCESS

§ HCI_LE_SetAdvParamCmd()

hciStatus_t HCI_LE_SetAdvParamCmd ( uint16  advIntervalMin,
uint16  advIntervalMax,
uint8  advType,
uint8  ownAddrType,
uint8  directAddrType,
uint8 *  directAddr,
uint8  advChannelMap,
uint8  advFilterPolicy 
)

Set the Advertising parameters.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_ADV_PARAM
Parameters
advIntervalMinMinimum allowed advertising interval.
advIntervalMaxMaximum allowed advertising interval.
advTypeAdvertiser Type
ownAddrType

§ HCI_LE_SetAdvStatus()

hciStatus_t HCI_LE_SetAdvStatus ( aeEnableCmd_t *  pCmdParams)

Set the Advertising status. This function will be called only when BLE3_CMD compilation flag is set

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_MAKE_DISCOVERABLE_DONE or
Parameters
pCmdParams- Pointer to input parameters
Returns
HCI_SUCCESS

§ HCI_LE_SetConnectionCteReceiveParamsCmd()

hciStatus_t HCI_LE_SetConnectionCteReceiveParamsCmd ( uint16  connHandle,
uint8  samplingEnable,
uint8  slotDurations,
uint8  length,
uint8 *  pAntenna 
)

Used to enable or disable sampling received Constant Tone Extension fields on a connection and to set the antenna switching pattern and switching and sampling slot durations to be used.

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTION_CTE_RECEIVE_PARAMS
Parameters
connHandle- Connection handle.
samplingEnable- Sample CTE on a connection and report the samples to the Host (0 or 1).
slotDurations- Switching and sampling slots in 1 us or 2 us each (1 or 2).
length- The number of Antenna IDs in the pattern (2 to 75).
pAntenna- List of Antenna IDs in the pattern.
Returns
HCI_SUCCESS

§ HCI_LE_SetConnectionCteRequestEnableCmd()

hciStatus_t HCI_LE_SetConnectionCteRequestEnableCmd ( uint16  connHandle,
uint8  enable,
uint16  interval,
uint8  length,
uint8  type 
)

Start or stop initiating the CTE Request procedure on a connection.

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTION_CTE_REQUEST_ENABLE
Parameters
connHandle- Connection handle.
enable- Enable or disable CTE Request for a connection (1 or 0).
interval- Requested interval for initiating the CTE Request procedure in number of connection events (1 to 0xFFFF)
length- Min length of the CTE being requested in 8 us units (2 to 20).
type- Requested CTE type (0 - AoA, 1 - AoD with 1us slots, 2 - AoD with 2us slots).
Returns
HCI_SUCCESS

§ HCI_LE_SetConnectionCteResponseEnableCmd()

hciStatus_t HCI_LE_SetConnectionCteResponseEnableCmd ( uint16  connHandle,
uint8  enable 
)

Set a respond to LL_CTE_REQ PDUs with LL_CTE_RSP PDUs on a connection.

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTION_CTE_RESPONSE_ENABLE
Parameters
connHandle- Connection handle.
enable- Enable or disable CTE Response for a connection (1 or 0).
Returns
HCI_SUCCESS

§ HCI_LE_SetConnectionCteTransmitParamsCmd()

hciStatus_t HCI_LE_SetConnectionCteTransmitParamsCmd ( uint16  connHandle,
uint8  types,
uint8  length,
uint8 *  pAntenna 
)

Set the antenna switching pattern and permitted Constant Tone Extension types used for transmitting Constant Tone Extensions requested by the peer device on a connection.

/ref did_202754181

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTION_CTE_TRANSMIT_PARAMS
Parameters
connHandle- Connection handle.
types- CTE types as bitmask (bit 0 - Allow AoA CTE Response).
length- The number of Antenna IDs in the pattern (2 to 75).
pAntenna- List of Antenna IDs in the pattern.
Returns
HCI_SUCCESS

§ HCI_LE_SetConnectionlessCteTransmitEnableCmd()

hciStatus_t HCI_LE_SetConnectionlessCteTransmitEnableCmd ( uint8  advHandle,
uint8  enable 
)

Used by the Host to request that the Controller enables or disables the use of Constant Tone Extensions in any periodic advertising.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTIONLESS_CTE_TRANSMIT_ENABLE
Parameters
advHandle Used to identify a periodic advertising train
enable 0x00 - Advertising with CTE is disabled (default) 0x01 - Advertising with CTE is enabled
Returns
HCI status

§ HCI_LE_SetConnectionlessCteTransmitParamsCmd()

hciStatus_t HCI_LE_SetConnectionlessCteTransmitParamsCmd ( uint8  advHandle,
uint8  cteLen,
uint8  cteType,
uint8  cteCount,
uint8  length,
uint8 *  pAntenna 
)

Used by the Host to set the type, length, and antenna switching pattern for the transmission of Constant Tone Extensions in any periodic advertising.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_CONNECTIONLESS_CTE_TRANSMIT_PARAMS
Parameters
advHandle Used to identify a periodic advertising train
cteLen CTE length (0x02 - 0x14) 16 usec - 160 usec
cteType CTE type (0 - AoA, 1 - AoD 1usec, 2 - AoD 2usec)
cteCount Number of CTE's to transmit in the same periodic event
length Number of items in Antenna array (relevant to AoD only)
pAntenna Pointer to Antenna array (relevant to AoD only)
Returns
HCI status

§ HCI_LE_SetConnectionlessIqSamplingEnableCmd()

hciStatus_t HCI_LE_SetConnectionlessIqSamplingEnableCmd ( uint16  syncHandle,
uint8  samplingEnable,
uint8  slotDurations,
uint8  maxSampledCtes,
uint8  length,
uint8 *  pAntenna 
)

HCI_LE_SetConnectionlessIqSamplingEnableCmd

Used by the Host to request that the Controller enables or disables capturing IQ samples from the CTE of periodic advertising packets in the periodic advertising train identified by the syncHandle parameter.

Parameters
syncHandle- Handle identifying the periodic advertising train (Range: 0x0000 to 0x0EFF)
samplingEnable- Sample CTE on a received periodic advertising and report the samples to the Host.
slotDurations- Switching and sampling slots in 1 us or 2 us each (1 or 2).
maxSampledCtes 0 - Sample and report all available CTEs 1 to 16 - Max number of CTEs to sample and report in each periodic event
length Number of items in Antenna array (relevant to AoA only)
pAntenna Pointer to Antenna array (relevant to AoA only)
Returns
HCI status

§ HCI_LE_SetDataLenCmd()

hciStatus_t HCI_LE_SetDataLenCmd ( uint16  connHandle,
uint16  txOctets,
uint16  txTime 
)

Set Data Length

Set the maximum transmission packet size and the maximum packet transmission time for the connection.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_DATA_LENGTH
Parameters
connHandleConnection handle.
txOctetsMaximum transmit payload size (in bytes).
txTimeMaximum transmit time (in us).
Returns
HCI_SUCCESS

§ HCI_LE_SetDefaultPhyCmd()

hciStatus_t HCI_LE_SetDefaultPhyCmd ( uint8  allPhys,
uint8  txPhy,
uint8  rxPhy 
)

Set Default PHY

Allows the Host to specify its preferred values for the transmitter and receiver PHY to be used for all subsequent connections.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_DEFAULT_PHY
Parameters
allPhysHost preference on how to handle txPhy and rxPhy.
txPhyBit field of Host preferred Tx PHY. See 2 Mbps & Coded PHY
rxPhyBit field of Host preferred Rx PHY. See 2 Mbps & Coded PHY
Returns
HCI_SUCCESS

§ HCI_LE_SetEventMaskCmd()

hciStatus_t HCI_LE_SetEventMaskCmd ( uint8 *  pEventMask)

Set the HCI LE event mask

The event mask to determine which LE events are supported.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_EVENT_MASK
Parameters
pEventMaskPointer to LE event mask of 8 bytes.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS

§ HCI_LE_SetExtAdvData()

hciStatus_t HCI_LE_SetExtAdvData ( aeSetDataCmd_t *  pCmdParams)

Set the Advertising data. This function will be called only when BLE3_CMD compilation flag is set

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_ADV_DATA
Parameters
pCmdParams- Pointer to input parameters
Returns
HCI_SUCCESS

§ HCI_LE_SetExtScanRspData()

hciStatus_t HCI_LE_SetExtScanRspData ( aeSetDataCmd_t *  pCmdParams)

Set the Advertising Scan Response data. This function will be called only when BLE3_CMD compilation flag is set

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_SCAN_RSP_DATA
Parameters
pCmdParams- Pointer to input parameters
Returns
HCI_SUCCESS

§ HCI_LE_SetHostChanClassificationCmd()

hciStatus_t HCI_LE_SetHostChanClassificationCmd ( uint8 *  chanMap)

Update the current data channel map.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION
Parameters
chanMapPointer to the new channel map.
Returns
HCI_SUCCESS

§ HCI_LE_SetPeriodicAdvDataCmd()

hciStatus_t HCI_LE_SetPeriodicAdvDataCmd ( uint8  advHandle,
uint8  operation,
uint8  dataLength,
uint8 *  data 
)

Used to set the advertiser data used in periodic advertising PDUs. This command may be issued at any time after the advertising set identified by the Advertising_Handle parameter has been configured for periodic advertising using the HCI_LE_Set_Periodic_Advertising_Parameters command.

/ref did_286039104

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_PERIODIC_ADV_DATA
Parameters
advHandle Used to identify a periodic advertising train
operation 0x00 - Intermediate fragment of fragmented periodic advertising data 0x01 - First fragment of fragmented periodic advertising data 0x02 - Last fragment of fragmented periodic advertising data 0x03 - Complete periodic advertising data
dataLength The number of bytes in the Advertising Data parameter
data Periodic advertising data
Returns
HCI status

§ HCI_LE_SetPeriodicAdvEnableCmd()

hciStatus_t HCI_LE_SetPeriodicAdvEnableCmd ( uint8  enable,
uint8  advHandle 
)

Used to request the advertiser to enable or disable the periodic advertising for the advertising set.

/ref did_286039104

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_PERIODIC_ADV_ENABLE
Parameters
enable 0x00 - Periodic advertising is disabled (default) 0x01 - Periodic advertising is enabled
advHandle Used to identify a periodic advertising train
Returns
HCI status

§ HCI_LE_SetPeriodicAdvParamsCmd()

hciStatus_t HCI_LE_SetPeriodicAdvParamsCmd ( uint8  advHandle,
uint16  periodicAdvIntervalMin,
uint16  periodicAdvIntervalMax,
uint16  periodicAdvProp 
)

Used by the Host to set the advertiser parameters for periodic advertising

/ref did_286039104

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_PERIODIC_ADV_PARAMETERS
Parameters
advHandle Used to identify a periodic advertising train Created by LE Set Extended Advertising Parameters command
periodicAdvIntervalMin Minimum advertising interval for periodic advertising Range: 0x0006 to 0xFFFF Time = N * 1.25 ms Time Range: 7.5ms to 81.91875 s
periodicAdvIntervalMax Maximum advertising interval for periodic advertising Range: 0x0006 to 0xFFFF Time = N * 1.25 ms Time Range: 7.5ms to 81.91875 s
periodicAdvProp Periodic advertising properties Set bit 6 for include TxPower in the advertising PDU
Returns
HCI status

§ HCI_LE_SetPeriodicAdvReceiveEnableCmd()

hciStatus_t HCI_LE_SetPeriodicAdvReceiveEnableCmd ( uint16  syncHandle,
uint8  enable 
)

HCI_LE_SetPeriodicAdvReceiveEnableCmd

Used a scanner to enable or disable reports for the periodic advertising train identified by the syncHandle parameter.

/ref did_286039104

Parameters
syncHandle- Handle identifying the periodic advertising train (Range: 0x0000 to 0x0EFF) The handle was assigned by the Controller while generating the LE Periodic Advertising Sync Established event
enable- 0x00 - Reporting disable 0x01 - Reporting enable
Returns
HCI status

§ HCI_LE_SetPhyCmd()

hciStatus_t HCI_LE_SetPhyCmd ( uint16  connHandle,
uint8  allPhys,
uint8  txPhy,
uint8  rxPhy,
uint16  phyOpts 
)

Request a change to the transmitter and receiver PHY for a connection.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_PHY
Parameters
connHandleConnection handle.
allPhysHost preference on how to handle txPhy and rxPhy.
txPhyBit field of Host preferred Tx PHY.
rxPhyBit field of Host preferred Rx PHY.
phyOptsBit field of Host preferred PHY options.
Returns
HCI_SUCCESS

§ HCI_LE_SetPrivacyModeCmd()

hciStatus_t HCI_LE_SetPrivacyModeCmd ( uint8  peerIdAddrType,
uint8 *  peerIdAddr,
uint8  privacyMode 
)

Set Privacy Mode

Set the Privacy Mode to either Network Privacy Mode or Device Privacy Mode. The Privacy Mode can be set for any peer in the Resolving List.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_PRIVACY_MODE
Parameters
peerIdAddrTypeDevice Address Type
peerIdAddrPeer device Identity Address.
privacyModeHCI_NETWORK_PRIVACY_MODE HCI_DEVICE_PRIVACY_MODE
Returns
HCI_SUCCESS

§ HCI_LE_SetRandomAddressCmd()

hciStatus_t HCI_LE_SetRandomAddressCmd ( uint8 *  pRandAddr)

Set this device's Random address.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_RANDOM_ADDR
Parameters
pRandAddrPointer to random address.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS

§ HCI_LE_SetResolvablePrivateAddressTimeoutCmd()

hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd ( uint16  rpaTimeout)

Set Resolvable Private Address Timeout

Set the length of time the Controller uses a Resolvable Private Address before a new Resolvable Private Address is generated and starts being used.

Note
This timeout applies to all addresses generated by the Controller..
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT
Parameters
rpaTimeoutRPA timeout (in secs).
Returns
HCI_SUCCESS

§ HCI_LE_SetScanEnableCmd()

hciStatus_t HCI_LE_SetScanEnableCmd ( uint8  scanEnable,
uint8  filterDuplicates 
)

Turn Scanning on or off.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_SCAN_ENABLE hciEvt_DevInfo_t
Parameters
scanEnableScan Commands
filterDuplicatesScan Filtering
Returns
HCI_SUCCESS

§ HCI_LE_SetScanParamCmd()

hciStatus_t HCI_LE_SetScanParamCmd ( uint8  scanType,
uint16  scanInterval,
uint16  scanWindow,
uint8  ownAddrType,
uint8  filterPolicy 
)

Set the Scan parameters.

Note
When the scanWindow equals the scanInterval then scanning is continuous.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_SCAN_PARAM
Parameters
scanType

§ HCI_LE_SetScanRspDataCmd()

hciStatus_t HCI_LE_SetScanRspDataCmd ( uint8  dataLen,
uint8 *  pData 
)

Set the Advertising Scan Response data.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_SCAN_RSP_DATA
Parameters
dataLenLength of Scan Response data.
pDataPointer to Scan Response data.
Returns
HCI_SUCCESS

§ HCI_LE_StartEncyptCmd()

hciStatus_t HCI_LE_StartEncyptCmd ( uint16  connHandle,
uint8 *  random,
uint8 *  encDiv,
uint8 *  ltk 
)

Start encryption in a connection.

Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_LE_START_ENCRYPTION
hciEvt_EncryptChange_t
hciEvt_EncryptChange_t
Parameters
connHandleConnection handle.
randomPointer to eight byte Random number.
encDivPointer to two byte Encrypted Diversifier.
ltkPointer to 16 byte Long Term Key.
Returns
HCI_SUCCESS

§ HCI_LE_TestEndCmd()

hciStatus_t HCI_LE_TestEndCmd ( void  )

End the Direct Test Mode test.

Warning
An HCI reset should be issued when done using DTM.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_TEST_END
Returns
HCI_SUCCESS

§ HCI_LE_TransmitterTestCmd()

hciStatus_t HCI_LE_TransmitterTestCmd ( uint8  txChan,
uint8  dataLen,
uint8  pktPayload 
)

This LE API is used to start the transmit Direct Test Mode test.

The Controller shall transmit at maximum power.

Warning
An HCI reset should be issued when done using DTM.
Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_TRANSMITTER_TEST
Parameters
txChanTx RF frequency k=0..39, where F=2402+(k*2MHz).
dataLenTest data length: 0..37 bytes
pktPayloadDirect Test Mode
Returns
HCI_SUCCESS

§ HCI_LE_WriteRfPathCompCmd()

hciStatus_t HCI_LE_WriteRfPathCompCmd ( int16  txPathParam,
int16  rxPathParam 
)

Write the Tx and Rx RF Path Compensation values.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_WRITE_RF_PATH_COMPENSATION
Parameters
txPathParamTx path compensation parameter (in 0.1 dBm).
rxPathParamRx path compensation parameter (in 0.1 dBm).
Returns
HCI_SUCCESS

§ HCI_LE_WriteSuggestedDefaultDataLenCmd()

hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd ( uint16  txOctets,
uint16  txTime 
)

Write Suggested Default Data Length

Set the default maximum transmission packet size and the default maximum packet transmission time for the connection.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH
Parameters
txOctetsMaximum transmit payload size (in bytes).
txTimeMaximum transmit time (in us).
Returns
HCI_SUCCESS

§ HCI_ReadAuthPayloadTimeoutCmd()

hciStatus_t HCI_ReadAuthPayloadTimeoutCmd ( uint16  connHandle,
uint16 *  aptoValue 
)

Read the connection's Authenticated Payload Timeout value.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_AUTH_PAYLOAD_TIMEOUT
Parameters
connHandleThe LL connection ID to read the APTO value from.
aptoValuePointer to current APTO value, in units of 10 ms.
Returns
HCI_SUCCESS

§ HCI_ReadBDADDRCmd()

hciStatus_t HCI_ReadBDADDRCmd ( void  )

Read this device's BLE address (BDADDR).

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_BDADDR
Returns
HCI_SUCCESS

§ HCI_ReadLocalSupportedCommandsCmd()

hciStatus_t HCI_ReadLocalSupportedCommandsCmd ( void  )

Read the locally supported commands.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_LOCAL_SUPPORTED_COMMANDS
Returns
HCI_SUCCESS

§ HCI_ReadLocalSupportedFeaturesCmd()

hciStatus_t HCI_ReadLocalSupportedFeaturesCmd ( void  )

Read the locally supported features.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_LOCAL_SUPPORTED_FEATURES
Returns
HCI_SUCCESS

§ HCI_ReadLocalVersionInfoCmd()

hciStatus_t HCI_ReadLocalVersionInfoCmd ( void  )

Read the local version information.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_LOCAL_VERSION_INFO
Returns
HCI_SUCCESS

§ HCI_ReadRemoteVersionInfoCmd()

hciStatus_t HCI_ReadRemoteVersionInfoCmd ( uint16  connHandle)

Request version information from the remote device in a connection.

Corresponding Events
hciEvt_CommandStatus_t with cmdOpcode HCI_READ_REMOTE_VERSION_INFO
hciPacket_t with HCI_READ_REMOTE_INFO_COMPLETE_EVENT_CODE (if HCI_SUCCESS is returned)
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_REMOTE_VERSION_INFO (if HCI_SUCCESS is not returned)
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_UNKNOWN_CONN_ID : no active connection
HCI_ERROR_CODE_CONTROLLER_BUSY : version request already sent and is pending

§ HCI_ReadRssiCmd()

hciStatus_t HCI_ReadRssiCmd ( uint16  connHandle)

Read RSSI of last packet

Read the RSSI of the last packet received on a connection given by the connection handle. If the Receiver Modem test is running (HCI_EXT_ModemTestRxCmd ), then the RF RSSI for the last received data will be returned. If there is no RSSI value, then HCI_RSSI_NOT_AVAILABLE will be returned.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_RSSI
Parameters
connHandleConnection handle.
Returns
HCI_SUCCESS

§ HCI_ReadTransmitPowerLevelCmd()

hciStatus_t HCI_ReadTransmitPowerLevelCmd ( uint16  connHandle,
uint8  txPwrType 
)

Read the transmit power level.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_READ_TRANSMIT_POWER
Parameters
connHandleConnection handle.
txPwrTyperef TX_Power_Mode
Returns
HCI_SUCCESS

§ HCI_ResetCmd()

hciStatus_t HCI_ResetCmd ( void  )

Reset the Link Layer.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_RESET
Returns
HCI_SUCCESS

§ HCI_SetEventMaskCmd()

hciStatus_t HCI_SetEventMaskCmd ( uint8 *  pMask)

Set the HCI event mask

The event mask is used to determine which events are supported.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_SET_EVENT_MASK
Parameters
pMaskPointer to an eight byte event mask.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS : bad parameters

§ HCI_SetEventMaskPage2Cmd()

hciStatus_t HCI_SetEventMaskPage2Cmd ( uint8 *  pMask)

Set the HCI event mask page 2

The HCI Event mask page 2 is used to determine which events are supported.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_SET_EVENT_MASK_PAGE_2
Parameters
pMaskPointer to an eight byte event mask.
Returns
HCI_SUCCESS
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS : bad parameters

§ HCI_WriteAuthPayloadTimeoutCmd()

hciStatus_t HCI_WriteAuthPayloadTimeoutCmd ( uint16  connHandle,
uint16  aptoValue 
)

Used to write the connection's Authenticated Payload Timeout value.

Corresponding Events
hciEvt_CmdComplete_t with cmdOpcode HCI_WRITE_AUTH_PAYLOAD_TIMEOUT
Parameters
connHandleThe LL connection ID to write the APTO value to.
aptoValueThe APTO value, in units of 10 ms.
Returns
HCI_SUCCESS
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale