Vendor Specific HCI Commands

Introduction

The purpose of this document is to describe the Texas Instruments Inc. (TI) vendor specific Host Controller Interface (HCI) for Bluetooth® low energy (BLE).

Functional Overview

In BLE, there is a logical distinction between the Host software (often referred to as the higher layer stack) and the Controller software as shown below.

../../_images/stack-layers.png

Fig. 9 BLE Protocol Stack Layers

These components can either exist on the same device (single-device configuration), or be placed on separate devices (dual-device configuration) utilizing a Host Controller Interface (HCI) for communication. In the single-device configuration, there is obviously only one device, and the application software would execute on top of the BLE profiles and stack.

../../_images/single-device.png

Fig. 10 Single Device Configuration

In the dual-device configuration, the application software would also execute on top of the BLE profiles and stack, and only the controller would be located on a separate device.

../../_images/dual-device.png

Fig. 11 Dual Device Configuration

Numerical Notation Conventions

Multiple-octets may be specified in hexadecimal notation in one of two ways:

Standard Hexadecimal Notation

In this notation, a single hexadecimal radix indicator “0x” precedes the entire value. The octet order as read from left to right is from most significant octet to least significant octet. For example, for the value 0x123456ABCDEF, ’12’ is the most significant octet and ‘EF’ is the least significant octet.

Colon Separated Hexadecimal Notation

In this notation, the hexadecimal radix indicator “0x” is not used and octets are colon separated. The octet order as read from left to right is from least significant octet to most significant octet. For example, for the value 12:34:56:AB:CD:EF, ’12’ is the least significant octet and ‘EF’ is the most significant octet.

HCI Overview

The HCI is a standardized Bluetooth interface for sending commands, receiving events, and for sending and receiving data. It is typically realized as a serial interface, using either RS232 or USB communication devices. As the name implies, the HCI is used to bridge the Host and Controller devices. Commands and Events can either be specified, or can be vendor specific for extensibility. The following sections summarize the HCI protocol, the specification defined commands and events used by BLE, and a detailed description of the vendor specific commands and events defined by Texas Instruments Inc. For complete details on the HCI as specified by the Special Interest Group (SIG), please see the Core specification [1].

HCI Interface Protocol

The HCI supports four types of packets: Command Packet, Asynchronous Data Packet, Synchronous Data Packet, and Event Packet. The packet type is a one byte value that precedes the HCI packet. The packet type has the following values:

Packet Packet Type
Command 0x01
Asynchronous Data 0x02
Synchronous Data 0x03
Event 0x04
Extended Command 0x09

The contents of each packet are shown as follows (please see section 5.4 of [1], Vol. 2, Part E for additional details).

Command Packet

The command packet is comprised of the opcode, the number of parameters, and parameters themselves.

../../_images/command-packet.png

Fig. 12 Command Packet

Asynchronous Data Packet

The asynchronous data packet is comprised of the connection handle, fragmentation bits, the number of data bytes, and the data bytes themselves.

../../_images/async-data-packet.png

Fig. 13 Asynchronous Data Packet

Synchronous Data Packet

This synchronous data packet is not used in BLE.

Event Packet

The event packet is comprised of the event code, the number of event parameters, and the event parameters themselves.

../../_images/event-packet.png

Fig. 14 Event Packet

Extended Command

This packet is used to allow more than the HCI limit of 256 bytes. It includes a two-byte length field which states the payload length:

Offset Description
0 packet type (0x09)
1 LSB opcode
2 MSB opcode
3 LSB payload length
4 MSB payload length
5..(length-3) Payload

See each individual command for payload formatting.

HCI Commands

HCI commands use a 16-bit opcode for identification. The opcode is subdivided into two parts: a 10-bit Opcode Command Field (OCF) and a 6-bit Opcode Group Field (OGF).

../../_images/hci-command-opcode.png

Fig. 15 HCI Command Opcode

The OGF values are defined by the Bluetooth (BT) Core specification. The LE specification has its own OGF value. Also, there is an escape OGF value so that vendor specific OCF codes can be used. The following OGF values are valid for BLE: # Link Control Commands: 1 # Link Policy Commands: 2 # Controller and Baseband Commands: 3 # Informational Parameters: 4 # Status Parameters: 5 # Testing Commands: 6 # LE Only Commands: 8 # Vendor Specific Commands: 63

The following table, Table 2, lists all specification LE HCI commands and their opcodes. Note that while all commands can be sent by the application processor to the Network Processor using HCI, not all events will be returned as they will be trapped and possibly discarded by the Host layer of the BLE Stack. Therefore, it is not possible to support an external BLE Host in the Network Processor configuration. Network Processor based designs should use the respective Vendor Extension commands detailed in the following sections to implement an off-chip application.

LE Commands OGF OCF Opcdoe
LE Set Event Mask 8 1 0x2001
LE Read Buffer Size 8 2 0x2002
LE Read Local Supported Features 8 3 0x2003
LE Set Random Address 8 5 0x2005
LE Set Advertising Parameters 8 6 0x2006
LE Read Advertising Channel TX Power 8 7 0x2007
LE Set Advertising Data 8 8 0x2008
LE Set Scan Response Data 8 9 0x2009
LE Set Advertise Enable 8 10 0x200A
LE Set Scan Parameters 8 11 0x200B
LE Set Scan Enable 8 12 0x200C
LE Create Connection 8 13 0x200D
LE Create Connection Cancel 8 14 0x200E
LE Read White List Size 8 15 0x200F
LE Clear White Lis 8 16 0x2010
LE Add Device To White List 8 17 0x2011
LE Remove Device From White List 8 18 0x2012
LE Connection Update 8 19 0x2013
LE Set Host Channel Classification 8 20 0x2014
LE Read Channel Map 8 21 0x2015
LE Read Remote Used Features 8 22 0x2016
LE Encrypt 8 23 0x2017
LE Rand 8 24 0x2018
LE Start Encryption 8 25 0x2019
LE Long Term Key Requested Reply 8 26 0x201A
LE Long Term Key Requested Negative Reply 8 27 0x201B
LE Read Supported States 8 28 0x201C
LE Receiver Test 8 29 0x201D
LE Transmitter Test 8 30 0x201E
LE Test End Command 8 31 0x201F
LE Remote Connection Parameter Request Reply 8 32 0x2020
LE Remote Connection Parameter Request Negative Reply 8 33 0x2021
LE Set Data Length 8 34 0x2022
LE Read Suggested Default Data Length 8 35 0x2023
LE Write Suggested Default Data Length 8 36 0x2024
LE Read Local P256 Public Key 37 0x2025 LE Generate DHKey 8 38 0x2026
LE Add Device to Resolving List 8 39 0x2027
LE Remove Device from Resolving List 8 40 0x2028
LE Clear Resolving List 8 41 0x2029
LE Read Resolving List Size 8 42 0x202A
LE Read Peer Resolvable Address 8 43 0x202B
LE Read Local Resolvable Address 8 44 0x202C
LE Set Address Resolution Enable 8 45 0x202D
LE Set Resolvable Private Address Timeout 8 46 0x202E
LE Read Maximum Data Length 8 47 0x202F
BT Commands for LE OGF OCF Opcode
Disconnect 1 6 0x0406
Read Remote Version Information 1 29 0x041D
Set Event Mask 3 1 0x0C01
Reset 3 3 0x0C03
Read Transmit Power Level 3 45 0x0C2D
Set Controller To Host Flow Control (optional) 3 49 0x0C31
Host Buffer Size (optional) 3 51 0x0C33
Host Number Of Completed Packets (optional) 3 53 0x0C35
Set Event Mask Page 3 63 0x0C63
Read Authenticated Payload Timeout 4 123 0x0C7B
Write Authenticated Payload Timeout 4 124 0x0C7C
Read Local Version Information 4 1 0x1001
Read Local Supported Commands (optional) 4 2 0x1002
Read Local Supported Features 4 3 0x1003
Read BD_ADDR 4 9 0x1009
Read RSSI 5 5 0x1405

HCI Events

HCI events use an 8-bit event code. All event codes are unique for BT and BLE. Only event code 255 is reserved for vendor specific events. There is only one event code for all LE events. The first event parameter is used as the subevent code to distinguish the LE event types.

The following table lists all the BLE events and their event codes, and subevent codes when applicable:

LE Events Event Code Subevent Code
LE Connection Complete 0x3E 0x01
LE Advertising Report 0x3E 0x02
LE Connection Update Complete 0x3E 0x03
LE Read Remote Used Features Complete 0x3E 0x04
LE Long Term Key Requested 0x3E 0x05
LE Remote Connection Parameter Request 0x3E 0x06
LE Data Length Change 0x3E 0x07
LE Read Local P256 Public Key Complete 0x3E 0x08
LE Generate DHKey Complete 0x3E 0x09
LE Enhanced Connection Complete 0x3E 0x0A
LE Direct Advertising Report 0x3E 0x0B
BT Events Event Code
Disconnection Complete 0x05
Encryption Change 0x08
Read Remote Version Information Complete 0x0C
Command Complete 0x0E
Command Status 0x0F
Hardware Error (optional) 0x10
Number Of Completed Packets 0x13
Data Buffer Overflow 0x1A
Encryption Key Refresh Complete 0x30
Authenticated Payload Timeout Expired 0x57

As mentioned, vendors can specify their own HCI commands and events by using the predefined vendor specific opcode and vendor specific event code.

Vendor Specific Commands

A vendor specific opcode is indicated by an OGF value of 63. The vendor can use the remaining 10 bits (i.e. the OCF) as they like. TI defines its vendor specific OCF values by subdividing the 10 bits into a 3 MSB Command Subgroup (CSG) and a 7 LSB Command (CMD). The CSG is used by the HCI to route the commands to a designated subsystem within the BLE stack. In this way, vendor specific commands can be specified for any BLE stack layer.

../../_images/vendor-specific-opcode-0-6.png

Fig. 16 HCI Vendor Specific Command Opcode, CSG=0..6

The Command Subgroups are defined as follows:

CSG Subgroup
0 HCI
1 L2CAP
2 ATT
3 GATT
4 GAP
5 UTIL
6 Reserved
7 User Profile

For Command Subgroups 0 to 6, the remaining 7 bits of Command provide up to 128 commands for each subgroup. For Subgroup 7, the remaining 7 bits specify one of 128 profiles and indicates that the subsequent byte is to be used as the command for that particular profile (i.e. up to 256 commands per profile).

../../_images/vendor-specific-opcode-7.png

Fig. 17 HCI Vendor Specific Command Opcode, CSG=7

Vendor Specific Events

A vendor specific event code is indicated by a value of 255. The vendor must then use event parameters (following the length byte) to specify vendor specific events. TI defines the following two bytes as the Event Opcode.

../../_images/vendor-specific-event-1.png

The Event Opcode was chosen to mirror the Command Opcode by dividing it into two parts: a 6 bit Event Opcode Group Field (EOGF), and a 10 bit Event Opcode Event Field (EOEF).

../../_images/vendor-specific-event-2.png

The EOEF is again chosen to mirror the Command OCF by dividing it into two parts: the Event Subgroup (ESG) and the Event.

../../_images/vendor-specific-event-3.png

The EOGF is defined as follows:

EOGF Group
0 Embedded Opcode
1 Core Opcode
2 Profile Request
3 Profile Response
4-63 Reserved

The ESG is defined as in Table 4. The Events are as defined in the following table. Please note that the value of the Events cannot be less than 0x400 as the first 1024 values are reserved. The reason for this has to do with Client/Server Request/Response Tunneling, which is described in the following section. Tunneling requires embedding Command Opcodes in HCI Events. When this is done, the EOGF is zero, and the remaining 10 bits is the Command Opcode. In order to prevent Command and Event Opcode overlap, the first 1024 values are reserved in the Event Opcode space. Also note that the Event Code (EC) is always 0xFF since normally only Controller events are returned via the HCI.

You will note that there are two EOGF values for Profiles. At this time, no profiles are defined well enough to document here. These values are defined in anticipation of not only needing large numbers of profiles and their commands, but also of needing the direction the command is traveling when embedded in an HCI Command or Event. You can see that ATT does not have this issue as these commands are already defined using even values for commands and odd values for events, and thus, direction is distinguishable. For profiles, it is not yet known how the commands and events will be defined.

Request and Response Tunneling

In the Client/Server model defined and supported by the BLE stack, the Client sends Requests to the Server and the Server sends Responses back to the Client. The Requests sent by the Client may be handled by a Server on the same device, or they may travel OTA to the Server on another device. Similarly, the Response sent by the Server may be handled by a Client on the same device, or may be sent OTA to a Client on another device from which the request came. But in either case, as long as the Requests and Responses remain within the scope of the BLE stack software (i.e. the BLE Server database is on the device), the BLE stack remains unconcerned about whether the Requests and Responses are sent/received by the same device or are from another device.

../../_images/tunneling-1.png

Fig. 21 Request/Response with Server Database in BLE Stack

However, when using the Network Processor Configuration with HCI such that the Server database is not located on the device, then Requests and Responses have to be mapped into HCI Commands and Events. The HCI is specified such that only Commands are sent from the Host to the Controller, and only Events are sent from the Controller to the Host. If the Server database is located on say a PC, then when an OTA Request is received by the Server device, it must be sent to the PC via the HCI. Even though the Request started out on one end as an HCI Command, it must be provided to the remote PC as an HCI event on the other. Similarly, when the PC sends the Response on one end, which will be an HCI Event to the remote PC on the other, it must be sent to the device as an HCI Command. Thus, the Request, which starts out as an HCI Command, must be embedded in an HCI Event when received by the remote PC, and the Response, which starts out as an HCI Command, must be embedded in an HCI Event when received by the remote PC. In this way, Requests and Responses are being tunneled in HCI Commands and Events.

../../_images/tunneling-2.png

Fig. 22 Request/Response with Server Database not in BLE Stack

HCI Extension Commands

In addition to the BLE HCI commands, the following HCI Extension vendor specific commands are also available.

HCI_EXT_SetTxPowerCmd

Opcode:0xFC01
Command Description:
 This command is used to set the RF transmitter output power.

Command Parameters

TX Power:

Tx power to use.

Size:

1 byte(s)

Default:

2

Range:
Value Description
0 : 0 dBm
1 : 5 dBm
2 : 10 dBm
3 : 20 dBm

Events Generated

When this command has completed, an HCI_EXT_SetTxPowerDone event shall be generated.

HCI_EXT_OnePktPerEvtCmd

Opcode:0xFC02
Command Description:
 This command is used to configure the Link Layer to only allow one packet per connection event. This command can be used to trade^off throughput and power consumption during a connection. When enabled, power can be conserved during a connection by limiting the number of packets per connection event to one, at the expense of more limited throughput. When disabled, the number of packets transferred during a connection event is not limited, at the expense of higher power consumption. Note that when set, all connections will be restricted to one packet per event.

Command Parameters

Control:

Enable or disable allowing only one packet per event.

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Disable
1 Enable

Events Generated

When this command has completed, an HCI_EXT_OnePacketPerEventDone event shall be generated only if the state has changed.

HCI_EXT_DecryptCmd

Opcode:0xFC05
Command Description:
 This command is used to decrypt encrypted text using AES128.

Command Parameters

Key:

128 bit key for the decryption of the data given in the command. The most significant octet of the data corresponds to key[0] using the notation specified in FIPS 197.

Size:16 byte(s)
Default:“BF:01:FB:9D:4E:F3:BC:36:D8:74:F5:39:41:38:68:4C”
Range:Any 16 byte value
Data:

128 bit encrypted data to be decrypted. The most significant octet of the key corresponds to key[0] using the notation specified in FIPS 197.

Size:16 byte(s)
Default:“66:C6:C2:27:8E:3B:8E:05:3E:7E:A3:26:52:1B:AD:99”
Range:Any 16 byte value

Events Generated

When this command has completed, an HCI_EXT_DecryptCommandDone event shall be generated.

HCI_EXT_SetLocalSupportedFeaturesCmd

Opcode:0xFC06
Command Description:
 This command is used to set the Controllers Local Supported Features. For a complete list of supported LE features, please see [1], Part B, Section 4.6. Note: This command can be issued either before or after one or more connections are formed. However, the local features set in this manner are only effective if performed before a Feature Exchange Procedure has been initiated by the Master. Once this control procedure has been completed for a particular connection, only the exchanged feature set for that connection will be used. Since the Link Layer may initiate the feature exchange procedure autonomously, it is best to use this command before the connection is formed.

Command Parameters

FeatureSet:

Write LL local supported features.

Size:

8 byte(s)

Default:

0x0000000000000001

Range:
Value Description
0x0000000000000000 No Events Specified
0x0000000000000001 Encryption
0x0000000000000002 Connection Parameters Request
0x0000000000000004 Reject Extended Indication
0x0000000000000008 Slave Features Exchange
0x0000000000000010 Ping
0x0000000000000020 Data Packet Length Extension
0x0000000000000040 Privacy
0x0000000000000080 Extended Scanner Filter Policies
0x0000000000000100 2M PHY
0x0000000000000200 Stable Modulation Index Tx
0x0000000000000400 Stable Modulation Index Rx
0x0000000000000800 Coded PHY
0x0000000000001000 Extended Advertising
0x0000000000002000 Periodic Advertising
0x0000000000004000 Channel Selection Algorithm #2
0x0000000000008000 LE Power Class 1
0x0000000000010000 Minimum Number of Used Channels

Events Generated

When this command has completed, an HCI_EXT_WriteLocalFeatureSupportDone event shall be generated.

HCI_EXT_SetFastTxRespTime

Opcode:0xFC07
Command Description:
 This command is used to set whether transmit data is sent as soon as possible even when peripheral latency is used.

Command Parameters

Control:

Enable or disable allowing only one packet per event.

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Disable
1 Enable

Events Generated

When this command has completed, an HCI_EXT_SetFastTxRespTimeDone event shall be generated.

HCI_EXT_SetBDADDRCmd

Opcode:0xFC0C
Command Description:
 This command is used to set this devices BLE address (BDADDR). This address will override the devices address determined when the device is reset (i.e. a hardware reset, not an HCI Controller Reset). To restore the devices initialized address, issue this command with an invalid address. Note: This command is only allowed when the Controller is in the Standby state. Note: This command is intended to only be used during initialization. Changing the devices BDADDR after various BLE operations have already taken place may cause unexpected problems.

Command Parameters

BDADDR:

BLE Public Address (MSB..LSB). Use “FF:FF:FF:FF:FF:FF” to restore the device address to that which was determined at initialization.

Size:6 byte(s)
Default:“00:00:00:00:00:00”
Range:Any 6 byte value

Events Generated

When this command has completed, an HCI_EXT_SetBDADDRDone event shall be generated.

HCI_EXT_SetSCACmd

Opcode:0xFC0D
Command Description:
 This command is used to set this devices Sleep Clock Accuracy (SCA) value, in parts per million (PPM), from 0 to 500. For a Master device, the value is converted to one of eight ordinal values representing a SCA range (per [1], Volume 6, Part B, Section 2.3.3.1, Table 2.2), which will be used when a connection is created. For a Slave device, the value is directly used. The system default value for a Master and Slave device is 50ppm and 40ppm, respectively. Note: This command is only allowed when the device is not in a connection. Note: The devices SCA value remains unaffected by an HCI Reset.

Command Parameters

SCA:

BLE Device Sleep Clock Accuracy (PPM).

Size:2 byte(s)
Default:“40”
Range:(0..500)

Events Generated

When this command has completed, an HCI_EXT_SetSCADone event shall be generated.

HCI_EXT_SetMaxDtmTxPowerCmd

Opcode:0xFC11
Command Description:
 This command is used to set the RF transmitter output power when doing RF testing in PLT mode.

Command Parameters

TX Power:

Tx power to use.

Size:

1 byte(s)

Default:

2

Range:
Value Description
0 : 0 dBm
1 : 5 dBm
2 : 10 dBm
3 : 20 dBm

Events Generated

When this command has completed, an HCI_EXT_SetTxPowerDone event shall be generated.

HCI_EXT_DisconnectImmedCmd

Opcode:0xFC13
Command Description:
 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. Note that the Host issuing the command will still receive the HCI Disconnection Complete event with a Reason status of 0x16 (i.e. Connection Terminated by Local Host), followed by an HCI Vendor Specific Event.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:2 byte(s)
Default:0x0000
Range:0x0000 to 0x0EFF

Events Generated

When this command has completed, an HCI_EXT_DisconnectImmedDone event shall be generated.

HCI_EXT_PacketErrorRateCmd

Opcode:0xFC14
Command Description:
 This command is used to Reset or Read the Packet Error Rate counters for a connection. When Reset, the counters are cleared; when Read, the total number of packets received, the number of packets received with a CRC error, the number of events, and the number of missed events are returned. The system default value upon hardware reset is Reset. Note: The counters are only 16 bits. At the shortest connection interval, this provides a little over 8 minutes of data. Note: This command is only valid for a valid connection handle (i.e. for an active connection). It is therefore not possible to read the packet error rate data once the connection has ended.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:2 byte(s)
Default:0x0000
Range:0x0000 to 0x0EFF
PER Test Command:
 

Reset or Read the PER counters.

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Reset PER Counters
1 Read PER Counters

Events Generated

When this command has completed, an HCI_EXT_PER event shall be generated.

HCI_EXT_ResetSystemCmd

Opcode:0xFC1D
Command Description:
 This command is used to issue a hard or soft system reset. A hard reset is caused by setting the SYSRESET bit in the System Controller Reset Control register. The soft reset is currently not supported on the CC264x.

Command Parameters

Type:

Reset Type

Size:

1 byte(s)

Default:

0

Range:
Value Description
0x00 Chip Reset
0x01 Soft Reset

Events Generated

When this command has completed, an HCI_EXT_ResetSystemDone event shall be generated.

HCI_EXT_NumComplPktsLimitCmd

Opcode:0xFC1F
Command Description:
 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 Number of Completed Packets event will be returned (if non^zero) based on the flushOnEvt flag. The limit can be set from one to the maximum number of HCI buffers (please see the LE Read Buffer Size command in the Bluetooth Core specification). The default limit is one; the default flushOnEvt flag is FALSE.

Command Parameters

Limit:

Set Number of Completed Packets Limit.

Size:1 byte(s)
Default:1
Range:0x01 to the value returned from HCI_LE_ReadBufSizeCmd
flushOnEvt:

Enable or disable flush of Number of Completed Packets at end of Event.

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Disable
1 Enable

Events Generated

When this command has completed, an HCI_EXT_NumComplPktsLimitDone event shall be generated.

HCI_EXT_GetConnInfoCmd

Opcode:0xFC20
Command Description:
 This command (which replaces Get Number Connections) is used to get the number of allocated connections, the number of active connections, and for each active connection, the connection handle, the connection role, the peer device address and peer device address type. The number of allocated connections is based on a default build value that can be changed in the project using MAX_NUM_BLE_CONNS (please see the software users guide for additional details). The number of active connections refers to active BLE connections. The information per connection is based on the structure hciConnInfo_t provided in hci.h. If all parameters are NULL, then the call to this command is considered a network processor call via a transport layer, and the results will be provided via a vendor specific command complete event.If any parameter is not NULL, then the call to this command is considered a direct function call and the valid pointers will be used to store the result. In this case, it is the users responsibility to ensure there is sufficient memory allocated! Note that partial results can be obtained by selective use of the pointers. For example, if only the number of active connections is desired, this can be obtained as follows:

Events Generated

When this command has completed, an HCI_EXT_GetConnInfoDone event shall be generated.

HCI_EXT_SetMaxDataLenCmd

Opcode:0xFC21
Command Description:
 This command is used to set the Data Length Extension internal variables supportedMaxTxOctets, supportedMaxTxTime, supportedMaxRxOctets and supportedMaxRxTime that are normally set exclusively by the Controller to the maximum data length and duration allowed by this device (default Tx and Rx Octets is 251; default Tx and Rx Time is 2120 us [but note that any future change to support PHYs could alter the default values of Time]).

Command Parameters

Tx Octets:

Maximum number of payload octets that the local Controller supports for transmission of a single Link Layer Data Channel PDU.

Size:2 byte(s)
Default:0
Range:0x001B to 0x00FB
Tx Time:

Maximum time, in microseconds, that the local Controller supports for transmission of a single Link Layer Data Channel PDU.

Size:2 byte(s)
Default:0
Range:0x0148 to 0x0848
Rx Octets:

Maximum number of payload octets that the local Controller supports for reception of a single Link Layer Data Channel PDU.

Size:2 byte(s)
Default:0
Range:0x001B to 0x00FB
Rx Time:

Maximum time, in microseconds, that the local Controller supports for reception of a single Link Layer Data Channel PDU.

Size:2 byte(s)
Default:0
Range:0x0148 to 0x0848

Events Generated

When this command has completed, an HCI_EXT_SetMaxDataLengthDone event shall be generated.

HCI_EXT_ReadRandomAddressCmd

Opcode:0xFC25
Command Description:
 This command is used to Read the controller’s own random device address

Command Parameters

None

Events Generated

When this command has completed, an HCI_EXT_ReadRandomAddressDone event shall be generated.

HCI_EXT_GetActiveConnectionInfoCmd

Opcode:0xFC2C
Command Description:
 This command is used to get connection information needed to track an active BLE connection.

Command Parameters

connID:

Connection ID

Size:1 byte(s)
Default:0
Range:0x0000 to 0x0EFF

Events Generated

When this command has completed, an HCI_EXT_GetActiveConnInfoDone shall be generated.

HCI_EXT_GetRxStatisticsCmd

Opcode:0xFC31
Command Description:
 This command is used to get RX statistics.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:2 byte(s)
Default:0x0000
Range:0x0000 to 0x0EFF
Command:

Resets or Reads Statistic Counters

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Reset (Clears all Statistic Counters)
1 Read (Reads Statistic Counters)

Events Generated

When this command has completed, an HCI_EXT_GetRxStatsDone event shall be generated.

HCI_EXT_GetTxStatisticsCmd

Opcode:0xFC32
Command Description:
 This command is used to get TX statistics.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:2 byte(s)
Default:0x0000
Range:0x0000 to 0x0EFF
Command:

Resets or Reads Statistc Counters

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Reset (Clears all Statistic Counters)
1 Read (Reads Statisc Counters)

Events Generated

When this command has completed, an HCI_EXT_GetTxStatsDone event shall be generated.

HCI_EXT_GetCoexStatisticsCmd

Opcode:0xFC33
Command Description:
 This command is used to get Coexistence statistics.

Command Parameters

Command:

Resets or Reads Statistic Counters

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 Reset (Clears all Statistic Counters)
1 Read (Reads Statistic Counters)

Events Generated

When this command has completed, an HCI_EXT_GetCoexStatsDone event shall be generated.

HCI_EXT_LESetExtendedAdvertisingDataCmd

Opcode:0xFC71
Command Description:
 This command is used to set extended ADV data.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:1 byte(s)
Default:0x00
Range:0x00 to 0xEF
Fragment:

Allows the fragmentation of data

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 The Controller may fragment all data
1 The Controller should not fragment data
Data Length:

The number of bytes in the Advertising Data parameter :Size: 1 byte(s) :Range: 0 to 251

Advertsing Data:
 

Data that will be set while Advertising :Size: N/A

Events Generated

When this command has completed, an HCI_EXT_LESetExtendedAdvertisingDataDone event shall be generated.

HCI_EXT_LESetExtendedScanResponseDataCmd

Opcode:0xFC72
Command Description:
 This command is used to set extended Scan Response.

Command Parameters

Connection Handle:
 

Handle used to identify a connection

Size:1 byte(s)
Default:0x00
Range:0x00 to 0xEF
Fragment:

Allows the fragmentation of data

Size:

1 byte(s)

Default:

0

Range:
Value Description
0 The Controller may fragment all data
1 The Controller should not fragment data
Data Length:

The number of bytes in the Advertising Data parameter :Size: 1 byte(s) :Range: 0 to 251

Advertising Data:
 

Data that will be set while Advertising :Size: N/A

Events Generated

When this command has completed, an HCI_EXT_LESetExtendedScanResponseDataDone event shall be generated.

HCI Extension Events

The HCI Extension vendor specific commands generate the following vendor specific events.

HCI_EXT_SetRxGainDone

Opcode:0x0400
Event Description:
 This event is sent to indicate the RF receiver gain has been set, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_SetTxPowerDone

Opcode:0x0401
Event Description:
 This event is sent to indicate the RF transmitter power has been set, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_OnePacketPerEventDone

Opcode:0x0402
Event Description:
 This event is sent to indicate the One Packet Per Event feature has been enabled or disabled, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_DecryptCommandDone

Opcode:0x0405
Event Description:
 This event is sent to indicate Decryption has completed.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table
Decrypted Data:

128 bit decrypted data block. The most significant octet of plainTextData corresponds to plainTextData using the notation specified in FIPS 197.

Size:16 byte(s)
Range:Any 16 byte value

HCI_EXT_WriteLocalFeatureSupportDone

Opcode:0x0406
Event Description:
 This event is sent to indicate the Set Local Supported Features command has completed.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_SetFastTxResponseTimeDone

Opcode:0x0407
Event Description:
 This event is sent to indicate the Set Fast Transmit Response Time feature has been enabled or disabled, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_SetBDADDRDone

Opcode:0x040C
Event Description:
 This event is sent to indicate the devices BLE address has been set, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_SetSCADone

Opcode:0x040D
Event Description:
 This event is sent to indicate the devices SCA has been set, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_DisconnectImmedDone

Opcode:0x0413
Event Description:
 This event is sent to indicate the Disconnect Immediate command has completed, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_PER

Opcode:0x0414
Event Description:
 This event is sent to indicate the Packet Error Rate Reset or Read command has completed, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table
PER Command Type:
 

Read or Reset

Size:

1 byte(s)

Range:
Value Description
0 Reset PER Counters
1 Read PER Counters
RX Pkts:

Number of received packets.

Condition:( cmdVal!=0x00 && cmdStat==0x00)
Size:2 byte(s)
Range:Any 2 byte value
RX CRC Fails:

Number of received packets with CRC error.

Condition:( cmdVal!=0x00 && cmdStat==0x00)
Size:2 byte(s)
Range:Any 2 byte value
Events:

Number of connection events.

Condition:( cmdVal!=0x00 && cmdStat==0x00)
Size:2 byte(s)
Range:Any 2 byte value
Missed Events:

Number of missed connection events.

Condition:( cmdVal!=0x00 && cmdStat==0x00)
Size:2 byte(s)
Range:Any 2 byte value

HCI_EXT_ResetSystemDone

Opcode:0x041D
Event Description:
 This event is sent to indicate the Reset System command has completed, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_NumComplPktsLimitDone

Opcode:0x041F
Event Description:
 This event is sent to indicate the Number Completed Packets Limit command has completed, or that there was an error.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_GetConnInfoDone

Opcode:0x0420
Event Description:
 This event is sent to indicate the Get Connection Information command has completed.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table
Alloc Conns:

Total number of allocated connections

Size:1 byte(s)
Range:
Active Conns:

Number of currently active connections

Size:1 byte(s)
Range:

An array of size “numConn” will be returned containing the parameters starting here:

Conn Handle:

Connection Handle

Size:1 byte(s)
Range:
Conn Role:
Size:

1 byte(s)

Range:
Value Description
0x22 LMP/LL Response Timeout
0x23 LMP Error Transaction Collision
0x24 LMP PDU Not Allowed
0x25 Encryption Mode Not Acceptable
0x26 Link Key Can Not be Changed
0x27 Requested QoS Not Supported
0x28 Instant Passed
0x29 Pairing With Unit Key Not Supported
0x2A Different Transaction Collision
0x2B Reserved
0x2C QoS Unacceptable Parameter
0x2D QoS Rejected
0x2E Channel Assessment Not Supported
0x2F Insufficient Security
0x30 Parameter Out Of Mandatory Range
0x31 Reserved
0x32 Role Switch Pending
0x33 Reserved
0x34 Reserved Slot Violation
0x35 Role Switch Failed
0x36 Extended Inquiry Response Too Large
0x37 Simple Pairing Not Supported By Host
0x38 Host Busy ^ Pairing
0x39 Connection Rejected Due To No Suitable Channel Found
0x3A Controller Busy
0x3B Unacceptable Connection Interval
0x3C Directed Advertising Timeout
0x3D Connection Terminated Due To MIC Failure
0x3E Connection Failed To Be Established
0x3F MAC Connection Failed
0x40 Coarse Clock Adjust Rejected
0x41 Type0 Submap Not Defined
0x42 Unknown Advertising Identifier
0x43 Limit Reached
0x44 Operation Cancelled by Host
Peer Addr:
Size:6 byte(s)
Range:
Peer Addr Type:
Size:

1 byte(s)

Range:
Value Description
0x00 Public
0x01 Random
0x02 Public Identity
0x03 Random Identity

The array of parameters ends here.

HCI_EXT_SetMaxDataLengthDone

Opcode:0x0421
Event Description:
 This event is sent to indicate the Set Max Data Length command has completed.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table

HCI_EXT_LLTestModeDone

Opcode:0x0470
Event Description:
 LL Test Mode event.

Event Parameters

Status:
Size:1 byte(s)
Range:See Status Table
Command Opcode:
Size:2 byte(s)
Range:See Command Table