TI BLE Stack API Documentation  2.03.06
Modules | Files | Functions | Variables
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 Function Maps
 
 HCI Constants
 
 HCI Events
 

Files

file  hci.h
 HCI layer interface.
 

Functions

uint8 HCI_ValidConnTimeParams (uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout)
 This API is used to check that the connection time parameter ranges are valid, and that the connection time parameter combination is valid. It also checks if the min/max CI range is valid. More...
 
void HCI_TestAppTaskRegister (uint8 taskID)
 HCI vendor specific registration for HCI Test Application. More...
 
void HCI_GAPTaskRegister (uint8 taskID)
 HCI vendor specific registration for Host GAP. More...
 
void HCI_L2CAPTaskRegister (uint8 taskID)
 HCI vendor specific registration for Host L2CAP. More...
 
void HCI_SMPTaskRegister (uint8 taskID)
 HCI vendor specific registration for Host SMP. More...
 
void HCI_ExtTaskRegister (uint8 taskID)
 HCI vendor specific registration for Host extended commands. More...
 
hciStatus_t HCI_SendDataPkt (uint16 connHandle, uint8 pbFlag, uint16 pktLen, uint8 *pData)
 This API is used to send a ACL data packet over a connection. More...
 
hciStatus_t HCI_DisconnectCmd (uint16 connHandle, uint8 reason)
 This BT API is used to terminate a connection. More...
 
hciStatus_t HCI_ReadRemoteVersionInfoCmd (uint16 connHandle)
 This BT API is used to request version information from the the remote device in a connection. More...
 
hciStatus_t HCI_SetEventMaskCmd (uint8 *pMask)
 This BT API is used to set the HCI event mask, which is used to determine which events are supported. More...
 
hciStatus_t HCI_SetEventMaskPage2Cmd (uint8 *pMask)
 This BT API is used to set the HCI event mask page 2, which is used to determine which events are supported. More...
 
hciStatus_t HCI_ResetCmd (void)
 Reset the Link Layer. More...
 
hciStatus_t HCI_ReadTransmitPowerLevelCmd (uint16 connHandle, uint8 txPwrType)
 Read the transmit power level. More...
 
hciStatus_t HCI_SetControllerToHostFlowCtrlCmd (uint8 flowControlEnable)
 This BT API is used by the Host to turn flow control on or off for data sent from the Controller to Host. Related Events: HCI_CommandCompleteEvent. More...
 
hciStatus_t HCI_HostBufferSizeCmd (uint16 hostAclPktLen, uint8 hostSyncPktLen, uint16 hostTotalNumAclPkts, uint16 hostTotalNumSyncPkts)
 This BT API is used by the Host to notify the Controller of the maximum size ACL buffer size the Controller can send to the Host. More...
 
hciStatus_t HCI_HostNumCompletedPktCmd (uint8 numHandles, uint16 *connHandles, uint16 *numCompletedPkts)
 This BT API is 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. More...
 
hciStatus_t HCI_ReadAuthPayloadTimeoutCmd (uint16 connHandle, uint16 *aptoValue)
 Read the connection's Authenticated Payload Timeout value. More...
 
hciStatus_t HCI_WriteAuthPayloadTimeoutCmd (uint16 connHandle, uint16 aptoValue)
 Used to write the connection's Authenticated Payload Timeout value. More...
 
hciStatus_t HCI_ReadLocalVersionInfoCmd (void)
 Read the local version information. More...
 
hciStatus_t HCI_ReadLocalSupportedCommandsCmd (void)
 Read the locally supported commands. More...
 
hciStatus_t HCI_ReadLocalSupportedFeaturesCmd (void)
 Read the locally supported features. More...
 
hciStatus_t HCI_ReadBDADDRCmd (void)
 Read this device's BLE address (BDADDR). More...
 
hciStatus_t HCI_ReadRssiCmd (uint16 connHandle)
 Read RSSI of last packet. More...
 
hciStatus_t HCI_LE_SetEventMaskCmd (uint8 *pEventMask)
 This LE API is used to set the HCI LE event mask, which is used to determine which LE events are supported. More...
 
hciStatus_t HCI_LE_ReadBufSizeCmd (void)
 This LE API is used by the Host to determine the maximum ACL data packet size allowed by the Controller. More...
 
hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd (void)
 Read the LE locally supported features. More...
 
hciStatus_t HCI_LE_SetRandomAddressCmd (uint8 *pRandAddr)
 Set this device's Random address. More...
 
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. More...
 
hciStatus_t HCI_LE_SetAdvDataCmd (uint8 dataLen, uint8 *pData)
 Set the Advertising data. More...
 
hciStatus_t HCI_LE_SetScanRspDataCmd (uint8 dataLen, uint8 *pData)
 Set the Advertising Scan Response data. More...
 
hciStatus_t HCI_LE_SetAdvEnableCmd (uint8 advEnable)
 Turn Advertising on or off. More...
 
hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd (void)
 Read transmit power when Advertising. More...
 
hciStatus_t HCI_LE_SetScanParamCmd (uint8 scanType, uint16 scanInterval, uint16 scanWindow, uint8 ownAddrType, uint8 filterPolicy)
 Set the Scan parameters. More...
 
hciStatus_t HCI_LE_SetScanEnableCmd (uint8 scanEnable, uint8 filterDuplicates)
 Turn Scanning on or off. More...
 
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. More...
 
hciStatus_t HCI_LE_CreateConnCancelCmd (void)
 Cancel connection. More...
 
hciStatus_t HCI_LE_ReadWhiteListSizeCmd (void)
 Read the white list. More...
 
hciStatus_t HCI_LE_ClearWhiteListCmd (void)
 Clear the white list. More...
 
hciStatus_t HCI_LE_AddWhiteListCmd (uint8 addrType, uint8 *devAddr)
 Add a white list entry. More...
 
hciStatus_t HCI_LE_RemoveWhiteListCmd (uint8 addrType, uint8 *devAddr)
 Remove a white list entry. More...
 
hciStatus_t HCI_LE_ConnUpdateCmd (uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
 Update the connection parameters. More...
 
hciStatus_t HCI_LE_SetHostChanClassificationCmd (uint8 *chanMap)
 Update the current data channel map. More...
 
hciStatus_t HCI_LE_ReadChannelMapCmd (uint16 connHandle)
 Read a connection's data channel map. More...
 
hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd (uint16 connHandle)
 Read the remote device's used features. More...
 
hciStatus_t HCI_LE_EncryptCmd (uint8 *key, uint8 *plainText)
 Perform an encryption using AES128. More...
 
hciStatus_t HCI_LE_RandCmd (void)
 Generate a random number. More...
 
hciStatus_t HCI_LE_StartEncyptCmd (uint16 connHandle, uint8 *random, uint8 *encDiv, uint8 *ltk)
 Start encryption in a connection. More...
 
hciStatus_t HCI_LE_LtkReqReplyCmd (uint16 connHandle, uint8 *ltk)
 This LE API is used by the Host to send to the Controller a positive LTK reply. More...
 
hciStatus_t HCI_LE_LtkReqNegReplyCmd (uint16 connHandle)
 This LE API is used by the Host to send to the Controller a negative LTK reply. More...
 
hciStatus_t HCI_LE_ReadSupportedStatesCmd (void)
 Read the Controller's supported states. More...
 
hciStatus_t HCI_LE_ReceiverTestCmd (uint8 rxChan)
 Start the receiver Direct Test Mode test. More...
 
hciStatus_t HCI_LE_TransmitterTestCmd (uint8 txChan, uint8 dataLen, uint8 pktPayload)
 This LE API is used to start the transmit Direct Test Mode test. More...
 
hciStatus_t HCI_LE_TestEndCmd (void)
 End the Direct Test Mode test. More...
 
hciStatus_t HCI_LE_RemoteConnParamReqReplyCmd (uint16 connHandle, uint16 connIntervalMin, uint16 connIntervalMax, uint16 connLatency, uint16 connTimeout, uint16 minLen, uint16 maxLen)
 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. More...
 
hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd (uint16 connHandle, uint8 reason)
 Negatively reply to the Conneciton Parameter Update Request. More...
 
hciStatus_t HCI_LE_SetDataLenCmd (uint16 connHandle, uint16 txOctets, uint16 txTime)
 Set Data Length. More...
 
hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd (void)
 Read Suggested Default Data Length. More...
 
hciStatus_t HCI_LE_WriteSuggestedDefaultDataLenCmd (uint16 txOctets, uint16 txTime)
 Write Suggested Default Data Length. More...
 
hciStatus_t HCI_LE_ReadMaxDataLenCmd (void)
 Read max data length. More...
 
hciStatus_t HCI_LE_AddDeviceToResolvingListCmd (uint8 peerIdAddrType, uint8 *peerIdAddr, uint8 *peerIRK, uint8 *localIRK)
 Add a device to the resolving list. More...
 
hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd (uint8 peerIdAddrType, uint8 *peerIdAddr)
 Remove a device from the whitelist. More...
 
hciStatus_t HCI_LE_ClearResolvingListCmd (void)
 Remove all devices from the whitelist. More...
 
hciStatus_t HCI_LE_ReadResolvingListSizeCmd (void)
 Read Resolving List Size. More...
 
hciStatus_t HCI_LE_ReadPeerResolvableAddressCmd (uint8 peerIdAddrType, uint8 *peerIdAddr)
 Read the Peer Resolvable Address. More...
 
hciStatus_t HCI_LE_ReadLocalResolvableAddressCmd (uint8 localIdAddrType, uint8 *localIdAddr)
 Read Local Resolvable Private Address. More...
 
hciStatus_t HCI_LE_SetAddressResolutionEnableCmd (uint8 addrResolutionEnable)
 Disable / Enable Address Resolution. More...
 
hciStatus_t HCI_LE_SetResolvablePrivateAddressTimeoutCmd (uint16 rpaTimeout)
 Set Resolvable Private Address Timeout. More...
 
hciStatus_t HCI_LE_ReadLocalP256PublicKeyCmd (void)
 Read local P-256 Public Key. More...
 
hciStatus_t HCI_LE_GenerateDHKeyCmd (uint8 *publicKey)
 Generate Diffie-Hellman Key. More...
 
hciStatus_t HCI_LE_ReadPhyCmd (uint16 connHandle)
 Read the current transmitter and receiver PHY. More...
 
hciStatus_t HCI_LE_SetDefaultPhyCmd (uint8 allPhys, uint8 txPhy, uint8 rxPhy)
 Set Default PHY. More...
 
hciStatus_t HCI_LE_SetPhyCmd (uint16 connHandle, uint8 allPhys, uint8 txPhy, uint8 rxPhy)
 This LE API is used to request a change to the transmitter and receiver PHY for a connection. More...
 
hciStatus_t HCI_LE_EnhancedRxTestCmd (uint8 rxChan, uint8 rxPhy, uint8 modIndex)
 Start Enhanced RX Test. More...
 
hciStatus_t HCI_LE_EnhancedTxTestCmd (uint8 txChan, uint8 payloadLen, uint8 payloadType, uint8 txPhy)
 Start Enhanced TX Test. More...
 
hciStatus_t HCI_EXT_SetRxGainCmd (uint8 rxGain)
 Set the receiver gain. More...
 
hciStatus_t HCI_EXT_SetTxPowerCmd (uint8 txPower)
 Set the transmit power. More...
 
hciStatus_t HCI_EXT_OnePktPerEvtCmd (uint8 control)
 This HCI Extension API is used to set whether a connection will be limited to one packet per event. More...
 
hciStatus_t HCI_EXT_ClkDivOnHaltCmd (uint8 control)
 Set whether the system clock will be divided when the MCU is halted. More...
 
hciStatus_t HCI_EXT_DeclareNvUsageCmd (uint8 mode)
 This HCI Extension API is used to indicate to the Controller whether or not the Host will be using the NV memory during BLE operations. More...
 
hciStatus_t HCI_EXT_DecryptCmd (uint8 *key, uint8 *encText)
 This HCI Extension API is used to decrypt encrypted data using AES128. More...
 
hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd (uint8 *localFeatures)
 This HCI Extension API is used to write this device's supported features. More...
 
hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd (uint8 control)
 This HCI Extension API is used to set whether transmit data is sent as soon as possible even when slave latency is used. More...
 
hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd (uint8 control)
 This HCI Extension API is used to to enable or disable suspending slave latency. More...
 
hciStatus_t HCI_EXT_ModemTestTxCmd (uint8 cwMode, uint8 txChan)
 This API is used 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_EndModemTest command to end the test. More...
 
hciStatus_t HCI_EXT_ModemHopTestTxCmd (void)
 Start Modem Hop Tx Test. More...
 
hciStatus_t HCI_EXT_ModemTestRxCmd (uint8 rxChan)
 Start Modem Hop RX Test. More...
 
hciStatus_t HCI_EXT_EndModemTestCmd (void)
 This API is used to shutdown a modem test. A complete Controller reset will take place. More...
 
hciStatus_t HCI_EXT_SetBDADDRCmd (uint8 *bdAddr)
 This API is used to set this device's BLE address (BDADDR). More...
 
hciStatus_t HCI_EXT_SetSCACmd (uint16 scaInPPM)
 This API is used to set this device's Sleep Clock Accuracy. More...
 
hciStatus_t HCI_EXT_EnablePTMCmd (void)
 This HCI Extension API is used to enable Production Test Mode. More...
 
hciStatus_t HCI_EXT_SetFreqTuneCmd (uint8 step)
 This HCI Extension API is used to set the frequency tuning up or down. Setting the mode up/down decreases/increases the amount of capacitance on the external crystal oscillator. More...
 
hciStatus_t HCI_EXT_SaveFreqTuneCmd (void)
 This HCI Extension API is used to save the frequency tuning value to flash. More...
 
hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd (uint8 txPower)
 This HCI Extension API is used to set the maximum transmit output power for Direct Test Mode. More...
 
hciStatus_t HCI_EXT_MapPmIoPortCmd (uint8 ioPort, uint8 ioPin)
 This HCI Extension API is used to configure and map a CC254x I/O Port as a General Purpose I/O (GPIO) output signal that reflects the Power Management (PM) state of the CC254x device. The GPIO output will be High on Wake, and Low upon entering Sleep. This feature can be disabled by specifying HCI_EXT_PM_IO_PORT_NONE for the ioPort (ioPin is then ignored). The system default value upon hardware reset is disabled. This command can be used to control an external DC-DC Converter (its actual intent) such has the TI TPS62730 (or any similar converter that works the same way). This command should be used with extreme care as it will override how the Port/Pin was previously configured! This includes the mapping of Port 0 pins to 32kHz clock output, Analog I/O, UART, Timers; Port 1 pins to Observables, Digital Regulator status, UART, Timers; Port 2 pins to an external 32kHz XOSC. The selected Port/Pin will be configured as an output GPIO with interrupts masked. Careless use can result in a reconfiguration that could disrupt the system. It is therefore the user's responsibility to ensure the selected Port/Pin does not cause any conflicts in the system. More...
 
hciStatus_t HCI_EXT_DisconnectImmedCmd (uint16 connHandle)
 This HCI Extension API is used to disconnect the connection immediately. More...
 
hciStatus_t HCI_EXT_PacketErrorRateCmd (uint16 connHandle, uint8 command)
 This function is used to Reset or Read the Packet Error Rate counters for a connection. More...
 
hciStatus_t HCI_EXT_PERbyChanCmd (uint16 connHandle, perByChan_t *perByChan)
 This HCI Extension API is used to start or end Packet Error Rate by Channel counter accumulation for a connection. If the pointer is not NULL, it is assumed there is sufficient memory for the PER data, per the type perByChan_t. If NULL, then the operation is considered disabled. More...
 
hciStatus_t HCI_EXT_ExtendRfRangeCmd (void)
 This HCI Extension API is used to Extend Rf Range using the TI CC2590 2.4 GHz RF Front End device. More...
 
hciStatus_t HCI_EXT_HaltDuringRfCmd (uint8 mode)
 Halt During RF Command. More...
 
hciStatus_t HCI_EXT_AdvEventNoticeCmd (uint8 taskID, uint16 taskEvent)
 This HCI Extension API is used to enable or disable a notification to the specified task using the specified task event whenever a Adv event ends. A non-zero taskEvent value is taken to be "enable", while a zero valued taskEvent is taken to be "disable". More...
 
hciStatus_t HCI_EXT_ScanEventNoticeCmd (uint8 taskID, uint16 taskEvent)
 Scan Event Notice Command. More...
 
hciStatus_t HCI_EXT_ConnEventNoticeCmd (uint16 connHandle, uint8 taskID, uint16 taskEvent)
 This HCI Extension API is used to 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". More...
 
hciStatus_t HCI_EXT_BuildRevisionCmd (uint8 mode, uint16 userRevNum)
 This HCI Extension API is used set a user revision number or read the build revision number. More...
 
hciStatus_t HCI_EXT_DelaySleepCmd (uint16 delay)
 This HCI Extension API is used set the sleep delay. More...
 
hciStatus_t HCI_EXT_ResetSystemCmd (uint8 mode)
 This HCI Extension API is used to issue a soft or hard system reset. More...
 
hciStatus_t HCI_EXT_LLTestModeCmd (uint8 testCase)
 This HCI Extension API is used to send a LL Test Mode test case. More...
 
hciStatus_t HCI_EXT_OverlappedProcessingCmd (uint8 mode)
 This HCI Extension API is used to enable or disable overlapped processing. More...
 
hciStatus_t HCI_EXT_NumComplPktsLimitCmd (uint8 limit, uint8 flushOnEvt)
 This HCI Extension API is used to set the minimum number of completed packets which must be met before a Number of Completed Packets event is returned. If the limit is not reach by the end of the connection event, then a Number of Completed Packets event will be returned (if non-zero) based on the flushOnEvt flag. More...
 
hciStatus_t HCI_EXT_GetConnInfoCmd (uint8 *numAllocConns, uint8 *numActiveConns, hciConnInfo_t *activeConnInfo)
 Get Connection Info. More...
 
hciStatus_t HCI_EXT_SetMaxDataLenCmd (uint16 txOctets, uint16 txTime, uint16 rxOctets, uint16 rxTime)
 This LE API is used to set the maximum supported Rx and Tx Octets (in bytes) and Time (in us). More...
 
hciStatus_t HCI_EXT_ScanReqRptCmd (uint8 mode)
 This LE API is used to enable/disable Scan Request Reports. More...
 

Variables

osal_event_hdr_t hciEvt_BLEConnComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEConnComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEConnComplete_t::status
 status of event
 
uint16 hciEvt_BLEConnComplete_t::connectionHandle
 connection handle
 
uint8 hciEvt_BLEConnComplete_t::role
 role of connection
 
uint8 hciEvt_BLEConnComplete_t::peerAddrType
 peer address type
 
uint8 hciEvt_BLEConnComplete_t::peerAddr [6]
 peer address
 
uint16 hciEvt_BLEConnComplete_t::connInterval
 connection interval
 
uint16 hciEvt_BLEConnComplete_t::connLatency
 connection latency
 
uint16 hciEvt_BLEConnComplete_t::connTimeout
 connection supervision timeout
 
uint8 hciEvt_BLEConnComplete_t::clockAccuracy
 connection clock accuracy
 
osal_event_hdr_t hciEvt_BLEEnhConnComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEEnhConnComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEEnhConnComplete_t::status
 status of event
 
uint16 hciEvt_BLEEnhConnComplete_t::connectionHandle
 connection handle
 
uint8 hciEvt_BLEEnhConnComplete_t::role
 role of connection
 
uint8 hciEvt_BLEEnhConnComplete_t::peerAddrType
 peer address type
 
uint8 hciEvt_BLEEnhConnComplete_t::peerAddr [6]
 peer address
 
uint16 hciEvt_BLEEnhConnComplete_t::connInterval
 connection interval
 
uint16 hciEvt_BLEEnhConnComplete_t::connLatency
 connection latency
 
uint16 hciEvt_BLEEnhConnComplete_t::connTimeout
 connection supervision timeout
 
uint8 hciEvt_BLEEnhConnComplete_t::clockAccuracy
 connection clock accuracy
 
uint8 hciEvt_BLEEnhConnComplete_t::localRPA [6]
 local resolvable private address
 
uint8 hciEvt_BLEEnhConnComplete_t::peerRPA [6]
 peer resolvable private address
 
hciEvt_BLEConnComplete_t _hciEvt_BLEConnComplete_u_::legEvt
 connection complete event
 
hciEvt_BLEEnhConnComplete_t _hciEvt_BLEConnComplete_u_::enhEvt
 enhanced connection complete event
 
uint8 hciEvt_DevInfo_t::eventType
 advertisement or scan response event type
 
uint8 hciEvt_DevInfo_t::addrType
 public or random address type
 
uint8 hciEvt_DevInfo_t::addr [6]
 device address
 
uint8 hciEvt_DevInfo_t::dataLen
 length of report data
 
uint8 hciEvt_DevInfo_t::rspData [31]
 report data given by dataLen
 
int8 hciEvt_DevInfo_t::rssi
 report RSSI
 
osal_event_hdr_t hciEvt_BLEAdvPktReport_t::hdr
 osal event header
 
uint8 hciEvt_BLEAdvPktReport_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEAdvPktReport_t::numDevices
 number of discovered devices
 
hciEvt_DevInfo_thciEvt_BLEAdvPktReport_t::devInfo
 pointer to the array of devInfo
 
osal_event_hdr_t hciEvt_BLEScanReqReport_t::hdr
 osal event header
 
uint8 hciEvt_BLEScanReqReport_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEScanReqReport_t::eventType
 scan request event type
 
uint8 hciEvt_BLEScanReqReport_t::peerAddrType
 peer address type
 
uint8 hciEvt_BLEScanReqReport_t::peerAddr [6]
 peer address
 
uint8 hciEvt_BLEScanReqReport_t::ownAddrType
 public or random address type
 
uint8 hciEvt_BLEScanReqReport_t::ownAddr [6]
 peer device address
 
uint8 hciEvt_BLEScanReqReport_t::bleChan
 BLE channel.
 
int8 hciEvt_BLEScanReqReport_t::rssi
 report RSSI
 
osal_event_hdr_t hciEvt_BLEConnUpdateComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEConnUpdateComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEConnUpdateComplete_t::status
 status of event
 
uint16 hciEvt_BLEConnUpdateComplete_t::connectionHandle
 connection handle
 
uint16 hciEvt_BLEConnUpdateComplete_t::connInterval
 connection interval
 
uint16 hciEvt_BLEConnUpdateComplete_t::connLatency
 connection latency
 
uint16 hciEvt_BLEConnUpdateComplete_t::connTimeout
 connection supervision timeout
 
osal_event_hdr_t hciEvt_BLEReadRemoteFeatureComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEReadRemoteFeatureComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEReadRemoteFeatureComplete_t::status
 status of event
 
uint16 hciEvt_BLEReadRemoteFeatureComplete_t::connectionHandle
 connection handle
 
uint8 hciEvt_BLEReadRemoteFeatureComplete_t::features [8]
 features
 
osal_event_hdr_t hciEvt_EncryptChange_t::hdr
 osal event header
 
uint8 hciEvt_EncryptChange_t::BLEEventCode
 BLE Event Code.
 
uint16 hciEvt_EncryptChange_t::connHandle
 connection handle
 
uint8 hciEvt_EncryptChange_t::reason
 reason
 
uint8 hciEvt_EncryptChange_t::encEnable
 encryption enabled or not
 
osal_event_hdr_t hciEvt_BLELTKReq_t::hdr
 osal event header
 
uint8 hciEvt_BLELTKReq_t::BLEEventCode
 BLE Event Code.
 
uint16 hciEvt_BLELTKReq_t::connHandle
 connection handle
 
uint8 hciEvt_BLELTKReq_t::random [8]
 random
 
uint16 hciEvt_BLELTKReq_t::encryptedDiversifier
 encrypted diversifier
 
osal_event_hdr_t hciEvt_NumCompletedPkt_t::hdr
 osal event header
 
uint8 hciEvt_NumCompletedPkt_t::numHandles
 number of handles
 
uint16 * hciEvt_NumCompletedPkt_t::pConnectionHandle
 pointer to the connection handle array
 
uint16 * hciEvt_NumCompletedPkt_t::pNumCompletedPackets
 pointer to the number of completed packets array
 
osal_event_hdr_t hciEvt_CmdComplete_t::hdr
 osal event header
 
uint8 hciEvt_CmdComplete_t::numHciCmdPkt
 number of HCI Command Packet
 
uint16 hciEvt_CmdComplete_t::cmdOpcode
 command opcode
 
uint8 * hciEvt_CmdComplete_t::pReturnParam
 pointer to the return parameter
 
osal_event_hdr_t hciEvt_VSCmdComplete_t::hdr
 osal event header
 
uint8 hciEvt_VSCmdComplete_t::length
 length of parametric data, in bytes
 
uint16 hciEvt_VSCmdComplete_t::cmdOpcode
 command opcode
 
uint8 * hciEvt_VSCmdComplete_t::pEventParam
 event parameters
 
osal_event_hdr_t hciEvt_CommandStatus_t::hdr
 osal event header
 
uint8 hciEvt_CommandStatus_t::cmdStatus
 command status
 
uint8 hciEvt_CommandStatus_t::numHciCmdPkt
 number of HCI command packets
 
uint16 hciEvt_CommandStatus_t::cmdOpcode
 command opcode
 
osal_event_hdr_t hciEvt_HardwareError_t::hdr
 osal event header
 
uint8 hciEvt_HardwareError_t::hardwareCode
 hardware error code
 
osal_event_hdr_t hciEvt_DisconnComplete_t::hdr
 osal event header
 
uint8 hciEvt_DisconnComplete_t::status
 status of event
 
uint16 hciEvt_DisconnComplete_t::connHandle
 connection handle
 
uint8 hciEvt_DisconnComplete_t::reason
 reason
 
osal_event_hdr_t hciEvt_BufferOverflow_t::hdr
 osal event header
 
uint8 hciEvt_BufferOverflow_t::linkType
 synchronous or asynchronous buffer overflow
 
osal_event_hdr_t hciEvt_AptoExpired_t::hdr
 osal event header
 
uint16 hciEvt_AptoExpired_t::connHandle
 connection handle
 
osal_event_hdr_t hciEvt_BLERemoteConnParamReq_t::hdr
 osal event header
 
uint8 hciEvt_BLERemoteConnParamReq_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLERemoteConnParamReq_t::status
 status of event
 
uint16 hciEvt_BLERemoteConnParamReq_t::connHandle
 connection handle
 
uint16 hciEvt_BLERemoteConnParamReq_t::Interval_Min
 minimum connection interval
 
uint16 hciEvt_BLERemoteConnParamReq_t::Interval_Max
 maximum connection interval
 
uint16 hciEvt_BLERemoteConnParamReq_t::Latency
 slave latency
 
uint16 hciEvt_BLERemoteConnParamReq_t::Timeout
 supervision timeout
 
osal_event_hdr_t hciEvt_BLEPhyUpdateComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEPhyUpdateComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEPhyUpdateComplete_t::status
 status of event
 
uint16 hciEvt_BLEPhyUpdateComplete_t::connHandle
 connection handle
 
uint8 hciEvt_BLEPhyUpdateComplete_t::txPhy
 TX PHY.
 
uint8 hciEvt_BLEPhyUpdateComplete_t::rxPhy
 RX PHY.
 
osal_event_hdr_t hciEvt_BLEDataLengthChange_t::hdr
 osal event header
 
uint8 hciEvt_BLEDataLengthChange_t::BLEEventCode
 BLE Event Code.
 
uint16 hciEvt_BLEDataLengthChange_t::connHandle
 connection handle
 
uint16 hciEvt_BLEDataLengthChange_t::maxTxOctets
 maximum transmission bytes
 
uint16 hciEvt_BLEDataLengthChange_t::maxTxTime
 maximum transmission time
 
uint16 hciEvt_BLEDataLengthChange_t::maxRxOctets
 maximum receive bytes
 
uint16 hciEvt_BLEDataLengthChange_t::maxRxTime
 maximum receive time
 
osal_event_hdr_t hciEvt_BLEReadP256PublicKeyComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEReadP256PublicKeyComplete_t::BLEEventCode
 BLE Event code.
 
uint8 hciEvt_BLEReadP256PublicKeyComplete_t::status
 status
 
uint8 hciEvt_BLEReadP256PublicKeyComplete_t::p256Key [LL_SC_P256_KEY_LEN]
 p256 key
 
osal_event_hdr_t hciEvt_BLEGenDHKeyComplete_t::hdr
 osal event header
 
uint8 hciEvt_BLEGenDHKeyComplete_t::BLEEventCode
 BLE Event Code.
 
uint8 hciEvt_BLEGenDHKeyComplete_t::status
 status
 
uint8 hciEvt_BLEGenDHKeyComplete_t::dhKey [LL_SC_DHKEY_LEN]
 DH Key.
 
uint8 hciRetParam_LeReadBufSize_t::status
 status of event
 
uint16 hciRetParam_LeReadBufSize_t::dataPktLen
 data packet length
 
uint8 hciRetParam_LeReadBufSize_t::numDataPkts
 number of data packets
 
osal_event_hdr_t hciPacket_t::hdr
 OSAL event header.
 
uint8 * hciPacket_t::pData
 data
 
osal_event_hdr_t hciDataPacket_t::hdr
 OSAL Event header.
 
uint8 hciDataPacket_t::pktType
 packet type
 
uint16 hciDataPacket_t::connHandle
 connection handle
 
uint8 hciDataPacket_t::pbFlag
 flag
 
uint16 hciDataPacket_t::pktLen
 packet length
 
uint8 * hciDataPacket_t::pData
 data
 
uint8 hciConnInfo_t::connId
 device connection handle
 
uint8 hciConnInfo_t::role
 device connection role
 
uint8 hciConnInfo_t::addr [LL_DEVICE_ADDR_LEN]
 peer device address
 
uint8 hciConnInfo_t::addrType
 peer device address type
 
uint16 hciPER_t::numPkts
 total number of rx packets
 
uint16 hciPER_t::numCrcErr
 number rx packets with CRC error
 
uint16 hciPER_t::numEvents
 number of connection events
 
uint16 hciPER_t::numMMissedEvents
 number missed connection events
 

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_DisconnectCmd()

hciStatus_t HCI_DisconnectCmd ( uint16  connHandle,
uint8  reason 
)

This BT API is used to terminate a connection.

Corresponding Events
hciEvt_CommandStatus_t
hciEvt_DisconnComplete_t
Parameters
connHandle- Connection handle.
reason- Reason for disconnection: HCI_DISCONNECT_AUTH_FAILURE, HCI_DISCONNECT_REMOTE_USER_TERM, HCI_DISCONNECT_REMOTE_DEV_POWER_OFF, HCI_DISCONNECT_UNSUPPORTED_REMOTE_FEATURE, HCI_DISCONNECT_KEY_PAIRING_NOT_SUPPORTED HCI_DISCONNECT_UNACCEPTABLE_CONN_INTERVAL
Returns
hciStatus_t

§ HCI_EXT_AdvEventNoticeCmd()

hciStatus_t HCI_EXT_AdvEventNoticeCmd ( uint8  taskID,
uint16  taskEvent 
)

This HCI Extension API is used to enable or disable a notification to the specified task using the specified task event whenever a Adv event ends. A non-zero taskEvent value is taken to be "enable", while a zero valued taskEvent is taken to be "disable".

Parameters
taskID- User's task ID.
taskEvent- User's task event.
Returns
hciStatus_t

§ HCI_EXT_BuildRevisionCmd()

hciStatus_t HCI_EXT_BuildRevisionCmd ( uint8  mode,
uint16  userRevNum 
)

This HCI Extension API is used set a user revision number or read the build revision number.

Parameters
mode- HCI_EXT_SET_USER_REVISION | HCI_EXT_READ_BUILD_REVISION
userRevNum- user defined reviison number
Returns
hciStatus_t

§ HCI_EXT_ClkDivOnHaltCmd()

hciStatus_t HCI_EXT_ClkDivOnHaltCmd ( uint8  control)

Set whether the system clock will be divided when the MCU is halted.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
control- HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT, HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT
Returns
hciStatus_t

§ HCI_EXT_ConnEventNoticeCmd()

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

This HCI Extension API is used to 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".

Note: This command does not check if the taskID and/or taskEvent are valid!

Parameters
connHandle- The HCI connection ID for connection event notice.
taskID- User's task ID.
taskEvent- User's task event.
Returns
hciStatus_t

§ HCI_EXT_DeclareNvUsageCmd()

hciStatus_t HCI_EXT_DeclareNvUsageCmd ( uint8  mode)

This HCI Extension API is used to indicate to the Controller whether or not the Host will be using the NV memory during BLE operations.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
mode- HCI_EXT_NV_IN_USE, HCI_EXT_NV_NOT_IN_USE
Returns
hciStatus_t

§ HCI_EXT_DecryptCmd()

hciStatus_t HCI_EXT_DecryptCmd ( uint8 *  key,
uint8 *  encText 
)

This HCI Extension API is used to decrypt encrypted data using AES128.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
key- Pointer to 16 byte encryption key.
encText- Pointer to 16 byte encrypted data.
Returns
hciStatus_t

§ HCI_EXT_DelaySleepCmd()

hciStatus_t HCI_EXT_DelaySleepCmd ( uint16  delay)

This HCI Extension API is used set the sleep delay.

Parameters
delay- 0..1000, in milliseconds.
Returns
hciStatus_t

§ HCI_EXT_DisconnectImmedCmd()

hciStatus_t HCI_EXT_DisconnectImmedCmd ( uint16  connHandle)

This HCI Extension API is used to disconnect the connection immediately.

Note: The connection (if valid) is immediately terminated without notifying the remote device. The Host is still notified.

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ HCI_EXT_EnablePTMCmd()

hciStatus_t HCI_EXT_EnablePTMCmd ( void  )

This HCI Extension API is used to enable Production Test Mode.

Note: This function can only be directly called from the application and is not available via an external transport interface such as RS232. Also, no vendor specific command complete will be returned.

Returns
hciStatus_t

§ HCI_EXT_EndModemTestCmd()

hciStatus_t HCI_EXT_EndModemTestCmd ( void  )

This API is used to shutdown a modem test. A complete Controller reset will take place.

Returns
hciStatus_t

§ HCI_EXT_ExtendRfRangeCmd()

hciStatus_t HCI_EXT_ExtendRfRangeCmd ( void  )

This HCI Extension API is used to Extend Rf Range using the TI CC2590 2.4 GHz RF Front End device.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Returns
hciStatus_t

§ 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.
Parameters
numAllocConns- Pointer for number of build time connections.
numActiveConns- Pointer for number of active BLE connections.
activeConnInfo- Pointer for active connection information.
numAllocConns- Number of build time connections allowed.
numActiveConns- Number of active BLE connections.
activeConnInfo- Active connection information.
Returns
hciStatus_t

§ HCI_EXT_HaltDuringRfCmd()

hciStatus_t HCI_EXT_HaltDuringRfCmd ( uint8  mode)

Halt During RF Command.

Enable or disable halting the CPU during RF. The system defaults to enabled.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
mode- HCI_EXT_HALT_DURING_RF_ENABLE, HCI_EXT_HALT_DURING_RF_DISABLE
Returns
hciStatus_t

§ HCI_EXT_LLTestModeCmd()

hciStatus_t HCI_EXT_LLTestModeCmd ( uint8  testCase)

This HCI Extension API is used to send a LL Test Mode test case.

Parameters
testCase- See list of defines in ll_common.h.
Returns
hciStatus_t

§ HCI_EXT_MapPmIoPortCmd()

hciStatus_t HCI_EXT_MapPmIoPortCmd ( uint8  ioPort,
uint8  ioPin 
)

This HCI Extension API is used to configure and map a CC254x I/O Port as a General Purpose I/O (GPIO) output signal that reflects the Power Management (PM) state of the CC254x device. The GPIO output will be High on Wake, and Low upon entering Sleep. This feature can be disabled by specifying HCI_EXT_PM_IO_PORT_NONE for the ioPort (ioPin is then ignored). The system default value upon hardware reset is disabled. This command can be used to control an external DC-DC Converter (its actual intent) such has the TI TPS62730 (or any similar converter that works the same way). This command should be used with extreme care as it will override how the Port/Pin was previously configured! This includes the mapping of Port 0 pins to 32kHz clock output, Analog I/O, UART, Timers; Port 1 pins to Observables, Digital Regulator status, UART, Timers; Port 2 pins to an external 32kHz XOSC. The selected Port/Pin will be configured as an output GPIO with interrupts masked. Careless use can result in a reconfiguration that could disrupt the system. It is therefore the user's responsibility to ensure the selected Port/Pin does not cause any conflicts in the system.

Note: Only Pins 0, 3 and 4 are valid for Port 2 since Pins 1 and 2 are mapped to debugger signals DD and DC.

Note: Port/Pin signal change will only occur when Power Savings is enabled.

Parameters
ioPort- HCI_EXT_PM_IO_PORT_P0, HCI_EXT_PM_IO_PORT_P1, HCI_EXT_PM_IO_PORT_P2, HCI_EXT_PM_IO_PORT_NONE
ioPin- HCI_EXT_PM_IO_PORT_PIN0, HCI_EXT_PM_IO_PORT_PIN1, HCI_EXT_PM_IO_PORT_PIN2, HCI_EXT_PM_IO_PORT_PIN3, HCI_EXT_PM_IO_PORT_PIN4, HCI_EXT_PM_IO_PORT_PIN5, HCI_EXT_PM_IO_PORT_PIN6, HCI_EXT_PM_IO_PORT_PIN7
Returns
hciStatus_t

§ 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 625us. Use HCI_EXT_EndModemTestCmd command to end the test.

Note: A Controller reset will be issued by HCI_EXT_EndModemTest! Note: The BLE device will transmit at maximum power. Note: This API can be used to verify this device meets Japan's TELEC regulations.

Returns
hciStatus_t

§ 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_SetRxGain command. RSSI may be read during this test by using the HCI_ReadRssi command. Use HCI_EXT_EndModemTest command to end the test.

Note: A Controller reset will be issued by HCI_EXT_EndModemTest! Note: The BLE device will transmit at maximum power.

Parameters
rxChan- Receiver RF channel k=0..39, where BLE F=2402+(k*2MHz).
Returns
hciStatus_t

§ HCI_EXT_ModemTestTxCmd()

hciStatus_t HCI_EXT_ModemTestTxCmd ( uint8  cwMode,
uint8  txChan 
)

This API is used 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_EndModemTest command to end the test.

Note: A Controller reset will be issued by HCI_EXT_EndModemTest! Note: The BLE device will transmit at maximum power. Note: This API can be used to verify this device meets Japan's TELEC regulations.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
cwMode- HCI_EXT_TX_MODULATED_CARRIER, HCI_EXT_TX_UNMODULATED_CARRIER
txChan- Transmit RF channel k=0..39, where BLE F=2402+(k*2MHz).
Returns
hciStatus_t

§ HCI_EXT_NumComplPktsLimitCmd()

hciStatus_t HCI_EXT_NumComplPktsLimitCmd ( uint8  limit,
uint8  flushOnEvt 
)

This HCI Extension API is used to set the minimum number of completed packets which must be met before a Number of Completed Packets event is returned. If the limit is not reach by the end of the connection event, then a Number of Completed Packets event will be returned (if non-zero) based on the flushOnEvt flag.

Parameters
limit- From 1 to HCI_MAX_NUM_DATA_BUFFERS.
flushOnEvt- HCI_EXT_DISABLE_NUM_COMPL_PKTS_ON_EVENT | HCI_EXT_ENABLE_NUM_COMPL_PKTS_ON_EVENT
Returns
hciStatus_t

§ HCI_EXT_OnePktPerEvtCmd()

hciStatus_t HCI_EXT_OnePktPerEvtCmd ( uint8  control)

This HCI Extension API is used to set whether a connection will be limited to one packet per event.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
control- HCI_EXT_ENABLE_ONE_PKT_PER_EVT, HCI_EXT_DISABLE_ONE_PKT_PER_EVT
Returns
hciStatus_t

§ HCI_EXT_OverlappedProcessingCmd()

hciStatus_t HCI_EXT_OverlappedProcessingCmd ( uint8  mode)

This HCI Extension API is used to enable or disable overlapped processing.

Parameters
mode- HCI_EXT_ENABLE_OVERLAPPED_PROCESSING | HCI_EXT_DISABLE_OVERLAPPED_PROCESSING
Returns
hciStatus_t

§ HCI_EXT_PacketErrorRateCmd()

hciStatus_t HCI_EXT_PacketErrorRateCmd ( uint16  connHandle,
uint8  command 
)

This function is used to 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.

Parameters
connHandle- The LL connection ID on which to send this data.
command- HCI_EXT_PER_RESET, HCI_EXT_PER_READ
Returns
hciStatus_t

§ HCI_EXT_PERbyChanCmd()

hciStatus_t HCI_EXT_PERbyChanCmd ( uint16  connHandle,
perByChan_t *  perByChan 
)

This HCI Extension API is used to start or end Packet Error Rate by Channel counter accumulation for a connection. If the pointer is not NULL, it is assumed there is sufficient memory for the PER data, per the type perByChan_t. If NULL, then the operation is considered disabled.

Note: It is the user's responsibility to make sure there is sufficient memory for the data, and that the counters are cleared prior to first use.

Note: The counters are only 16 bits. At the shortest connection interval, this provides a bit over 8 minutes of data.

Parameters
connHandle- The LL connection ID on which to send this data.
perByChan- Pointer to PER by Channel data, or NULL.
Returns
hciStatus_t

§ HCI_EXT_ResetSystemCmd()

hciStatus_t HCI_EXT_ResetSystemCmd ( uint8  mode)

This HCI Extension API is used to issue a soft or hard system reset.

Parameters
mode- HCI_EXT_RESET_SYSTEM_HARD | HCI_EXT_RESET_SYSTEM_SOFT

output parameters

Returns
hciStatus_t

§ HCI_EXT_SaveFreqTuneCmd()

hciStatus_t HCI_EXT_SaveFreqTuneCmd ( void  )

This HCI Extension API is used to save the frequency tuning value to flash.

Note: This is a Production Test Mode only command!

Returns
hciStatus_t

§ HCI_EXT_ScanEventNoticeCmd()

hciStatus_t HCI_EXT_ScanEventNoticeCmd ( uint8  taskID,
uint16  taskEvent 
)

Scan Event Notice Command.

This HCI Extension API is used to enable or disable a notification to the specified task using the specified task event whenever a Scan event ends. A non-zero taskEvent value is taken to be "enable", while a zero valued taskEvent is taken to be "disable".

Parameters
taskID- User's task ID.
taskEvent- User's task event.
Returns
hciStatus_t

§ HCI_EXT_ScanReqRptCmd()

hciStatus_t HCI_EXT_ScanReqRptCmd ( uint8  mode)

This LE API is used to enable/disable Scan Request Reports.

Parameters
mode- HCI_EXT_DISABLE_SCAN_REQUEST_REPORT | HCI_EXT_ENABLE_SCAN_REQUEST_REPORT
Returns
hciStatus_t

§ HCI_EXT_SetBDADDRCmd()

hciStatus_t HCI_EXT_SetBDADDRCmd ( uint8 *  bdAddr)

This API is used to set this device's BLE address (BDADDR).

Note: This command is only allowed when the device's state is Standby.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
bdAddr- A 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
hciStatus_t

§ HCI_EXT_SetFastTxResponseTimeCmd()

hciStatus_t HCI_EXT_SetFastTxResponseTimeCmd ( uint8  control)

This HCI Extension API is used to set whether transmit data is sent as soon as possible even when slave latency is used.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
control- HCI_EXT_ENABLE_FAST_TX_RESP_TIME, HCI_EXT_DISABLE_FAST_TX_RESP_TIME
Returns
hciStatus_t

§ HCI_EXT_SetFreqTuneCmd()

hciStatus_t HCI_EXT_SetFreqTuneCmd ( uint8  step)

This HCI Extension API is used to set the frequency tuning up or down. Setting the mode up/down decreases/increases the amount of capacitance on the external crystal oscillator.

Note: This is a Production Test Mode only command!

Parameters
step- HCI_PTM_SET_FREQ_TUNE_UP, HCI_PTM_SET_FREQ_TUNE_DOWN
Returns
hciStatus_t

§ HCI_EXT_SetLocalSupportedFeaturesCmd()

hciStatus_t HCI_EXT_SetLocalSupportedFeaturesCmd ( uint8 *  localFeatures)

This HCI Extension API is used to write this device's supported features.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
localFeatures- Pointer to eight bytes of local features.
Returns
hciStatus_t

§ HCI_EXT_SetMaxDataLenCmd()

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

This LE API is used to set the maximum supported 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.

Parameters
txOctets- Value of maximum supported Tx octets (in bytes).
txTime- Value of maximum supported Tx time (in us).
rxOctets- Value of maximum supported Rx octets (in bytes).
rxTime- Value of maximum supported Rx time (in us).
Returns
hciStatus_t

§ HCI_EXT_SetMaxDtmTxPowerCmd()

hciStatus_t HCI_EXT_SetMaxDtmTxPowerCmd ( uint8  txPower)

This HCI Extension API is used to set the maximum transmit output power for Direct Test Mode.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
txPower- For CC254x: LL_EXT_TX_POWER_MINUS_23_DBM, LL_EXT_TX_POWER_MINUS_6_DBM, LL_EXT_TX_POWER_0_DBM, LL_EXT_TX_POWER_4_DBM

For CC26xx: HCI_EXT_TX_POWER_MINUS_21_DBM, HCI_EXT_TX_POWER_MINUS_18_DBM, HCI_EXT_TX_POWER_MINUS_15_DBM, HCI_EXT_TX_POWER_MINUS_12_DBM, HCI_EXT_TX_POWER_MINUS_9_DBM, HCI_EXT_TX_POWER_MINUS_6_DBM, HCI_EXT_TX_POWER_MINUS_3_DBM, HCI_EXT_TX_POWER_0_DBM, HCI_EXT_TX_POWER_1_DBM, HCI_EXT_TX_POWER_2_DBM, HCI_EXT_TX_POWER_3_DBM, HCI_EXT_TX_POWER_4_DBM, HCI_EXT_TX_POWER_5_DBM

Returns
hciStatus_t

§ HCI_EXT_SetRxGainCmd()

hciStatus_t HCI_EXT_SetRxGainCmd ( uint8  rxGain)

Set the receiver gain.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
rxGain- HCI_EXT_RX_GAIN_STD, HCI_EXT_RX_GAIN_HIGH
Returns
hciStatus_t

§ HCI_EXT_SetSCACmd()

hciStatus_t HCI_EXT_SetSCACmd ( uint16  scaInPPM)

This API is used to set this device's Sleep Clock Accuracy.

Note: 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 Table 2.2, Vol. 6, Part B, Section 2.3.3.1 of the Core specification.

Note: This command is only allowed when the device is not in a connection.

Note: The device's SCA value remains unaffected by a HCI_Reset.

Parameters
scaInPPM- A SCA value in PPM from 0..500.
Returns
hciStatus_t

§ HCI_EXT_SetSlaveLatencyOverrideCmd()

hciStatus_t HCI_EXT_SetSlaveLatencyOverrideCmd ( uint8  control)

This HCI Extension API is used to to enable or disable suspending slave latency.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
control- HCI_EXT_ENABLE_SL_OVERRIDE, HCI_EXT_DISABLE_SL_OVERRIDE
Returns
hciStatus_t

§ HCI_EXT_SetTxPowerCmd()

hciStatus_t HCI_EXT_SetTxPowerCmd ( uint8  txPower)

Set the transmit power.

Related Events: HCI_VendorSpecifcCommandCompleteEvent

Parameters
txPower- For CC254x: HCI_EXT_TX_POWER_MINUS_23_DBM, HCI_EXT_TX_POWER_MINUS_6_DBM, HCI_EXT_TX_POWER_0_DBM, HCI_EXT_TX_POWER_4_DBM

For CC26xx: HCI_EXT_TX_POWER_MINUS_21_DBM, HCI_EXT_TX_POWER_MINUS_18_DBM, HCI_EXT_TX_POWER_MINUS_15_DBM, HCI_EXT_TX_POWER_MINUS_12_DBM, HCI_EXT_TX_POWER_MINUS_9_DBM, HCI_EXT_TX_POWER_MINUS_6_DBM, HCI_EXT_TX_POWER_MINUS_3_DBM, HCI_EXT_TX_POWER_0_DBM, HCI_EXT_TX_POWER_1_DBM, HCI_EXT_TX_POWER_2_DBM, HCI_EXT_TX_POWER_3_DBM, HCI_EXT_TX_POWER_4_DBM, HCI_EXT_TX_POWER_5_DBM

Returns
hciStatus_t

§ HCI_ExtTaskRegister()

void HCI_ExtTaskRegister ( uint8  taskID)

HCI vendor specific registration for Host extended commands.

Parameters
taskID- The Host Extended Command OSAL task identifier.

§ HCI_GAPTaskRegister()

void HCI_GAPTaskRegister ( uint8  taskID)

HCI vendor specific registration for Host GAP.

Parameters
taskID- The Host GAP OSAL task identifier.

§ HCI_HostBufferSizeCmd()

hciStatus_t HCI_HostBufferSizeCmd ( uint16  hostAclPktLen,
uint8  hostSyncPktLen,
uint16  hostTotalNumAclPkts,
uint16  hostTotalNumSyncPkts 
)

This BT API is used by the Host to notify the Controller of the maximum size ACL buffer size the Controller can send to the Host.

Note
This command is currently ignored by the Controller. It is assumed that the Host can always handle the maximum BLE data packet size.
Corresponding Events:
hciEvt_CmdComplete_t with cmdOpcode HCI_HOST_BUFFER_SIZE
Parameters
hostAclPktLen- Host ACL data packet length.
hostSyncPktLen- Host SCO data packet length .
hostTotalNumAclPkts- Host total number of ACL data packets.
hostTotalNumSyncPkts- Host total number of SCO data packets.
Returns
hciStatus_t

§ HCI_HostNumCompletedPktCmd()

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

This BT API is 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 loopback 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).

Related Events: HCI_CommandCompleteEvent

Parameters
numHandles- Number of connection handles.
connHandles- Array of connection handles.
numCompletedPkts- Array of number of completed packets.
Returns
hciStatus_t

§ HCI_L2CAPTaskRegister()

void HCI_L2CAPTaskRegister ( uint8  taskID)

HCI vendor specific registration for Host L2CAP.

Parameters
taskID- The Host L2CAP OSAL task identifier.

§ 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.

Parameters
peerIdAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
peerIdAddr- Peer device Identity Address.
peerIRK- IRK of peer device.
localIRK- IRK for own device.
Returns
hciStatus_t

§ HCI_LE_AddWhiteListCmd()

hciStatus_t HCI_LE_AddWhiteListCmd ( uint8  addrType,
uint8 *  devAddr 
)

Add a white list entry.

Related Events: HCI_CommandCompleteEvent

Parameters
addrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
devAddr- Pointer to address of device to put in white list.
Returns
hciStatus_t

§ 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.

Returns
hciStatus_t

§ HCI_LE_ClearWhiteListCmd()

hciStatus_t HCI_LE_ClearWhiteListCmd ( void  )

Clear the white list.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ 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.

Related Events: HCI_CommandStatusEvent, ConnectionUpdateCompleteEvent

Parameters
connHandle- Connection handle.
connIntervalMin- Minimum allowed connection interval.
connIntervalMax- Maximum allowed connection interval.
connLatency- Number of skipped events (slave latency).
connTimeout- Connection supervision timeout.
minLen- Info parameter about min length of conn.
maxLen- Info parameter about max length of conn.
Returns
hciStatus_t

§ HCI_LE_CreateConnCancelCmd()

hciStatus_t HCI_LE_CreateConnCancelCmd ( void  )

Cancel connection.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ 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.

Related Events: HCI_CommandStatusEvent, ConnectionCompleteEvent

Note
When the scanWindow equals the scanInterval then scanning is continuous.
Parameters
scanInterval- Time between Init scan events.
scanWindow- Time of scan before Init scan event ends. Note: When the scanWindow equals the scanInterval then scanning is continuous.
initFilterPolicy- HCI_INIT_WL_POLICY_USE_PEER_ADDR, HCI_INIT_WL_POLICY_USE_WHITE_LIST
addrTypePeer- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
peerAddr- Pointer to peer device's address.
ownAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
connIntervalMin- Minimum allowed connection interval.
connIntervalMax- Maximum allowed connection interval.
connLatency- Number of skipped events (slave latency).
connTimeout- Connection supervision timeout.
minLen- Info parameter about min length of conn.
maxLen- Info parameter about max length of conn.
Returns
hciStatus_t

§ HCI_LE_EncryptCmd()

hciStatus_t HCI_LE_EncryptCmd ( uint8 *  key,
uint8 *  plainText 
)

Perform an encryption using AES128.

Note: Input parameters are ordered MSB..LSB.

Related Events: HCI_CommandCompleteEvent

Parameters
key- Pointer to 16 byte encryption key.
plainText- Pointer to 16 byte plaintext data.
Returns
hciStatus_t

§ 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.

Parameters
rxChan- Rx Channel k=0..39, where F=2402+(k*2MHz).
rxPhy- Rx PHY to use.
modIndex- HCI_DTM_STANDARD_MODULATION_INDEX, HCI_DTM_STABLE_MODULATION_INDEX
Returns
hciStatus_t

§ 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.

Parameters
txChan- Tx RF channel k=0..39, where F=2402+(k*2MHz).
payloadLen- Byte length (0..37) in payload for each packet.
payloadType- The type of pattern to transmit.
txPhy- Tx PHY to use.
Returns
hciStatus_t

§ 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.

Note: Generates LE DHKey Generation Complete event.

Warning
This routine will tie up the LL for about 160 ms
Parameters
publicKeyThe remote P-256 public key (X-Y format).
Returns
hciStatus_t

§ HCI_LE_LtkReqNegReplyCmd()

hciStatus_t HCI_LE_LtkReqNegReplyCmd ( uint16  connHandle)

This LE API is used by the Host to send to the Controller a negative LTK reply.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ HCI_LE_LtkReqReplyCmd()

hciStatus_t HCI_LE_LtkReqReplyCmd ( uint16  connHandle,
uint8 *  ltk 
)

This LE API is used by the Host to send to the Controller a positive LTK reply.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
ltk- Pointer to 16 byte Long Term Key.
Returns
hciStatus_t

§ HCI_LE_RandCmd()

hciStatus_t HCI_LE_RandCmd ( void  )

Generate a random number.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_LE_ReadAdvChanTxPowerCmd()

hciStatus_t HCI_LE_ReadAdvChanTxPowerCmd ( void  )

Read transmit power when Advertising.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_LE_ReadBufSizeCmd()

hciStatus_t HCI_LE_ReadBufSizeCmd ( void  )

This LE API is used by the Host to determine the maximum ACL data packet size allowed by the Controller.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_LE_ReadChannelMapCmd()

hciStatus_t HCI_LE_ReadChannelMapCmd ( uint16  connHandle)

Read a connection's data channel map.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ 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.

Note: Generates LE Read Local P256 Public Key Complete event.

Warning
This routine will tie up the LL for about 160 ms
Returns
hciStatus_t

§ 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.
Parameters
localIdAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
localIdAddr- Local device Identity Address.
Returns
hciStatus_t

§ HCI_LE_ReadLocalSupportedFeaturesCmd()

hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd ( void  )

Read the LE locally supported features.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ 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.

Returns
hciStatus_t

§ 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.
Parameters
peerIdAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
peerIdAddr- Peer device Identity Address.
Returns
hciStatus_t

§ HCI_LE_ReadPhyCmd()

hciStatus_t HCI_LE_ReadPhyCmd ( uint16  connHandle)

Read the current transmitter and receiver PHY.

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ HCI_LE_ReadRemoteUsedFeaturesCmd()

hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd ( uint16  connHandle)

Read the remote device's used features.

Related Events: HCI_CommandStatusEvent, ReadRemoteUsedFeaturesCompleteEvent

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ 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.

Returns
hciStatus_t

§ HCI_LE_ReadSuggestedDefaultDataLenCmd()

hciStatus_t HCI_LE_ReadSuggestedDefaultDataLenCmd ( void  )

Read Suggested Default Data Length.

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

Returns
hciStatus_t

§ HCI_LE_ReadSupportedStatesCmd()

hciStatus_t HCI_LE_ReadSupportedStatesCmd ( void  )

Read the Controller's supported states.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_LE_ReadWhiteListSizeCmd()

hciStatus_t HCI_LE_ReadWhiteListSizeCmd ( void  )

Read the white list.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_LE_ReceiverTestCmd()

hciStatus_t HCI_LE_ReceiverTestCmd ( uint8  rxChan)

Start the receiver Direct Test Mode test.

Related Events: HCI_CommandCompleteEvent

Note
An HCI reset should be issued when done using DTM
Parameters
rxChan- Rx Channel k=0..39, where F=2402+(k*2MHz).
Returns
hciStatus_t

§ HCI_LE_RemoteConnParamReqNegReplyCmd()

hciStatus_t HCI_LE_RemoteConnParamReqNegReplyCmd ( uint16  connHandle,
uint8  reason 
)

Negatively reply to the Conneciton 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.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
reason- Reason connection parameter request was rejected.
Returns
hciStatus_t

§ HCI_LE_RemoteConnParamReqReplyCmd()

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

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.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
connIntervalMin- Minimum allowed connection interval.
connIntervalMax- Maximum allowed connection interval.
connLatency- Number of skipped events (slave latency).
connTimeout- Connection supervision timeout.
minLen- Info parameter about min length of conn.
maxLen- Info parameter about max length of conn.
Returns
hciStatus_t

§ HCI_LE_RemoveDeviceFromResolvingListCmd()

hciStatus_t HCI_LE_RemoveDeviceFromResolvingListCmd ( uint8  peerIdAddrType,
uint8 *  peerIdAddr 
)

Remove a device from the whitelist.

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

Parameters
peerIdAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
peerIdAddr- Peer device Identity Address.
Returns
hciStatus_t

§ HCI_LE_RemoveWhiteListCmd()

hciStatus_t HCI_LE_RemoveWhiteListCmd ( uint8  addrType,
uint8 *  devAddr 
)

Remove a white list entry.

Related Events: HCI_CommandCompleteEvent

Parameters
addrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
devAddr- Pointer to address of device to remove from the white list.
Returns
hciStatus_t

§ 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.

Parameters
addrResolutionEnable- HCI_DISABLE_ADDR_RESOLUTION, HCI_ENABLE_ADDR_RESOLUTION
Returns
hciStatus_t

§ HCI_LE_SetAdvDataCmd()

hciStatus_t HCI_LE_SetAdvDataCmd ( uint8  dataLen,
uint8 *  pData 
)

Set the Advertising data.

Related Events: HCI_CommandCompleteEvent

Parameters
dataLen- Length of Advertising data.
pData- Pointer to Advertising data.
Returns
hciStatus_t

§ HCI_LE_SetAdvEnableCmd()

hciStatus_t HCI_LE_SetAdvEnableCmd ( uint8  advEnable)

Turn Advertising on or off.

Related Events: HCI_CommandCompleteEvent

Parameters
advEnable- HCI_ENABLE_ADV, HCI_DISABLE_ADV
Returns
hciStatus_t

§ 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.

Related Events: HCI_CommandCompleteEvent

Parameters
advIntervalMin- Minimum allowed advertising interval.
advIntervalMax- Maximum allowed advertising interval.
advType- HCI_CONNECTABLE_UNDIRECTED_ADV, HCI_CONNECTABLE_DIRECTED_HDC_ADV, HCI_SCANNABLE_UNDIRECTED, HCI_NONCONNECTABLE_UNDIRECTED_ADV HCI_CONNECTABLE_DIRECTED_LDC_ADV
ownAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
directAddrType- HCI_PUBLIC_DEVICE_ADDRESS, HCI_RANDOM_DEVICE_ADDRESS
directAddr- Pointer to address of device when using directed advertising.
advChannelMap- HCI_ADV_CHAN_37, HCI_ADV_CHAN_38, HCI_ADV_CHAN_39, HCI_ADV_CHAN_37 | HCI_ADV_CHAN_38, HCI_ADV_CHAN_37 | HCI_ADV_CHAN_39, HCI_ADV_CHAN_38 | HCI_ADV_CHAN_39, HCI_ADV_CHAN_ALL
advFilterPolicy- HCI_ADV_WL_POLICY_ANY_REQ, HCI_ADV_WL_POLICY_WL_SCAN_REQ, HCI_ADV_WL_POLICY_WL_CONNECT_REQ, HCI_ADV_WL_POLICY_WL_ALL_REQ
Returns
hciStatus_t

§ 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.

Parameters
connHandle- Connection handle.
txOctets- Maximum transmit payload size (in bytes).
txTime- Maximum transmit time (in us).
Returns
hciStatus_t

§ 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.

Parameters
allPhys- Host preference on how to handle txPhy and rxPhy.
txPhy- Bit field of Host preferred Tx PHY.
rxPhy- Bit field of Host preferred Rx PHY.
Returns
hciStatus_t

§ HCI_LE_SetEventMaskCmd()

hciStatus_t HCI_LE_SetEventMaskCmd ( uint8 *  pEventMask)

This LE API is used to set the HCI LE event mask, which is used to determine which LE events are supported.

Related Events: HCI_CommandCompleteEvent

Parameters
pEventMask- Pointer to LE event mask of 8 bytes.
Returns
hciStatus_t

§ HCI_LE_SetHostChanClassificationCmd()

hciStatus_t HCI_LE_SetHostChanClassificationCmd ( uint8 *  chanMap)

Update the current data channel map.

Related Events: HCI_CommandCompleteEvent

Parameters
chanMap- Pointer to the new channel map.
Returns
hciStatus_t

§ HCI_LE_SetPhyCmd()

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

This LE API is used to request a change to the transmitter and receiver PHY for a connection.

Parameters
connHandle- Connection handle.
allPhys- Host preference on how to handle txPhy and rxPhy.
txPhy- Bit field of Host preferred Tx PHY.
rxPhy- Bit field of Host preferred Rx PHY.
Returns
hciStatus_t

§ HCI_LE_SetRandomAddressCmd()

hciStatus_t HCI_LE_SetRandomAddressCmd ( uint8 *  pRandAddr)

Set this device's Random address.

Related Events: HCI_CommandCompleteEvent

Parameters
pRandAddr- Pointer to random address.
Returns
hciStatus_t

§ 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..
Parameters
rpaTimeout- RPA timeout (in secs).
Returns
hciStatus_t

§ HCI_LE_SetScanEnableCmd()

hciStatus_t HCI_LE_SetScanEnableCmd ( uint8  scanEnable,
uint8  filterDuplicates 
)

Turn Scanning on or off.

Related Events: HCI_CommandCompleteEvent, AdvReportEvent

Parameters
scanEnable- HCI_SCAN_START, HCI_SCAN_STOP
filterDuplicates- HCI_FILTER_REPORTS_ENABLE, HCI_FILTER_REPORTS_DISABLE
Returns
hciStatus_t

§ HCI_LE_SetScanParamCmd()

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

Set the Scan parameters.

Related Events: HCI_CommandCompleteEvent

Note
When the scanWindow equals the scanInterval then scanning is continuous.
Parameters
scanType- HCI_SCAN_PASSIVE, HCI_SCAN_ACTIVE
scanInterval- Time between scan events.
scanWindow- Time of scan before scan event ends. Note: When the scanWindow equals the scanInterval then scanning is continuous.
ownAddrType- This device's address.
filterPolicy- HCI_SCAN_PASSIVE, HCI_SCAN_ACTIVE
Returns
hciStatus_t

§ HCI_LE_SetScanRspDataCmd()

hciStatus_t HCI_LE_SetScanRspDataCmd ( uint8  dataLen,
uint8 *  pData 
)

Set the Advertising Scan Response data.

Related Events: HCI_CommandCompleteEvent

Parameters
dataLen- Length of Scan Response data.
pData- Pointer to Scan Response data.
Returns
hciStatus_t

§ HCI_LE_StartEncyptCmd()

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

Start encryption in a connection.

Related Events: HCI_CommandStatusEvent, EncChangeEvent or EncKeyRefreshEvent

Parameters
connHandle- Connection handle.
random- Pointer to eight byte Random number.
encDiv- Pointer to two byte Encrypted Diversifier.
ltk- Pointer to 16 byte Long Term Key.
Returns
hciStatus_t

§ HCI_LE_TestEndCmd()

hciStatus_t HCI_LE_TestEndCmd ( void  )

End the Direct Test Mode test.

Related Events: HCI_CommandCompleteEvent

Note
An HCI reset should be issued when done using DTM!
Returns
hciStatus_t

§ 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.

Note
The BLE device is to transmit at maximum power.
A HCI reset should be issued when done using DTM.
Parameters
txChan- Tx RF frequency k=0..39, where F=2402+(k*2MHz).
dataLen- Test data length: 0..37 bytes
pktPayload- Type of packet payload, per Direct Test Mode spec: HCI_DIRECT_TEST_PAYLOAD_PRBS9, HCI_DIRECT_TEST_PAYLOAD_0x0F, HCI_DIRECT_TEST_PAYLOAD_0x55, HCI_DIRECT_TEST_PAYLOAD_PRBS15, HCI_DIRECT_TEST_PAYLOAD_0xFF, HCI_DIRECT_TEST_PAYLOAD_0x00, HCI_DIRECT_TEST_PAYLOAD_0xF0, HCI_DIRECT_TEST_PAYLOAD_0xAA
Returns
hciStatus_t

§ 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.

Parameters
txOctets- Maximum transmit payload size (in bytes).
txTime- Maximum transmit time (in us).
Returns
hciStatus_t

§ HCI_ReadAuthPayloadTimeoutCmd()

hciStatus_t HCI_ReadAuthPayloadTimeoutCmd ( uint16  connHandle,
uint16 *  aptoValue 
)

Read the connection's Authenticated Payload Timeout value.

Parameters
connHandle- The LL connection ID to read the APTO value from.
aptoValue- Pointer to current APTO value, in units of 10ms.
Returns
hciStatus_t

§ HCI_ReadBDADDRCmd()

hciStatus_t HCI_ReadBDADDRCmd ( void  )

Read this device's BLE address (BDADDR).

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_ReadLocalSupportedCommandsCmd()

hciStatus_t HCI_ReadLocalSupportedCommandsCmd ( void  )

Read the locally supported commands.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_ReadLocalSupportedFeaturesCmd()

hciStatus_t HCI_ReadLocalSupportedFeaturesCmd ( void  )

Read the locally supported features.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_ReadLocalVersionInfoCmd()

hciStatus_t HCI_ReadLocalVersionInfoCmd ( void  )

Read the local version information.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_ReadRemoteVersionInfoCmd()

hciStatus_t HCI_ReadRemoteVersionInfoCmd ( uint16  connHandle)

This BT API is used to request version information from the the remote device in a connection.

Related Events: HCI_CommandStatusEvent, ReadRemoteVersionInfoEvent

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ 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_ModemTestRx), 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.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
Returns
hciStatus_t

§ HCI_ReadTransmitPowerLevelCmd()

hciStatus_t HCI_ReadTransmitPowerLevelCmd ( uint16  connHandle,
uint8  txPwrType 
)

Read the transmit power level.

Related Events: HCI_CommandCompleteEvent

Parameters
connHandle- Connection handle.
txPwrType- HCI_READ_CURRENT_TX_POWER_LEVEL, HCI_READ_MAXIMUM_TX_POWER_LEVEL
Returns
hciStatus_t

§ HCI_ResetCmd()

hciStatus_t HCI_ResetCmd ( void  )

Reset the Link Layer.

Related Events: HCI_CommandCompleteEvent

Returns
hciStatus_t

§ HCI_SendDataPkt()

hciStatus_t HCI_SendDataPkt ( uint16  connHandle,
uint8  pbFlag,
uint16  pktLen,
uint8 *  pData 
)

This API is used to send a ACL data packet over a connection.

Note
Empty packets are not sent.
Corresponding Events
hciEvt_NumCompletedPkt_t
Parameters
connHandle- Connection ID (handle).
pbFlag- Packet Boundary Flag.
pktLen- Number of bytes of data to transmit.
*pData- Pointer to data buffer to transmit.
Returns
hciStatus_t

§ HCI_SetControllerToHostFlowCtrlCmd()

hciStatus_t HCI_SetControllerToHostFlowCtrlCmd ( uint8  flowControlEnable)

This BT API is used by the Host to turn flow control on or off for data sent from the Controller to Host. Related Events: HCI_CommandCompleteEvent.

Note
This command is currently not supported.
Parameters
flowControlEnable- HCI_CTRL_TO_HOST_FLOW_CTRL_OFF, HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_OFF, HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_OFF_SYNCH_ON, HCI_CTRL_TO_HOST_FLOW_CTRL_ACL_ON_SYNCH_ON
Returns
hciStatus_t

§ HCI_SetEventMaskCmd()

hciStatus_t HCI_SetEventMaskCmd ( uint8 *  pMask)

This BT API is used to set the HCI event mask, which is used to determine which events are supported.

Related Events: HCI_CommandCompleteEvent

Parameters
pMask- Pointer to an eight byte event mask.
Returns
hciStatus_t

§ HCI_SetEventMaskPage2Cmd()

hciStatus_t HCI_SetEventMaskPage2Cmd ( uint8 *  pMask)

This BT API is used to set the HCI event mask page 2, which is used to determine which events are supported.

Related Events: HCI_CommandCompleteEvent

Parameters
pMask- Pointer to an eight byte event mask.
Returns
hciStatus_t

§ HCI_SMPTaskRegister()

void HCI_SMPTaskRegister ( uint8  taskID)

HCI vendor specific registration for Host SMP.

Parameters
taskID- The Host SMP OSAL task identifier.

§ HCI_TestAppTaskRegister()

void HCI_TestAppTaskRegister ( uint8  taskID)

HCI vendor specific registration for HCI Test Application.

Parameters
taskID- The HCI Test Application OSAL task identifier.
Returns
None.

§ HCI_ValidConnTimeParams()

uint8 HCI_ValidConnTimeParams ( uint16  connIntervalMin,
uint16  connIntervalMax,
uint16  connLatency,
uint16  connTimeout 
)

This API is used to check that the connection time parameter ranges are valid, and that the connection time parameter combination is valid. It also checks if the min/max CI range is valid.

Parameters
connIntervalMin- Minimum connection interval.
connIntervalMax- Maximum connection interval.
connLatency- Connection slave latency.
connTimeout- Connection supervision timeout.
Returns
TRUE: Connection time parameter check is valid.
FALSE: Connection time parameter check is invalid.

§ HCI_WriteAuthPayloadTimeoutCmd()

hciStatus_t HCI_WriteAuthPayloadTimeoutCmd ( uint16  connHandle,
uint16  aptoValue 
)

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

Parameters
connHandle- The LL connection ID to write the APTO value to.
aptoValue- The APTO value, in units of 10ms.
Returns
hciStatus_t