TI BLE5-Stack API Documentation
1.01.12.00
|
Modules | |
HCI Constants | |
HCI Events | |
Files | |
file | hci.h |
HCI layer interface. | |
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_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_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_ResetSystemCmd (uint8 mode) |
hciStatus_t | HCI_EXT_SaveFreqTuneCmd (void) |
hciStatus_t | HCI_EXT_SetDtmTxPktCntCmd (uint16 txPktCnt) |
hciStatus_t | HCI_EXT_SetFastTxResponseTimeCmd (uint8 control) |
hciStatus_t | HCI_EXT_SetFreqTuneCmd (uint8 step) |
hciStatus_t | HCI_EXT_SetLocalSupportedFeaturesCmd (uint8 *localFeatures) |
hciStatus_t | HCI_EXT_SetMaxDataLenCmd (uint16 txOctets, uint16 txTime, uint16 rxOctets, uint16 rxTime) |
hciStatus_t | HCI_EXT_SetMaxDtmTxPowerCmd (uint8 txPower) |
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_HostNumCompletedPktCmd (uint8 numHandles, uint16 *connHandles, uint16 *numCompletedPkts) |
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_ClearResolvingListCmd (void) |
hciStatus_t | HCI_LE_ClearWhiteListCmd (void) |
hciStatus_t | HCI_LE_EncryptCmd (uint8 *key, uint8 *plainText) |
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_RandCmd (void) |
hciStatus_t | HCI_LE_ReadBufSizeCmd (void) |
hciStatus_t | HCI_LE_ReadChannelMapCmd (uint16 connHandle) |
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_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_RemoveDeviceFromResolvingListCmd (uint8 peerIdAddrType, uint8 *peerIdAddr) |
hciStatus_t | HCI_LE_RemoveWhiteListCmd (uint8 addrType, uint8 *devAddr) |
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_SetHostChanClassificationCmd (uint8 *chanMap) |
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_SetResolvablePrivateAddressTimeoutCmd (uint16 rpaTimeout) |
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) |
This module implements the Host Controller Interface
The following table list the mapping between stack APIs and function names, as described in the BT core spec.
Stack API | BT Function |
---|---|
HCI_HostNumCompletedPktCmd | Host Number Of Completed Packets Command |
HCI_LE_AddDeviceToResolvingListCmd | LE Add Device to Resolving List Command |
HCI_LE_AddWhiteListCmd | LE Add Device To White List Command |
HCI_LE_ClearWhiteListCmd | LE Clear White List Command |
HCI_LE_EncryptCmd | LE Encrypt Command |
HCI_LE_RandCmd | LE Rand Command |
HCI_LE_ReadBufSizeCmd | LE Read Buffer Size Command |
HCI_LE_ReadChannelMapCmd | LE Read Channel Map Command |
HCI_LE_ReadLocalResolvableAddressCmd | LE Read Local Resolvable Address Command |
HCI_LE_ReadLocalSupportedFeaturesCmd | Read Local Supported Commands Command |
HCI_LE_ReadMaxDataLenCmd | Set Event Mask Command |
HCI_LE_ReadPeerResolvableAddressCmd | LE Read Peer Resolvable Address Command |
HCI_LE_ReadRemoteUsedFeaturesCmd | LE Read Remote Used Features Command |
HCI_LE_ReadResolvingListSizeCmd | LE Read Resolving List Size Command |
HCI_LE_ReadSuggestedDefaultDataLenCmd | LE Read Suggested Default Data Length Command |
HCI_LE_ReadSupportedStatesCmd | LE Read Supported States Command |
HCI_LE_ReadWhiteListSizeCmd | LE Read White List Size Command |
HCI_LE_RemoveDeviceFromResolvingListCmd | LE Remove Device From Resolving List Command |
HCI_LE_RemoveWhiteListCmd | LE Remove Device From White List Command |
HCI_LE_SetDataLenCmd | LE Set Data Length Command |
HCI_LE_SetEventMaskCmd | LE Set Event Mask Command |
HCI_LE_SetHostChanClassificationCmd | LE Set Host Channel Classification Command |
HCI_LE_SetResolvablePrivateAddressTimeoutCmd | LE Set Resolvable Private Address Timeout Command |
HCI_LE_SetPrivacyModeCmd | LE Set Privacy Mode Command |
HCI_LE_TestEndCmd | LE Test End Command |
HCI_LE_TransmitterTestCmd | LE Transmitter Test Command |
HCI_LE_WriteSuggestedDefaultDataLenCmd | LE Write Suggested Default Data Length Command |
HCI_ReadAuthPayloadTimeoutCmd | Read Authenticated Payload Timeout Command |
HCI_ReadBDADDRCmd | Read BD_ADDR Command |
HCI_ReadLocalSupportedCommandsCmd | Read Local Supported Commands Command |
HCI_ReadLocalSupportedFeaturesCmd | Read Local Supported Features Command |
HCI_ReadLocalVersionInfoCmd | Read Local Version Information Command |
HCI_ReadRemoteVersionInfoCmd | Read Remote Version Information Command |
HCI_ReadRssiCmd | Read RSSI Command |
HCI_ReadTransmitPowerLevelCmd | Read Transmit Power Level Command |
HCI_ResetCmd | Reset Command |
HCI_SetEventMaskCmd | Set Event Mask Command |
HCI_SetEventMaskPage2Cmd | Set Event Mask Page 2 Command |
HCI_LE_ReadTxPowerCmd | LE Read Tx Power Command |
HCI_LE_ReadRfPathCompCmd | LE Read Rf Path Compensation Command |
HCI_LE_WriteRfPathCompCmd | LE Write Rf Path Compensation Command |
The following table lists the mapping between stack APIs and function names, as described in the Vendor Specific API guide included with the installer.
Stack API | Vendor Specific Function |
---|---|
HCI_EXT_BuildRevisionCmd | HCI Extension Build Revision |
HCI_EXT_ConnEventNoticeCmd | HCI Extension Connection Event Notice |
HCI_EXT_DecryptCmd | HCI Extension Decrypt |
HCI_EXT_DisconnectImmedCmd | HCI Extension Disconnect Immediate |
HCI_EXT_EnhancedModemHopTestTxCmd | HCI Extension Enhanced Modem Hop Test Transmit |
HCI_EXT_EnhancedModemTestRxCmd | HCI Extension Enhanced Modem Test Receive |
HCI_EXT_EnhancedModemTestTxCmd | HCI Extension Enhanced Modem Test Transmit |
HCI_EXT_EnablePTMCmd | HCI Extension Enable PTM |
HCI_EXT_EndModemTestCmd | HCI Extension End Modem Test |
HCI_EXT_ModemHopTestTxCmd | HCI Extension Modem Hop Test Transmit |
HCI_EXT_ModemTestRxCmd | HCI Extension Modem Test Receive |
HCI_EXT_ModemTestTxCmd | HCI Extension Modem Test Transmit |
HCI_EXT_NumComplPktsLimitCmd | HCI Extension Number Completed Packets Limit |
HCI_EXT_OnePktPerEvtCmd | HCI Extension One Packet Per Event |
HCI_EXT_PacketErrorRateCmd | HCI Extension Packet Error Rate |
HCI_EXT_PERbyChanCmd | HCI Extension Packet Error Rate By Channel |
HCI_EXT_SaveFreqTuneCmd | HCI Extension Save Frequency Tuning |
HCI_EXT_SetFastTxResponseTimeCmd | HCI Extension Set Fast Transmit Response Time |
HCI_EXT_SetFreqTuneCmd | HCI Extension Set Frequency Tuning |
HCI_EXT_SetLocalSupportedFeaturesCmd | HCI Extension Set Local Supported Features |
HCI_EXT_SetMaxDataLenCmd | HCI Extension Set Max Data Length |
HCI_EXT_SetMaxDtmTxPowerCmd | HCI Extension Set Max DTM Transmitter Power |
HCI_EXT_SetRxGainCmd | HCI Extension Set Receiver Gain |
HCI_EXT_SetSCACmd | HCI Extension Set SCA |
HCI_EXT_SetTxPowerCmd | HCI Extension Set Transmitter Power |
HCI_EXT_SetDtmTxPktCntCmd | HCI Extension Set DTM Transmitter Packet Count |
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.
mode | Set User Revision Command |
userRevNum | user defined revision number |
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".
If configured successfully, it will result in BLE stack events sent as shown in the following example.
connHandle | The HCI connection ID for connection event notice. |
taskID | User's task ID. |
taskEvent | User's task event. |
hciStatus_t HCI_EXT_DecryptCmd | ( | uint8 * | key, |
uint8 * | encText | ||
) |
Decrypt encrypted data using AES128.
key | Pointer to 16 byte encryption key. The most significant octet of the data corresponds to key[0] using the notation specified in FIPS 197. |
encText | Pointer to 16 byte encrypted data. The most significant octet of the key corresponds to key[0] using the notation specified in FIPS 197. |
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.
connHandle | Connection handle. |
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.
hciStatus_t HCI_EXT_EndModemTestCmd | ( | void | ) |
Shutdown a modem test.
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.
payloadLen | Number bytes (0..255)in payload for each packet. |
payloadType | Direct Test Mode |
rfPhy | RF Setup PHY Parameters |
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.
rfPhy | RF Setup PHY Parameters |
rfChan | Receiver RF channel k=0..39, where BLE F=2402+(k*2MHz). |
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.
cwMode | TX Modulation |
rfPhy | RF Setup PHY Parameters |
rfChan | Transmit RF channel k=0..39, where BLE F=2402+(k*2MHz). |
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.
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.
rxChan | Receiver RF channel k=0..39, where BLE F=2402+(k*2MHz). |
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.
cwMode | TX Modulation |
txChan | Transmit RF channel k=0..39, where BLE F=2402+(k*2MHz). |
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.
limit | From 1 to HCI_MAX_NUM_CMD_BUFFERS. |
flushOnEvt | Number of Completed Packets |
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.
control | One Packet Per Event |
hciStatus_t HCI_EXT_PacketErrorRateCmd | ( | uint16 | connHandle, |
uint8 | command | ||
) |
Packet Error Rate Command
Reset or Read the Packet Error Rate counters for a connection.
connHandle | The LL connection ID on which to send this data. |
command | Packet Error Rate Command |
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)
connHandle | The LL connection ID on which to send this data. |
perByChan | Pointer to PER by Channel data, or NULL. |
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.
mode | Reset Type |
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.
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.
txPktCnt | Number of DTM packets to transmit. |
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.
control | Fast Tx Response Time |
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.
step | Frequency Tuning |
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.
localFeatures | Pointer to eight bytes of local features. |
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).
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). |
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.
txPower | TX Power Index |
hciStatus_t HCI_EXT_SetRxGainCmd | ( | uint8 | rxGain | ) |
Set the receiver gain.
The default system value for this feature is HCI_EXT_RX_GAIN_STD
rxGain | RX Gain |
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.
scaInPPM | A SCA value in PPM from 0..500. |
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
control | Slave Latency Override |
hciStatus_t HCI_EXT_SetTxPowerCmd | ( | uint8 | txPower | ) |
Set the transmit power.
The default system value for this feature is HCI_EXT_TX_POWER_0_DBM
The 'txPower' input parameter should be an index from TX Power Index.
txPower | TX Power Index |
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.
numHandles | Number of connection handles. |
connHandles | Array of connection handles. |
numCompletedPkts | Array of number of completed packets. |
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.
peerIdAddrType | Device Address Type |
peerIdAddr | Peer device Identity Address. |
peerIRK | IRK of peer device. |
localIRK | IRK for own device. |
hciStatus_t HCI_LE_AddWhiteListCmd | ( | uint8 | addrType, |
uint8 * | devAddr | ||
) |
Add a white list entry.
addrType | Device Address Type |
devAddr | Pointer to address of device to put in white list. |
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.
hciStatus_t HCI_LE_ClearWhiteListCmd | ( | void | ) |
Clear the white list.
hciStatus_t HCI_LE_EncryptCmd | ( | uint8 * | key, |
uint8 * | plainText | ||
) |
Perform an encryption using AES128.
key | Pointer to 16 byte encryption key. |
plainText | Pointer to 16 byte plain-text data. |
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.
rxChan | Rx Channel k=0..39, where F=2402+(k*2MHz). |
rxPhy | Rx PHY to use. See 2 Mbps & Coded PHY |
modIndex | Direct Test Mode Enhanced |
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.
txChan | Tx RF channel k=0..39, where F=2402+(k*2MHz). |
payloadLen | Byte length (0..37) in payload for each packet. |
payloadType | Direct Test Mode |
txPhy | Tx PHY to use. See 2 Mbps & Coded PHY |
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.
hciStatus_t HCI_LE_ReadBufSizeCmd | ( | void | ) |
Determine the maximum ACL data packet size allowed by the Controller.
hciStatus_t HCI_LE_ReadChannelMapCmd | ( | uint16 | connHandle | ) |
Read a connection's data channel map.
connHandle | Connection handle. |
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.
localIdAddrType | Device Address Type |
localIdAddr | Local device Identity Address. |
hciStatus_t HCI_LE_ReadLocalSupportedFeaturesCmd | ( | void | ) |
Read the LE locally supported features.
hciStatus_t HCI_LE_ReadMaxDataLenCmd | ( | void | ) |
Read max data length
Read the maximum supported transmit and receive payload octets and packet duration times.
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.
peerIdAddrType | Device Address Type |
peerIdAddr | Peer device Identity Address. |
hciStatus_t HCI_LE_ReadPhyCmd | ( | uint16 | connHandle | ) |
Read the current transmitter and receiver PHY.
connHandle | Connection handle. |
hciStatus_t HCI_LE_ReadRemoteUsedFeaturesCmd | ( | uint16 | connHandle | ) |
Read the remote device's used features.
connHandle | Connection handle. |
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.
hciStatus_t HCI_LE_ReadRfPathCompCmd | ( | void | ) |
Read the Tx and Rx RF Path Compensation values.
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.
hciStatus_t HCI_LE_ReadSupportedStatesCmd | ( | void | ) |
Read the Controller's supported states.
hciStatus_t HCI_LE_ReadTxPowerCmd | ( | void | ) |
Read the minimum and maximum supported Tx Power.
hciStatus_t HCI_LE_ReadWhiteListSizeCmd | ( | void | ) |
Read the white list.
hciStatus_t HCI_LE_ReceiverTestCmd | ( | uint8 | rxChan | ) |
Start the receiver Direct Test Mode test.
rxChan | Rx Channel k=0..39, where F=2402+(k*2MHz). |
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.
peerIdAddrType | Device Address Type |
peerIdAddr | Peer device Identity Address. |
hciStatus_t HCI_LE_RemoveWhiteListCmd | ( | uint8 | addrType, |
uint8 * | devAddr | ||
) |
Remove a white list entry.
addrType | Device Address Type |
devAddr | Pointer to address of device to remove from the white list. |
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.
connHandle | Connection handle. |
txOctets | Maximum transmit payload size (in bytes). |
txTime | Maximum transmit time (in us). |
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.
allPhys | Host preference on how to handle txPhy and rxPhy. |
txPhy | Bit field of Host preferred Tx PHY. See 2 Mbps & Coded PHY |
rxPhy | Bit field of Host preferred Rx PHY. See 2 Mbps & Coded PHY |
hciStatus_t HCI_LE_SetEventMaskCmd | ( | uint8 * | pEventMask | ) |
Set the HCI LE event mask
The event mask to determine which LE events are supported.
pEventMask | Pointer to LE event mask of 8 bytes. |
hciStatus_t HCI_LE_SetHostChanClassificationCmd | ( | uint8 * | chanMap | ) |
Update the current data channel map.
chanMap | Pointer to the new channel map. |
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.
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. |
phyOpts | Bit field of Host preferred PHY options. |
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.
peerIdAddrType | Device Address Type |
peerIdAddr | Peer device Identity Address. |
privacyMode | HCI_NETWORK_PRIVACY_MODE HCI_DEVICE_PRIVACY_MODE |
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.
rpaTimeout | RPA timeout (in secs). |
hciStatus_t HCI_LE_TestEndCmd | ( | void | ) |
End the Direct Test Mode test.
hciStatus_t HCI_LE_TransmitterTestCmd | ( | uint8 | txChan, |
uint8 | dataLen, | ||
uint8 | pktPayload | ||
) |
This LE API is used to start the transmit Direct Test Mode test.
txChan | Tx RF frequency k=0..39, where F=2402+(k*2MHz). |
dataLen | Test data length: 0..37 bytes |
pktPayload | Direct Test Mode |
hciStatus_t HCI_LE_WriteRfPathCompCmd | ( | int16 | txPathParam, |
int16 | rxPathParam | ||
) |
Write the Tx and Rx RF Path Compensation values.
txPathParam | Tx path compensation parameter (in 0.1 dBm). |
rxPathParam | Rx path compensation parameter (in 0.1 dBm). |
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.
txOctets | Maximum transmit payload size (in bytes). |
txTime | Maximum transmit time (in us). |
hciStatus_t HCI_ReadAuthPayloadTimeoutCmd | ( | uint16 | connHandle, |
uint16 * | aptoValue | ||
) |
Read the connection's Authenticated Payload Timeout value.
connHandle | The LL connection ID to read the APTO value from. |
aptoValue | Pointer to current APTO value, in units of 10 ms. |
hciStatus_t HCI_ReadBDADDRCmd | ( | void | ) |
Read this device's BLE address (BDADDR).
hciStatus_t HCI_ReadLocalSupportedCommandsCmd | ( | void | ) |
Read the locally supported commands.
hciStatus_t HCI_ReadLocalSupportedFeaturesCmd | ( | void | ) |
Read the locally supported features.
hciStatus_t HCI_ReadLocalVersionInfoCmd | ( | void | ) |
Read the local version information.
hciStatus_t HCI_ReadRemoteVersionInfoCmd | ( | uint16 | connHandle | ) |
Request version information from the remote device in a connection.
connHandle | Connection handle. |
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.
connHandle | Connection handle. |
hciStatus_t HCI_ReadTransmitPowerLevelCmd | ( | uint16 | connHandle, |
uint8 | txPwrType | ||
) |
Read the transmit power level.
connHandle | Connection handle. |
txPwrType | ref TX_Power_Mode |
hciStatus_t HCI_ResetCmd | ( | void | ) |
Reset the Link Layer.
hciStatus_t HCI_SetEventMaskCmd | ( | uint8 * | pMask | ) |
Set the HCI event mask
The event mask is used to determine which events are supported.
pMask | Pointer to an eight byte event mask. |
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.
pMask | Pointer to an eight byte event mask. |
hciStatus_t HCI_WriteAuthPayloadTimeoutCmd | ( | uint16 | connHandle, |
uint16 | aptoValue | ||
) |
Used to write the connection's Authenticated Payload Timeout value.
connHandle | The LL connection ID to write the APTO value to. |
aptoValue | The APTO value, in units of 10 ms. |