TI BLE Vendor Specific HCI Guide
TI BLE Vendor Specific HCI Guide
TI BLE Vendor Specific HCI Guide
TABLE OF CONTENTS
1.
PURPOSE ....................................................................................................................................... 7
2.
3.
4.
5.
REFERENCES................................................................................................................................ 9
6.
7.
8.
9.
10.
10.1
10.2
10.3
10.4
10.5
10.6
10.7
10.8
10.9
10.10
10.11
10.12
10.13
10.14
10.15
10.16
10.17
10.18
10.19
10.20
11.1
11.2
11.3
11.4
11.5
11.6
11.7
11.8
11.9
11.10
11.11
11.12
11.13
11.14
11.15
11.16
11.17
11.18
11.19
11.20
11.21
11.22
11.23
11.24
11.25
11.26
12.
12.1
12.2
12.3
12.4
12.5
12.6
12.7
12.8
12.9
12.10
12.11
12.12
12.13
12.14
12.15
12.16
13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8
13.9
13.10
13.11
13.12
13.13
13.14
13.15
13.16
13.17
14.
14.1
14.2
14.3
14.4
15.
15.1
16.
16.1
16.2
17.
17.1
17.2
17.3
17.4
17.5
17.6
17.7
17.8
17.9
17.10
18.1
18.2
18.3
18.4
18.5
18.6
18.7
18.8
18.9
18.10
18.11
18.12
18.13
18.14
18.15
18.16
18.17
18.18
18.19
18.20
18.21
18.22
18.23
18.24
18.25
19.
19.1
20.
Page 5 of 152
Copyright 2011 Texas Instruments, Inc
TABLE OF FIGURES
Figure 1: Logical Organization of Application and BLE Stack ................................................................. 7
Figure 2: Single Device Configuration ...................................................................................................... 7
Figure 3: Dual Device Configuration ........................................................................................................ 8
Figure 4: Network Processor Configuration with HCI ............................................................................... 8
Figure 5: Command Packet .................................................................................................................... 11
Figure 6: Asynchronous Data Packet ...................................................................................................... 11
Figure 7: Event Packet............................................................................................................................ 12
Figure 8: Request/Response with Server Database in BLE Stack ............................................................. 24
Figure 9: Request/Response with Server Database not in BLE Stack ....................................................... 24
TABLE OF TABLES
Table 1: HCI Packet Types ..................................................................................................................... 10
Table 2: BLE Commands ....................................................................................................................... 14
Table 3: BLE Events .............................................................................................................................. 15
Table 4: Command Opcode Subgroups ................................................................................................... 15
Table 5: Vendor Specific Commands ...................................................................................................... 19
Table 6: Event Opcode Group................................................................................................................. 20
Table 7: Vendor Specific Events ............................................................................................................. 23
Table 8: List of Possible Host Error Codes ............................................................................................ 152
Page 6 of 152
Copyright 2011 Texas Instruments, Inc
1. Purpose
The purpose of this document is to describe the Texas Instruments Inc. (TI) vendor specific
Host Controller Interface (HCI) for Bluetooth low energy (BLE). This document is intended for
customer product software engineers and field application engineers working with the TI BLE
stack software.
2. 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 (please see Figure 1).
Application
BLE Profiles/Protocols
BLE Host
BLE L2CAP
HCI
LL
BLE Controller
PHY
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 (see section 7 for more detail). 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 (please see Figure 2).
Page 7 of 152
Copyright 2011 Texas Instruments, Inc
However, allowing an application to be developed on one device while communicating with the
BLE stack executing on another allows access to the BLE stack that would not normally be
available (please see Figure 4).
Page 8 of 152
Copyright 2011 Texas Instruments, Inc
Definition
ATT
Attribute Protocol
BC
Broadcast
BLE
BT
Bluetooth
CMD
Command
CSG
Command Subgroup
EC
Event Code
EOEF
EOGF
ESG
Event Subgroup
GAP
GATT
HCI
IDE
L2CAP
LE
Low Energy
LL
Link Layer
OCF
OGF
OTA
PB
Packet Boundary
PER
PHY
Physical Layer
PPM
SCA
SM
Security Manager
NV
Non-Volatile
5. References
[1] Specification of the Bluetooth System, Core Version 4.0, June 30, 2010.
http://www.bluetooth.com/Specification%20Documents/Core_V40.zip
Page 9 of 152
Copyright 2011 Texas Instruments, Inc
6. Revision History
Date (YMD)
Document
version
Description of changes
2010-09-30
V1.0
Initial
2011-07-13
V1.1
2011-12-02
V1.1b
2012-03-16
V1.2.1
2012-05-18
V1.2.2
2012-??-??
V1.3
7. 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].
8. Specification Interface
8.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
Asynchronous Data
Synchronous Data
Event
Page 10 of 152
Copyright 2011 Texas Instruments, Inc
Page 11 of 152
Copyright 2011 Texas Instruments, Inc
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:
Informational Parameters:
Status Parameters:
Testing Commands:
LE Only Commands:
63
The following table lists all specification BLE commands and their opcodes. Note that while all
commands can be used in a Network Processor Configuration with HCI, not all events will be
returned as they will be trapped and possibly discarded by the BLE Stack.
Page 12 of 152
Copyright 2011 Texas Instruments, Inc
Commands
LE Commands
OGF
OCF
Opcode
0x2001
0x2002
0x2003
0x2005
0x2006
0x2007
0x2008
0x2009
10
0x200A
11
0x200B
12
0x200C
LE Create Connection
13
0x200D
14
0x200E
15
0x200F
16
0x2010
17
0x2011
18
0x2012
LE Connection Update
19
0x2013
20
0x2014
21
0x2015
22
0x2016
LE Encrypt
23
0x2017
LE Rand
24
0x2018
LE Start Encryption
25
0x2019
26
0x201A
27
0x201B
28
0x201C
LE Receiver Test
29
0x201D
30
0x201E
31
0x201F
Page 13 of 152
Copyright 2011 Texas Instruments, Inc
Commands
BT Commands for LE
OGF
OCF
Opcode
Disconnect
0x0406
29
0x041D
0x0C01
Reset
0x0C03
45
0x0C2D
49
0x0C31
51
0x0C33
53
0x0C35
0x1001
0x1002
0x1003
Read BD_ADDR
0x1009
Read RSSI
0x1405
Events
LE Events
Event Code
Subevent Code
LE Connection Complete
0x3E
0x01
LE Advertising Report
0x3E
0x02
0x3E
0x03
0x3E
0x04
0x3E
0x05
BT Events
Event Code
Disconnection Complete
0x05
Encryption Change
0x08
Page 14 of 152
Copyright 2011 Texas Instruments, Inc
0x0C
Command Complete
0x0E
Command Status
0x0F
0x10
0x13
0x1A
0x30
Table 3: BLE Events
10 9
111111b
7 6
CSG (=0..6)
0
Command
CSG
Subgroup
HCI
L2CAP
ATT
GATT
GAP
UTIL
Reserved
User Profile
Page 15 of 152
Copyright 2011 Texas Instruments, Inc
OGF
CSG
CMD
Opcode
63
0xFC00
63
0xFC01
63
0xFC02
63
0xFC03
63
0xFC04
63
0xFC05
63
0xFC06
63
0xFC07
63
0xFC08
63
0xFC09
63
10
0xFC0A
63
11
0xFC0B
63
12
0xFC0C
63
13
0xFC0D
63
14
0xFC0E
63
15
0xFC0F
63
16
0xFC10
Not supported by HCI; only direct function call is allowed. No event is returned.
Page 16 of 152
Copyright 2011 Texas Instruments, Inc
OGF
CSG
CMD
Opcode
63
17
0xFC11
63
18
0xFC12
63
19
0xFC13
63
20
0xFC14
63
21
0xFC15
63
22
0xFC16
63
23
0xFC17
63
24
0xFC18
63
25
0xFC19
63
18
0xFC92
63
0xFD01
63
0xFD02
63
0xFD03
63
0xFD04
63
0xFD05
63
0xFD06
63
0xFD07
63
0xFD08
63
0xFD09
63
10
0xFD0A
63
11
0xFD0B
63
12
0xFD0C
63
13
0xFD0D
63
14
0xFD0E
63
15
0xFD0F
63
16
0xFD10
63
17
0xFD11
63
18
0xFD12
63
19
0xFD13
63
22
0xFD16
Not supported by HCI; only direct function call is allowed. No event is returned.
Page 17 of 152
Copyright 2011 Texas Instruments, Inc
OGF
CSG
CMD
Opcode
63
23
0xFD17
63
24
0xFD18
63
25
0xFD19
63
27
0xFD1B
63
29
0xFD1D
63
30
0xFD1E
63
0xFD88
63
22
0xFD96
63
0xFE00
63
0xFE03
63
0xFE04
63
0xFE05
63
0xFE06
63
0xFE07
63
0xFE08
63
0xFE09
63
10
0xFE0A
GAP Authenticate
63
11
0xFE0B
63
12
0xFE0C
63
13
0xFE0D
GAP Signable
63
14
0xFE0E
GAP Bond
63
15
0xFE0F
63
16
0xFE10
63
17
0xFE11
63
48
0xFE30
63
49
0xFE31
63
50
0xFE32
63
51
0xFE33
63
52
0xFE34
63
53
0xFE35
63
54
0xFE36
63
55
0xFE37
Page 18 of 152
Copyright 2011 Texas Instruments, Inc
OGF
CSG
CMD
Opcode
UTIL Reset
63
0xFE80
UTIL NV Read
63
0xFE81
UTIL NV Write
63
0xFE82
Reserved
63
0xFF00
User Profiles
63
0xFF80
Page 19 of 152
Copyright 2011 Texas Instruments, Inc
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).
The EOEF is again chosen to mirror the Command OCF by dividing it into two parts: the Event
Subgroup (ESG) and the Event.
EOGF
Group
Embedded Opcode
Core Opcode
Profile Request
Profile Response
4 .. 63
Reserved
Page 20 of 152
Copyright 2011 Texas Instruments, Inc
EC
EOGF ESG
Event
Opcode
0xFF
0x0400
0xFF
0x0401
0xFF
0x0402
0xFF
0x0403
0xFF
0x0404
0xFF
0x0405
0xFF
0x0406
0xFF
0x0407
0xFF
0x0408
0xFF
0x0409
0xFF
10
0x040A
0xFF
11
0x040B
0xFF
12
0x040C
0xFF
13
0x040D
0xFF
14
0x040E
0xFF
15
0x040F
0xFF
16
0x0410
0xFF
17
0x0411
0xFF
18
0x0412
0xFF
19
0x0413
0xFF
20
0x0414
0xFF
21
0x0415
0xFF
22
0x0416
0xFF
23
0x0417
0xFF
24
0x0418
0xFF
25
0x0419
0xFF
0x0481
0xFF
19
0x0493
0xFF
0x0501
L2CAP
Connection
Response
ATT Error Response
Parameter
Update
Not supported by HCI; only direct function call is allowed. No event is returned.
Page 21 of 152
Copyright 2011 Texas Instruments, Inc
EC
EOGF ESG
Event
Opcode
0xFF
0x0502
0xFF
0x0503
0xFF
0x0504
0xFF
0x0505
0xFF
0x0506
0xFF
0x0507
0xFF
0x0508
0xFF
0x0509
0xFF
10
0x050A
0xFF
11
0x050B
0xFF
12
0x050C
0xFF
13
0x050D
0xFF
14
0x050E
0xFF
15
0x050F
0xFF
16
0x0510
0xFF
17
0x0511
0xFF
18
0x0512
0xFF
19
0x0513
0xFF
22
0x0516
0xFF
23
0x0517
0xFF
24
0x0518
0xFF
25
0x0519
0xFF
27
0x051B
0xFF
29
0x051D
0xFF
30
0x051E
0xFF
0x0600
0xFF
0x0601
0xFF
0x0602
0xFF
0x0603
0xFF
0x0604
0xFF
0x0605
0xFF
0x0606
Page 22 of 152
Copyright 2011 Texas Instruments, Inc
EC
EOGF ESG
Event
Opcode
0xFF
0x0607
0xFF
0x0608
0xFF
0x0609
0xFF
10
0x060A
0xFF
11
0x060B
0xFF
12
0x060C
0xFF
13
0x060D
0xFF
14
0x060E
0xFF
15
0x060F
Command Status
0xFF
127
0x067F
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 travelling 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.
Page 23 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetRxGainCmd
0xFC00
rxGain
Status
Description
This command is used to set the RF receiver gain. The default system value for this feature is
standard receiver gain.
Command Parameters
rxGain: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_RX_GAIN_STD
0x01
HCI_EXT_RX_GAIN_HIGH
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetRxGainCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetTxPowerCmd
0xFC01
txPower
Status
Description
This command is used to set the RF transmitter output power. The default system value for this feature
is 0 dBm. Note that a setting of 4dBm is only allowed for the CC2540.
Command Parameters
txPower: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_TX_POWER_MINUS_23_DBM
0x01
HCI_EXT_TX_POWER_MINUS_6_DBM
Page 25 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x02
HCI_EXT_TX_POWER_0_DBM
0x03
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetTxPowerCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_OnePacketPerEventCm
d
0xFC02
control
Status
Description
This command is used to configure the Link Layer to only allow one packet per connection event. The
default system value for this feature is disabled.
This command can be used to tradeoff 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.
Command Parameters
control: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_DISABLE_ONE_PKT_PER_EVT
0x01
HCI_EXT_ENABLE_ONE_PKT_PER_EVT
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_OnePacketPerEventCmd has completed, a vendor specific Command Complete
event shall be generated.
Page 26 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
HCI_EXT_ClkDivOnHaltCmd
0xFC03
control
Status
Description
This command is used to configure the Link Layer to divide the system clock when the MCU is halted
during a radio operation. The default system value for this feature is disabled.
Note: This command is only valid when the MCU is halted during RF operation (please see
HCI_EXT_HaltDuringRfCmd).
Command Parameters
control: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT
0x01
HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_ClkDivOnHaltCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_DeclareNvUsageCmd
0xFC04
mode
Status
Description
This command is used to inform the Controller whether the Host is using NV memory during BLE
operations. The default system value for this feature is NV In Use.
When the NV is not in use during BLE operations, the Controller is able to bypass internal checks that
reduce overhead processing, thereby reducing average power consumption.
Note: This command is only allowed when the BLE Controller is idle.
Note: Using NV when declaring it is not in use may result in a hung BLE Connection.
Page 27 of 152
Copyright 2011 Texas Instruments, Inc
Command Parameters
control: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_NV_NOT_IN_USE
0x01
HCI_EXT_NV_IN_USE
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_DeclareNvUsageCmd has completed, a vendor specific Command Complete
event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_DecryptCmd
0xFC05
key, encText
Status
Description
This command is used to decrypt encrypted text using AES128.
Command Parameters
key: (16 bytes)
Value
Parameter Description
0xXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
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.
Parameter Description
0xXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
Return Parameters
Status: (1 byte)
Value
Parameter Description
Page 28 of 152
Copyright 2011 Texas Instruments, Inc
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_DecryptCmd has completed, a vendor specific Command Complete event shall
be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetLocalSupportedFeaturesCm
d
0xFC06
localFeatures
Status
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.
Command Parameters
localFeatures: (8 bytes)
Value
Parameter Description
0x0000000000000001
Encryption Feature
0xFFFFFFFFFFFFFFF
E
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetLocalSupportedFeaturesCmd has completed, a vendor specific Command
Complete event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetFastTxResponseTimeCmd
0xFC07
control
Status
Description
Page 29 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_EXT_DISABLE_FAST_TX_RESP_TIME
0x01
HCI_EXT_ENABLE_FAST_TX_RESP_TIME
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetFastTxResponseTimeCmd has completed, a vendor specific Command
Complete event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_ModemTestTxCmd
0xFC08
cwMode, txFreq
Status
Description
This API is used to 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 the
HCI_EXT_EndModemTest command to end the test.
Note: The RF channel, not the BLE frequency, is specified! You can obtain the RF channel from the
BLE frequency as follows: RF Channel = (BLE Frequency 2402) / 2.
Note: When the HCI_EXT_EndModemTest is issued to stop this test, a Controller reset will take place.
Note: The device will transmit at the default output power (0 dBm) unless changed by
HCI_EXT_SetTxPowerCmd.
Page 30 of 152
Copyright 2011 Texas Instruments, Inc
Command Parameters
cwMode: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_TX_MODULATED_CARRIER
0x01
HCI_EXT_TX_UNMODULATED_CARRIER
t
txFreq: (1 bytes)
Value
Parameter Description
0..39
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_ModemTestTxCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
HCI_EXT_ModemHopTestTxCmd
0xFC09
Command Parameters
Return Parameters
Status
Description
This API is used to 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 the
HCI_EXT_EndModemTest command to end the test.
Note: When the HCI_EXT_EndModemTest is issued to stop this test, a Controller reset will take place.
Note: The device will transmit at the default output power (0 dBm) unless changed by
HCI_EXT_SetTxPowerCmd.
Note: This modem test can be used to satisfy in part radio regulation requirements as specific in
standards such as ARIB STD-T66.
Command Parameters:
Page 31 of 152
Copyright 2011 Texas Instruments, Inc
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_ModemHopTestTxCmd has completed, a vendor specific Command Complete
event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_ModemTestRxCmd
0xFC0A
rxFreq
Status
Description
This API is used to 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: The RF channel, not the BLE frequency, is specified! You can obtain the RF channel from the
BLE frequency as follows: RF Channel = (BLE Frequency 2402) / 2.
Note: When the HCI_EXT_EndModemTest is issued to stop this test, a Controller reset will take place.
Note: This modem test can be used to satisfy in part radio regulation requirements as specific in
standards such as ARIB STD-T66.
Command Parameters
rxFreq: (1 bytes)
Value
Parameter Description
0..39
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_ModemTestRxCmd has completed, a vendor specific Command Complete event
shall be generated.
Page 32 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
HCI_EXT_EndModemTestCmd
0xFC0B
Command Parameters
Return Parameters
Status
Description
This API is used to shutdown a modem test. A Controller reset will take place.
Command Parameters
None
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_EndModemTestCmd has completed, a vendor specific Command Complete
event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetBDADDRCmd
0xFC0C
bdAddr
Status
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.
Command Parameters
bdAddr: (6 bytes)
Value
Parameter Description
0x000000000000..
0xFFFFFFFFFFFE
0xFFFFFFFFFFFF
Page 33 of 152
Copyright 2011 Texas Instruments, Inc
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetBDADDRCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetSCACmd
0xFC0D
scaInPPM
Status
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
scaInPPM: (2 bytes)
Value
Parameter Description
0..0x1F4
0x01F5..0xFFFF
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetSCACmd has completed, a vendor specific Command Complete event shall
be generated.
Page 34 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
HCI_EXT_EnablePTMCmd
0xFC0E
Command Parameters
Return Parameters
Status
Description
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.
Note: This command is only allowed as a direct function call, and is only intended to be used by an
embedded application. No vendor specific Command Complete event will be generated.
Command Parameters
None
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
Event(s) Generated
When the HCI_EXT_EnablePTMCmd has completed, it will simply return. No vendor specific
Command Complete event will be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetFreqTuneCmd
0xFC0F
step
Status
Description
This PTM-only command is used to set this devices Frequency Tuning either up one step or down one
step. 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.
Page 35 of 152
Copyright 2011 Texas Instruments, Inc
Command Parameters
mode: (1 bytes)
Value
Parameter Description
HCI_PTM_SET_FREQ_TUNE_DOWN
HCI_PTM_SET_FREQ_TUNE_UP
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetFreqTuneCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
HCI_EXT_SaveFreqTuneCmd
0xFC10
Command Parameters
Return Parameters
Status
Description
This PTM-only command is used to save this devices Frequency Tuning setting in non-volatile
memory. This setting will be used by the BLE Controller upon reset, and when waking from Sleep.
Command Parameters
None
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SaveFreqTuneCmd has completed, a vendor specific Command Complete
event shall be generated.
Page 36 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
HCI_EXT_SetMaxDtmTxPowerCmd
0xFC11
txPower
Status
Description
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).
This command will change the value used by DTM.
Note: When DTM is ended by a call to HCI_LE_TestEndCmd, or a HCI_Reset is used, the transmitter
output power setting is restored to the default value of 0 dBm.
Command Parameters
txPower: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_TX_POWER_MINUS_23_DBM
0x01
HCI_EXT_TX_POWER_MINUS_6_DBM
0x02
HCI_EXT_TX_POWER_0_DBM
0x03
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_SetMaxDtmTxPowerCmd has completed, a vendor specific Command Complete
event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_MapPmInOutPortCmd
0xFC12
ioPort, ioPin
Status
Description
This command 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
Page 37 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_EXT_PM_IO_PORT_P0
0x01
HCI_EXT_PM_IO_PORT_P1
0x02
HCI_EXT_PM_IO_PORT_P2
0xFF
HCI_EXT_PM_IO_PORT_NONE
ioPin: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_PM_IO_PORT_PIN0
0x01
HCI_EXT_PM_IO_PORT_PIN1
0x02
HCI_EXT_PM_IO_PORT_PIN2
0x03
HCI_EXT_PM_IO_PORT_PIN3
0x04
HCI_EXT_PM_IO_PORT_PIN4
0x05
HCI_EXT_PM_IO_PORT_PIN5
0x06
HCI_EXT_PM_IO_PORT_PIN6
0x07
HCI_EXT_PM_IO_PORT_PIN7
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_MapPmIoPortCmd has completed, a vendor specific Command Complete event
shall be generated.
Page 38 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
HCI_EXT_DisconnectImmedCmd
0xFC13
connHandle
Status
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
connHandle: (2 bytes)
Value
Parameter Description
Connection Handle to be used to identify a connection.
Note: 0x0F00 0x0FFF are reserved for future use.
0x0000 .. 0x0EFF
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_DisconnectImmedCmd has completed, an HCI Disconnection Complete event
followed by a vendor specific Command Complete event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_PacketErrorRateCmd
0xFC14
connHandle, command
Status
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.
Command Parameters
connHandle: (2 bytes)
Value
Parameter Description
Page 39 of 152
Copyright 2011 Texas Instruments, Inc
Value
0x0000 .. 0x0EFF
Parameter Description
Connection Handle to be used to identify a connection.
Note: 0x0F00 0x0FFF are reserved for future use.
command: (1 byte)
Value
Parameter Description
0x00
HCI_EXT_PER_RESET
0x01
HCI_EXT_PER_READ
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_PacketErrorRateCmd has completed, a vendor specific Command Complete
event followed by a vendor specific Command Complete event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_PERbyChanCmd
0xFC15
connHandle, *perByChan
Status
Description
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, based on the following type definition perByChan_t located in ll.h:
#define LL_MAX_NUM_DATA_CHAN 37
Page 40 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
Connection Handle to be used to identify a connection.
Note: 0x0F00 0x0FFF are reserved for future use.
*perByChan: (1 byte)
Value
Parameter Description
NULL
Non-NULL
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_PERbyChanCmd has completed, a vendor specific Command Complete event
shall be generated.
Opcode
HCI_EXT_ExtendRfRangeCmd
0xFC16
Command Parameters
Return Parameters
Status
Description
This command is used to configure the CC254x to automatically control the TI CC2590 2.4GHz RF
Front End device. Using the CC2590 allows a maximum Tx output power of 10dBm (the specified BLE
maximum), and increases Rx sensitivity, thus extending the RF range of the CC254x. Once this
command is used, the configuration will not change unless the CC254x is reset.
Automatic control of the CC2590 is achieved using the CC254x Observables, which take control of
GPIO P1.2 and P1.3. The GPIO P1.1 is also taken to control RF gain. These GPIOs are therefore not
available when using this feature.
Page 41 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_ExtendRfRangeCmd has completed, a vendor specific Command Complete
event shall be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_AdvEventNoticeCmd
0xFC17
taskID, taskEvent
Status
Description
This command is used to configure the CC254x to set a user tasks event when an Advertisement
event completes. Only a single task event value is allowed (i.e. must be a power of two). A non-zero
taskEvent value is taken to be "enable", while a zero valued taskEvent is taken to be "disable". The
default value is disable.
Note: This command is only allowed as a direct function call, and is only intended to be used by an
embedded application. No vendor specific Command Complete event will be generated.
Command Parameters
taskID: (1 byte)
Value
0x00..0xFF
Parameter Description
OSAL task ID.
taskEvent: (2 bytes)
Value
0
14
2 ..2
Parameter Description
15
OSAL task event. Note that 2 is a reserved system task
event.
Page 42 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
Event(s) Generated
When the HCI_EXT_AdvEventNoticeCmd has completed, it will simply return. No vendor specific
Command Complete event will be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_ConnEventNoticeCmd
0xFC18
taskID, taskEvent
Status
Description
This command is used to configure the CC254x to set a user tasks event when a Connection event
completes. Only a single task event value is allowed (i.e. must be a power of two). A non-zero
taskEvent value is taken to be "enable", while a zero valued taskEvent is taken to be "disable". The
default value is disable.
Note: Only a Slave connection is supported.
Note: This command is only allowed as a direct function call, and is only intended to be used by an
embedded application. No vendor specific Command Complete event will be generated.
Command Parameters
taskID: (1 byte)
Value
0x00..0xFF
Parameter Description
OSAL task ID.
taskEvent: (2 bytes)
Value
0
14
2 ..2
Parameter Description
15
OSAL task event. Note that 2 is a reserved system task
event.
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x02
HCI_ERROR_CODE_UNKNOWN_CONN_ID
Page 43 of 152
Copyright 2011 Texas Instruments, Inc
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
Event(s) Generated
When the HCI_EXT_ConnEventNoticeCmd has completed, it will simply return. No vendor specific
Command Complete event will be generated.
Opcode
Command Parameters
Return Parameters
HCI_EXT_HaltDuringRfCmd
0xFC19
mode
Status
Description
This command is used to enable or disable the halting of the MCU while the radio is operating. When
the MCU is not halted, the peak current is higher, but the system is more responsive. When the MCU is
halted, the peak current consumption is reduced, but the system is less responsive. The default value
is Enable.
Note: This command will be disallowed if there are any active BLE connections.
Note: The HCI_EXT_ClkDivOnHaltCmd will be disallowed if the halt during RF is not enabled.
Command Parameters
mode: (1 byte)
Value
0x00
Parameter Description
HCI_EXT_HALT_DURING_RF_DISABLE
0x01
HCI_EXT_HALT_DURING_RF_ENABLE
Return Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Event(s) Generated
When the HCI_EXT_HaltDuringRfCmd has completed, a vendor specific Command Complete event
shall be generated.
Page 44 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0400
Status, cmdOpcode
Description
This event is sent to indicate the RF receiver gain has been set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC00
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0401
Status, cmdOpcode
Description
This event is sent to indicate the RF transmitter power has been set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC01
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0402
Status, cmdOpcode
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: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC02
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0403
Status, cmdOpcode
Description
This event is sent to indicate the Clock Divide On Halt feature has been enabled or disabled, or that
there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC03
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0404
Status, cmdOpcode
Description
This event is sent to indicate the Declare NV Usage feature has been set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC04
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0405
Description
This event is sent to indicate Decryption has completed.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC05
Page 47 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0xXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0406
Status, cmdOpcode
Description
This event is sent to indicate the Set Local Supported Features command has completed.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC06
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0407
Status, cmdOpcode
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: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Page 48 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC07
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0408
Status, cmdOpcode
Description
This event is sent to indicate the Modem Test Transmit test has started, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
0x21
HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC08
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0409
Status, cmdOpcode
Description
This event is sent to indicate the Modem Hop Test Transmit test has started, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
Page 49 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x21
HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC09
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x040A
Status, cmdOpcode
Description
This event is sent to indicate the Modem Test Receive test has started, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
0x21
HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC0A
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x040B
Status, cmdOpcode
Description
This event is sent to indicate the modem test has been shutdown, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x21
HCI_ERROR_CODE_ROLE_CHANGE_NOT_ALLOWED
Page 50 of 152
Copyright 2011 Texas Instruments, Inc
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC0B
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x040C
Status, cmdOpcode
Description
This event is sent to indicate the devices BLE address has been set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC0C
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x040D
Status, cmdOpcode
Description
This event is sent to indicate the devices SCA has been set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
Page 51 of 152
Copyright 2011 Texas Instruments, Inc
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC0D
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x040F
Status, cmdOpcode
Description
This event is sent to indicate the devices frequency tuning value has be adjusted one step up or down,
or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC0F
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0410
Status, cmdOpcode
Description
Page 52 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC10
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0411
Status, cmdOpcode
Description
This event is sent to indicate the maximum Direct Test Mode (DTM) RF transmitter power has been
set, or that there was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC11
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0412
Status, cmdOpcode
Description
This event is sent to indicate the PM IO Port has been configured and mapped, or that there was an
error.
Page 53 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC12
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0413
Status, cmdOpcode
Description
This event is sent to indicate the Disconnect Immediate command has completed, or that there was an
error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x02
HCI_ERROR_CODE_UNKNOWN_CONN_ID
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC13
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0414
Page 54 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
HCI_SUCCESS
0x02
HCI_ERROR_CODE_UNKNOWN_CONN_ID
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC14
cmdVal: (2 bytes)
Value
Parameter Description
0x00
HCI_EXT_PER_RESET
0x01
HCI_EXT_PER_READ
Note: The following event parameters are for the Read command only.
numPkts: (2 bytes)
Value
Parameter Description
0x0000 .. 0xFFFF
numCrcErr: (2 bytes)
Value
Parameter Description
0x0000 .. 0xFFFF
numEvents: (2 bytes)
Value
Parameter Description
0x0000 .. 0xFFFF
numMissedEvents: (2 bytes)
Page 55 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x0000 .. 0xFFFF
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0415
Status, cmdOpcode
Description
This event is sent to indicate the Packet Error Rate By Channel command has completed, or that there
was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x02
HCI_ERROR_CODE_UNKNOWN_CONN_ID
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC15
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0416
Status, cmdOpcode
Description
This event is sent to indicate the Extend RF Range command has completed.
Event Parameters
Status: (1 byte)
Value
Parameter Description
Page 56 of 152
Copyright 2011 Texas Instruments, Inc
0x00
HCI_SUCCESS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC16
Opcode
Event Parameters
HCI_Vendor_Specific_Event
0x0419
Status, cmdOpcode
Description
This event is sent to indicate the Halt During RF feature has been enabled or disabled, or that there
was an error.
Event Parameters
Status: (1 byte)
Value
Parameter Description
0x00
HCI_SUCCESS
0x0C
HCI_ERROR_CODE_CMD_DISALLOWED
0x12
HCI_ERROR_CODE_INVALID_HCI_CMD_PARAMS
cmdOpcode: (2 bytes)
Value
Parameter Description
0xFC19
Page 57 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_DeviceInit
0xFE00
profileRole,
maxScanResponses, IRK,
CSRK, signCounter
Status
Description:
This command is used to setup the device in a GAP Role and should only be called once per reboot.
To enable multiple combinations setup multiple GAP Roles (profileRole parameter).
Multiple Role settings examples:
GAP_PROFILE_PERIPHERAL and GAP_PROFILE_BROADCASTER allows a connection and
advertising (non-connectable) at the same time.
GAP_PROFILE_PERIPHERAL and GAP_PROFILE_OBSERVER allows a connection (with
master) and scanning at the same time.
GAP_PROFILE_PERIPHERAL,
GAP_PROFILE_OBSERVER
and
GAP_PROFILE_BROADCASTER allows a connection (with master) and scanning or advertising at
the same time.
GAP_PROFILE_CENTRAL and GAP_PROFILE_BROADCASTER allows connections and
advertising (non-connectable) at the same time.
Command Parameters:
profileRole: Bit Mask (1 octet)
Value
Parameter Description
0x01
GAP_PROFILE_BROADCASTER
0x02
GAP_PROFILE_OBSERVER
0x04
GAP_PROFILE_PERIPHERAL
0x08
GAP_PROFILE_CENTRAL
maxScanResponses: (1 octet)
Range
Parameter Description
0 0xFF
Range
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
signCounter: (4 octets)
Range
Parameter Description
0x00000000 0xFFFFFFFF
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
INVALIDPARAMETER
Event(s) Generated:
When device initialization is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When initialization task is complete, the host will send the GAP Device Init Done
Event.
Opcode
Command Parameters
Return Parameters
GAP_ConfigDeviceAdd
r
0xFE03
addrType, Addr
Status
Description:
Send this command to set the devices address type.
selected, the address will change periodically.
If ADDRTYPE_PRIVATE_RESOLVE is
Page 59 of 152
Copyright 2011 Texas Instruments, Inc
Command Parameters:
addrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
Addr: (6 octet)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
INVALIDPARAMETER
0x10
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
If ADDRTYPE_PRIVATE_RESOLVE addrType is selected, the GAP Random
Address Changed Event will be generated when the address is automatically updated.
Opcode
Command Parameters
Return Parameters
GAP_DeviceDiscoveryReques
t
0xFE04
Status
Description:
Page 60 of 152
Copyright 2011 Texas Instruments, Inc
Command Parameters:
mode: (1 octet)
Value
Parameter Description
Non-Discoverable Scan
activeScan: (1 octet)
Value
Parameter Description
whiteList: (1 octet)
Value
Parameter Description
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x11
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. During the scan, the device will generate GAP Device Information Events for
advertising devices, then issue a GAP Device Discovery Event when the scan is completed.
Page 61 of 152
Copyright 2011 Texas Instruments, Inc
Command
Opcode
GAP_DeviceDiscoveryCance
l
0xFE05
Command Parameters
Return Parameters
Status
Description:
Send this command to end a scan for advertisement packets. This command is valid for a central or a
peripheral device.
Command Parameters:
None
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x11
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter, then issue a GAP Device Discovery Event to display the scan progress since the
start of the scan.
Opcode
Command Parameters
Return Parameters
GAP_MakeDiscoverabl
e
0xFE06
eventType, initiatorAddrType,
initiatorAddr, channelMap,
filterPolicy
Status
Description:
Send this command to start the device advertising.
Command Parameters:
Page 62 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
initiatorAddrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
initiatorAddr: (6 octet)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Parameter Description
Channel 37
Channel 38
Channel 39
37
reserved
filterPolicy: (1 octet)
Value
Parameter Description
4 0xFF
reserved
Page 63 of 152
Copyright 2011 Texas Instruments, Inc
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x10
0x11
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter, then, when the device starts advertising the GAP Make Discoverable Done Event is
generated. When advertising is completed (limited mode advertising has a time limit), the GAP End
Discoverable Event is generated.
Opcode
Command Parameters
Return Parameters
GAP_UpdateAdvertisingDat
a
0xFE07
Status
Description:
Send this command to set the raw advertising or scan response data.
Command Parameters:
adType: (1 octet)
Value
Parameter Description
SCAN_RSP data
Advertisement data
dataLen: (1 octet)
Range
Parameter Description
0 31
Value
Parameter Description
XX:XX XX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter, then, when the task is complete the GAP Advert Data Update Done Event is
generated.
Opcode
GAP_EndDiscoverabl
e
0xFE08
Command Parameters
Return Parameters
Status
Description:
Send this command to end advertising.
Command Parameters:
None
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x12
Not advertising
Event(s) Generated:
Page 65 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_EstablishLinkRequest
0xFE09
highDutyCycle, whiteList,
addrTypePeer, peerAddr
Status
Description:
Send this command to initiate a connection with a peripheral device. Only central devices can issue
this command.
Command Parameters:
highDutyCycle: (1 octet)
Value
Parameter Description
disabled
enabled
A central device may use high duty cycle scan parameters in order to achieve low latency
connection time with a peripheral device using directed link establishment.
whiteList: (1 octet)
Value
Parameter Description
addrTypePeer: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
peerAddr: (6 octet)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x10
0x12
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When the connection has been made, the GAP Link Established Event will be
generated.
Opcode
Command Parameters
Return Parameters
GAP_TerminateLinkReques
t
0xFE0A
connHandle
Status
Description:
Send this command to terminate a connection link, a connection request or all connected links.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
0xFFFE
0xFFFF
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x12
No link to terminate
Page 67 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_Authenticate
0xFE0B
connHandle, secReq.ioCaps,
secReq.oobAvailable,
secReq.oob,
secReq.authReq,
secReq.maxEncKeySize,
secReq.keyDist,
Status
pairReq.Enable,
pairReq.ioCaps,
pairReq.oobDataFlag,
pairReq.authReq,
pairReq.maxEncKeySize,
pairReq.keyDist
Description:
Send this command to initiate the pairing process (if Central device), wait for the pairing process (if
Peripheral device), or accept a pairing request (if Peripheral device).
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
Connection handle
secReq.ioCaps: (1 octet)
Value
Parameter Description
Display Only
Display Yes or No
Keyboard Only
5 0xFF
reserved
Page 68 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
secReq.maxEncKeySize: (1 octet)
Range
Parameter Description
7 16
Parameter Description
67
Reserved
pairReq.Enable: (1 octet)
Value
Parameter Description
Value
Parameter Description
The following fields should be exact same values received in the Pairing Request.
pairReq.ioCaps: (1 octet)
Value
Parameter Description
Display Only
Display Yes or No
Keyboard Only
5 0xFF
reserved
pairReq.oobDataFlag: (1 octet)
Value
Parameter Description
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
pairReq.maxEncKeySize: (1 octet)
Range
Parameter Description
7 16
Parameter Description
Bit
Parameter Description
67
Reserved
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid Parameter
0x11
0x12
0x14
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When the pairing process is complete (either SUCCESS or Failure), a GAP
Authentication Complete Event will be generated. If a passkey is needed, a GAP Passkey Needed
Event will be generated.
Opcode
Command Parameters
Return Parameters
GAP_UpdateLinkParamReq
0xFE11
connectionHandle,
intervalMin, intervalMax,
connLatency, connTimeout
Status
Description:
Send this command to change the Link Layer connection parameters of a connection. This command
can only be used when the local devices role is Master.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
Page 71 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0 0xFFFD
Connection handle
intervalMin: (2 octets)
Range
6 - 3200
intervalMax: (2 octets)
Range
Parameter Description
6 - 3200
connLatency: (2 octets)
Range
Parameter Description
0 - 499
connTimeout: (2 octets)
Range
Parameter Description
10 - 3200
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
Page 72 of 152
Copyright 2011 Texas Instruments, Inc
0x01
FAILURE
0x02
INVALIDPARAMETER
0x12
bleIncorrectMode
0x14
bleNotConnected
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When the connection parameters have been applied by the Controller, the GAP
Link Parameter Update Event will be generated.
Opcode
Command Parameters
Return Parameters
GAP_PasskeyUpdate
0xFE0C
connHandle, passkey
Status
Description:
Send this command when the GAP Passkey Needed Event is received.
passkey needed during the Pairing Process.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
passkey: (6 octets)
Value
Parameter Description
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x03
0x12
Page 73 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_SlaveSecurityReques
t
0xFE0D
connHandle, authReq
Status
Description:
Send this command, Peripheral Role only, to initiate security from a slave device. This message is
also sent, by the Peripheral, to upgrade security (Pairing) to Authenticated, make sure to ask for ManIn-The-Middle (MITM) protection in the authReq field.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
Connection handle
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x11
0x14
Event(s) Generated:
Page 74 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_Signable
0xFE0E
connHandle, authenticated,
CSRK, signCounter
Status
Description:
Send this command for a connected and bound device to enable signed data.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
Connection handle
authenticated: (1 octet)
Value
Parameter Description
CSRK is authenticated
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
signCounter: (4 octets)
Range
Parameter Description
0x00000000 0xFFFFFFFF
Return Parameters:
Status: (1 octet)
Page 75 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x00
SUCCESS
0x12
0x14
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Opcode
Command Parameters
Return Parameters
GAP_Bond
0xFE0F
connHandle, authenticated,
LTK, DIV, rand, LTKsize
Status
Description:
Send this command for a connected and bound device to load the encryption key.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
0 0xFFFD
Connection handle
authenticated: (1 octet)
Value
Parameter Description
LTK is authenticated
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
DIV: (2 octets)
Page 76 of 152
Copyright 2011 Texas Instruments, Inc
Range
Parameter Description
0 0xFFFF
rand: (8 octets)
Value
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX
LTKsize: (1 octet)
Range
Parameter Description
7 16
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x12
0x14
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When both connected devices have setup encryption, the GAP Bond Complete
Event is generated.
Opcode
Command Parameters
Return Parameters
GAP_TerminateAuth
0xFE10
connHandle, reason
Status
Description:
Send this command to terminate a pairing process.
Command Parameters:
connHandle: (2 octets)
Value
Parameter Description
Page 77 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0 0xFFFD
Connection handle
reason: (1 octet)
Value
Parameter Description
0xXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0xXX
Error code
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter. When the existing pairing had ended, the GAP Authentication Complete Event with
be generated.
Opcode
Command Parameters
Return Parameters
GAP_SetParam
0xFE30
paramID, paramValue
Status
Description:
Send this command to write a GAP Parameter.
Command Parameters:
paramID: (2 octets)
Value
Parameter Description
Value
Parameter Description
proc (mSec).
10
11
12
Scan interval used during Link Layer Initiating state, when in Connectable
mode (mSec).
13
Scan window used during Link Layer Initiating state, when in Connectable
mode (mSec).
14
Scan interval used during Link Layer Initiating state, when in Connectable
mode, high duty scan cycle scan paramaters (mSec).
15
Scan window used during Link Layer Initiating state, when in Connectable
mode, high duty scan cycle scan paramaters (mSec).
16
Scan interval used during Link Layer Scanning state, when in General
Discovery proc (mSec).
17
Scan window used during Link Layer Scanning state, when in General
Discovery proc (mSec).
18
Scan interval used during Link Layer Scanning state, when in Limited
Discovery proc (mSec).
19
Scan window used during Link Layer Scanning state, when in Limited
Discovery proc (mSec).
20
21
22
23
Scan interval used during Link Layer Initiating state, when using
Connection Establishment proc (mSec).
24
Scan window used during Link Layer Initiating state, when using
Connection Establishment proc (mSec).
25
26
Value
Parameter Description
proc (mSec)
27
28
29
30
31
32
33
34
The following parameters are use for testing only (DO NOT USE):
Value
Parameter Description
35
36
SM Test Modes:
0 Test Mode Off
1 No Response
2 Send Bad Confirm
3 Bad Confirm Verify
4 Send SMP Confirm Message
100
101
102
Page 80 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0xXXXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid paramID
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Opcode
Command Parameters
Return Parameters
GAP_GetParam
0xFE31
paramID,
Status, paramValue
Description:
Send this command to read a GAP Parameter.
Command Parameters:
paramID: (2 octets)
Value
Parameter Description
0xXXXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid paramID
paramValue: (2 octets)
Value
Parameter Description
Page 81 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0xXXXX
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status and paramValue parameters.
Opcode
Command Parameters
Return Parameters
GAP_ResolvePrivateAdd
r
0xFE32
IRK, addr
Status
Description:
Send this command to resolve a Private Resolvable Address.
Command Parameters:
IRK: (16 octets)
Value
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
addr: (6 octet)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
0x01
Event(s) Generated:
Page 82 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_SetAdvToken
0xFE33
adType, advDataLen,
advData
Status
Description:
Send this command to add an Advertisement Data Token to the advertisement data field of an
advertisement packet.
Command Parameters:
adType: (1 octet)
Value
Parameter Description
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0D
0x0E
0x0F
0x10
0x11
0x12
0x14
0x15
0x16
Service Data
0xFF
advDataLen: (1 octet)
Value
Parameter Description
0xXX
Parameter Description
XX:XXXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
0x0B
0x12
0x18
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Page 84 of 152
Copyright 2011 Texas Instruments, Inc
Command
Opcode
Command Parameters
Return Parameters
GAP_RemoveAdvToke
n
0xFE34
adType
Status
Description:
Send this command to remove an Advertisement Data Token from the advertisement data field of an
advertisement packet.
Command Parameters:
adType: (1 octet)
Value
Parameter Description
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0D
0x0E
0x0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
Service Data
Page 85 of 152
Copyright 2011 Texas Instruments, Inc
0xFF
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Opcode
GAP_UpdateAdvToke
n
0xFE35
Command Parameters
Return Parameters
Status
Description:
After adding an removing advertisement tokens, they must be updated to actual advertisements by
sending this command.
Command Parameters:
none
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Page 86 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Command Parameters
Return Parameters
GAP_BondSetParam
0xFE36
paramID, paramDataLen,
paramData
Status
Description:
Send this command to set a GAP Bond parameter.
Command Parameters:
paramID: (2 octets)
Value
Parameter Description
0x0400
0x0401
Pairing Mode Initiate wait timeout. This is the time it will wait for a Pairing
Request before sending the Slave Initiate Request. Read/Write. Size is
uint16. Default is 1000(in milliseconds).
0x0402
0x0403
0x0404
0x0405
0x0406
Page 87 of 152
Copyright 2011 Texas Instruments, Inc
The key distribution list for bonding. size is uint8. Bit Values:
Bit 0 Slave LTK and key information (default)
Bit 1 Slave IRK and ID information (default)
Bit 2 Slave CSRK
Bit 3 Master LTK and key information
Bit 4 Master IRK and ID information (default).
Bit 5 Master CSRK (default)
0x0408
0x0409
0x040A
0x040B
Test mode Pairing Fail reason when auto failing. Read/Write. size is uint8.
Default is 0x05 (SMP_PAIRING_FAILED_NOT_SUPPORTED).
0x040C
0x040D
Clears the White List adds to it each unique address stored by bonds in NV.
Read/Write. Size is uint8. Default is FALSE.
0x040E
Gets the total number of bonds stored in NV. Read Only. Size is uint8.
Default is 0 (no bonds).
paramDataLen: (1 octet)
Value
Parameter Description
0xXX
Parameter Description
XX:XXXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid paramID
0x18
Invalid paramDataLen
Page 88 of 152
Copyright 2011 Texas Instruments, Inc
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Opcode
Command Parameters
Return Parameters
GAP_BondGetParam
0xFE37
paramID
Status, paramDataLen,
paramData
Description:
Send this command to read a GAP Bond parameter.
Command Parameters:
paramID: (2 octets)
Value
Parameter Description
0xXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid paramID
0x18
Invalid paramDataLen
paramDataLen: (1 octet)
Value
Parameter Description
0xXX
Parameter Description
XX:XXXX
Page 89 of 152
Copyright 2011 Texas Instruments, Inc
Page 90 of 152
Copyright 2011 Texas Instruments, Inc
Opcode
Event Parameters
GAP_DeviceInitDone
0x0600
Description:
This event is sent to indicate that the device is done initializing.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
devAddr: (6 octets)
Value
Parameter Description
XX:XX:XX:XX:XX:XX
dataPktLen: (2 octets)
Range
Parameter Description
0x0000 0xFFFF
HC_LE_Data_Packet_Length
numDataPkts: (1 octet)
Range
Parameter Description
0x00 0xFF
HC_Total_Num_LE_Data_Packets
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
Value
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
Opcode
Event Parameters
GAP_DeviceDiscovery
0x0601
Description:
This event is sent to indicate that the scan is complete.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
numDevs: (1 octet)
Range
Parameter Description
0 0xFF
eventType: (1 octet)
Value
Parameter Description
Scan Response
addrType: (1 octet)
Value
Parameter Description
Page 92 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
addr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Opcode
Event Parameters
GAP_AdvertDataUpdateDon
e
0x0602
Status , adType
Description:
This event is sent when the device sets the advertising data because of the GAP Update Advertising
Data Command.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
adType: (1 octet)
Value
Parameter Description
SCAN_RSP data
Advertisement data
Opcode
Event Parameters
Page 93 of 152
Event
Opcode
Event Parameters
GAP_MakeDiscoverableDon
e
0x0603
Status
Description:
This event is sent when the device starts advertising.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
interval: (2 octets)
Range
Parameter Description
0xXXXX
Opcode
Event Parameters
GAP_EndDiscoverableDon
e
0x0604
Status
Description:
This event is sent when the device ends advertising.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
Page 94 of 152
Copyright 2011 Texas Instruments, Inc
Event
Opcode
Event Parameters
GAP_LinkEstablished
0x0605
Description:
This message is sent when a connection is established with another device. On a Central device, this
message is a result for a GAP Establish Link Request. On a Peripheral device, this message is
received when a central device initiated a connection.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
devAddrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
devAddr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
connHandle: (2 octets)
Range
Parameter Description
0 0xFFFD
connInterval: (2 octets)
Value
Parameter Description
N = 0xXXXX
Value
Parameter Description
Time Range: 7.5 msec to 4 seconds
connLatency: (2 octets)
Value
Parameter Description
N = 0xXXXX
connTimeout: (2 octets)
Value
Parameter Description
N = 0xXXXX
clockAccuracy: (1 octet)
Value
Parameter Description
500 ppm
250 ppm
150 ppm
100 ppm
75 ppm
50 ppm
30 ppm
20 ppm
8 0xFF
reserved
Opcode
Event Parameters
GAP_LinkTerminated
0x0606
Page 96 of 152
Copyright 2011 Texas Instruments, Inc
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
connHandle: (2 octets)
Value
Parameter Description
XX
reason: (1 octet)
Value
Parameter Description
0x08
Supervisor Timeout
0x13
Peer Requested
0x16
Host Requested
0x22
0x28
0x3B
LSTO Violation
0x3D
MIC Failure
Opcode
Event Parameters
GAP_LinkParamUpdate
0x0607
Description:
This message is sent whenever connection parameter update is completed.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
Page 97 of 152
Copyright 2011 Texas Instruments, Inc
connHandle: (2 octets)
Value
Parameter Description
XX
connInterval: (2 octets)
Value
Parameter Description
N = 0xXXXX
connLatency: (2 octets)
Value
Parameter Description
N = 0xXXXX
connTimeout: (2 octets)
Value
Parameter Description
N = 0xXXXX
Opcode
Event Parameters
GAP_RandomAddrChanged
0x0608
Description:
This message is sent whenever the devices Private Resolvable Address automatically changes.
Event Parameters:
Page 98 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x00
SUCCESS
addrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
newRandomAddr: (6 octets)
Value
Parameter Description
XX:XX:XX:XX:XX:XX
Opcode
Event Parameters
GAP_SignatureUpdated
0x0609
Description:
This message is sent whenever sign counter is updated (incremented). This message will be
generated when a new sign counter is received from a connected device or when this device
increments its own sign counter.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
addrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
Page 99 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
devAddr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
signCounter: (6 octets)
Range
Parameter Description
0 0xFFFFFFFF
Opcode
Event Parameters
GAP_AuthenticationComplet
e
0x060A
Status, connHandle,
authState,
secInfo,
secInfo.LTKsize, secInfo.LTK, secInfo.DIV,
secInfo.rand,
devSecInfo,
devSecInfo.LTKsize, devSecInfo.LTK,
devSecInfo.DIV, devSecInfo.rand,
identityInfo,
identityInfo.IRK, identityInfo.BD_ADDR,
signingInfo,
signingInfo.CSRK, signingInfo.signCounter
Description:
This event is generated whenever the pairing process is completed (pass or fail).
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x01 0xFF
Pairing failures
Parameter Description
XX
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
secInfo: (1 octet)
Value
Parameter Description
0x00
0x01
secInfo.LTKsize: (1 octet)
Range
Parameter Description
7 16
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
secInfo.DIV: (2 octets)
Range
Parameter Description
0 0xFFFF
secInfo.rand: (8 octets)
Value
Parameter Description
Page 101 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX
devSecInfo: (1 octet)
Value
Parameter Description
0x00
0x01
devSecInfo.LTKsize: (1 octet)
Range
Parameter Description
7 16
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
devSecInfo.DIV: (2 octets)
Range
Parameter Description
0 0xFFFF
devSecInfo.rand: (8 octets)
Value
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX
identityInfo: (1 octet)
Value
Parameter Description
0x00
Value
Parameter Description
0x01
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
identityInfo.BD_ADDR: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
signingInfo: (1 octet)
Value
Parameter Description
0x00
0x01
Parameter Description
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX:
XX:XX:XX:XX
signingInfo.signCounter: (2 octets)
Range
Parameter Description
0 0xFFFF
Opcode
Event Parameters
GAP_PasskeyNeeded
0x060B
Description:
This event is generated during the pairing process if a passkey is needed.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
devAddr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
connHandle: (2 octets)
Value
Parameter Description
XX
uiInput: (1 octet)
Value
Parameter Description
0x00
0x01
uiOuput: (1 octet)
Value
Parameter Description
0x00
0x01
Display a passcode
Opcode
Event Parameters
GAP_SlaveRequestedSecurit
y
0x060C
Description:
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
connHandle: (2 octets)
Value
Parameter Description
XX
devAddr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
Opcode
Event Parameters
GAP_DeviceInformation
0x060D
Description:
This message is sent during a scan and represents another devices advertisement or SCAN_RSP
packet.
Event Parameters:
Status: (1 octet)
Page 105 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x00
SUCCESS
eventType: (1 octet)
Value
Parameter Description
Scan Response
addrType: (1 octet)
Value
Parameter Description
ADDRTYPE_PUBLIC
ADDRTYPE_STATIC
ADDRTYPE_PRIVATE_NONRESOLVE
ADDRTYPE_PRIVATE_RESOLVE
addr: (6 octets)
Range
Parameter Description
XX:XX:XX:XX:XX:XX
rssi: (1 octet)
Range
Parameter Description
0x00 0xFF
dataLen: (1 octet)
Range
Parameter Description
0x00 0xFF
Parameter Description
XX:XX XX
Opcode
Event Parameters
GAP_BondComplete
0x060E
Status, connHandle
Description:
This message is sent when a bond is complete and the connection is encrypted.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x01 0xFF
error
connHandle: (2 octets)
Value
Parameter Description
XX
Opcode
Event Parameters
GAP_PairingRequested
0x060F
Description:
This message is sent when a bond is complete and the connection is encrypted.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x01 0xFF
error
connHandle: (2 octets)
Page 107 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
XX
ioCap: (1 octet)
Value
Parameter Description
Display Only
Display Yes or No
Keyboard Only
5 0xFF
reserved
oobDataFlag: (1 octet)
Value
Parameter Description
Parameter Description
Reserved
Man-In-The-Middle protection
37
Reserved
maxEncKeySize: (1 octet)
Range
Parameter Description
7 16
Parameter Description
Bit
Parameter Description
67
Reserved
Opcode
Event Parameters
CommandStatus
0x067F
Description:
The Command Status event is used to indicate that the command given by opCode parameter has
been received and is being processed. If successful, an HCI vendor specific event that corresponds to
the command will follow. Otherwise, no event will follow since the command was not started.
Event Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x01 0xFF
opCode: (2 octets)
Value
Parameter Description
XX
dataLen: (1 octet)
Value
Parameter Description
XX
Length of payload
Parameter Description
XX:XXXX
Command payload
Opcode
Command Parameters
Return Parameters
UTIL_Reset
0xFE80
resetType
Status
Description:
Send this command to set reset the device.
Command Parameters:
resetType: (1 octet)
Value
Parameter Description
Hard reset
Soft reset
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
Invalid resetType
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter and reset the device in 100 milliseconds.
Opcode
Command Parameters
Return Parameters
UTIL_NVRead
0xFE81
nvID, nvDataLen
Status, nvData
Description:
Send this command to read an NV parameter.
Command Parameters:
Page 110 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x02
0x03
0x04
0x20 0x5F
// Master's address
device IRK - defined as "uint8 [KEYLEN]" and uses deviceIRK for an NV ID offset
device CSRK - defined as "uint8 [KEYLEN]" and uses deviceCSRK for an NV ID offset
device Sign Counter - defined as a uint32 and uses deviceSignCounter for an NV ID
offset
When the device is initialized for the first time, all (GAP_BONDINGS_MAX) NV items are
created and initialized to all 0xFF's. A bonding record of all 0xFF's indicates that the bonding
record is empty and free to use.
Example calculation for each bonding records NV IDs, bondIdx represents the bond record (0-9):
mainRecordNvID = ((bondIdx * MAX_OFFSETS) + NVID_GB_START)
localLTKNvID = (((bondIdx * MAX_OFFSETS) + localLTK) + NVID_GB_START)
devlLTKNvID = (((bondIdx * MAX_OFFSETS) + devlLTK) + NVID_GB_START)
devIRKNvID = (((bondIdx * MAX_OFFSETS) + devIRK) + NVID_GB_START)
devCSRKNvID = (((bondIdx * MAX_OFFSETS) + devCSRK) + NVID_GB_START)
devSignCounterNvID = (((bondIdx * MAX_OFFSETS) + devSignCounter) +
NVID_GB_START)
nvDataLen: (1 octet)
Value
Parameter Description
0xXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0xXX
failure
Parameter Description
XX:XXXX
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status and nvData parameters.
Opcode
Command Parameters
Return Parameters
Page 112 of 152
Command
Opcode
Command Parameters
Return Parameters
UTIL_NVWrite
0xFE82
Status
Description:
Send this command to write an NV parameter.
Command Parameters:
nvID: (1 octet)
Value
Parameter Description
0xXX
nvDataLen: (1 octet)
Value
Parameter Description
0xXX
Parameter Description
XX:XXXX
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0xXX
failure
Event(s) Generated:
When this command is received, the host will send the HCI Ext Command Status Event with the
Status parameter.
Opcode
Command Parameters
Return Parameters
UTIL_ForceBoot
0xFE83
None
Status
Command Parameters:
None
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x02
INVALIDPARAMETER
Event(s) Generated:
When this command is received, the device resets if the boot loader is present. Otherwise, the host will
send the HCI Ext Command Status Event with the Status parameter set to 0x02.
Name
Size (octets)
Description
Opcode
connectionHandle
Command PDU
Variable
Command parameters
Note: The connection handle of 0xFFFE is considered as the loopback connection. All message sent to
this connection will be loop backed to the local host.
For the command parameters, please see the corresponding section below.
Command Parameters:
intervalMin: (2 octets)
Range
6 - 3200
intervalMax: (2 octets)
Range
Parameter Description
6 - 3200
slaveLatency: (2 octets)
Range
Parameter Description
Page 115 of 152
Copyright 2011 Texas Instruments, Inc
Range
Parameter Description
0 - 500
timeoutMultiplier: (2 octets)
Range
Parameter Description
10 - 3200
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x01
FAILURE
0x02
INVALIDPARAMETER
0x04
MSG_BUFFER_NOT_AVAIL
0x13
bleMemAllocError
0x14
bleNotConnected
0x15
bleNoResources
Event(s) Generated:
When this request is received, the LE slave host will send the Command Status Event with the Status
parameter after forwarding the request to the LE master host. The LE master host will send the
Connection Parameter Update Response (L2CAP_ConnParamUpdateRsp) event back.
If the LE slave host receives this request, it will respond with a Command Reject (L2CAP_CmdReject)
with reason 0x0000 (command not understood).
Name
Size (octets)
Description
Opcode
status
Event status
connectionHandle
Event PDU
Variable
Event parameters
Event Status:
Value
Parameter Description
0x00
SUCCESS
0x14
bleNotConnected
0x17
bleTimeout
For the event parameters, please see the corresponding section below.
Event Parameters:
reason: (2 octets)
Value
Parameter Description
0x0000
0x0001
0x0002
Event Parameters:
Page 117 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
0x0000
0x0001
Name
Size (octets)
Description
Opcode
connectionHandle
Command PDU
Variable
Command parameters
Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent
to this connection will be loop backed to the local host.
For the command parameters, please see the corresponding section below.
Event(s) Generated:
When an ATT command is received, the host will send the Command Status Event with the Status
parameter.
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
INVALIDPARAMETER
0x04
MSG_BUFFER_NOT_AVAIL
0x13
bleMemAllocError
0x14
bleNotConnected
0x16
blePending
0x19
bleLinkEncrypted
0x40
bleInvalidPDU
0x41
bleInsufficientAuthen
0x42
bleInsufficientEncrypt
0x43
bleInsufficientKeySize
Name
Size (octets)
Description
Opcode
status
Event status
connectionHandle
pduLen
Event PDU
Variable
Event parameters
Event Status:
Value
Parameter Description
0x00
SUCCESS
0x14
bleNotConnected
0x17
bleTimeout
0x1A
bleProcedureComplete
For the event parameters, please see the corresponding section below.
Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent
to this connection will be loop backed to the local host.
Response Parameters:
reqOpcode: (1 octet)
Value
XX
Parameter Description
The request that generated this error response
handle: (2 octets)
Range
0x0001 0xFFFF
errCode: (1 octet)
Value
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F
0x10
0x11
0x80
Parameter Description
The attribute handle given was not valid on this server.
The attribute cannot be read.
The attribute cannot be written.
The attribute PDU was invalid.
The attribute requires authentication before it can be
read or written.
Attribute server does not support the request received
from the client.
Offset specified was past the end of the attribute.
The attribute requires authorization before it can be read
or written.
Too many prepare writes have been queued.
No attribute found within the given attribute handle
range.
The attribute cannot be read or written using the Read
Blob Request.
The Encryption Key Size used for encrypting this link is
insufficient.
The attribute value length is invalid for the operation.
The attribute request that was requested has
encountered an error that was unlikely, and therefore
could not be completed as requested.
The attribute requires encryption before it can be read or
written.
The attribute type is not a supported grouping attribute as
defined by a higher layer specification.
Insufficient Resources to complete the request.
The attribute value is invalid for the operation.
Request Parameters:
clientRxMTU: (2 octets)
Value
XX
Parameter Description
Client receive MTU size
Response Parameters:
serverRxMTU: (2 octets)
Value
XX
Parameter Description
Attribute server receive MTU size
Request Parameters:
startHandle: (2 octets)
Value
0xXXXX
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
Event(s) Generated:
When this request is received, the server will send the Find Information Response. The client will
forward all the Find Information Responses to the calling application. The response with the status of
bleProcedureComplete will indicate the end of the sub-procedure.
If no attributes will be returned or any of the requested parameters is invalid, the server will send an
Error Response.
Parameter Description
A list of 1 or more handles with their 16-bit Bluetooth
UUIDs
A list of 1 or more handles with their 128-bit UUIDs
Parameter Description
The information data whose format is
determined by the format field
The information data field is comprised of a list of data defined in the tables below depending on the
value chosen for the format.
128-bit UUID
16 octets
Request Parameters:
startHandle: (2 octets)
Value
0xXXXX
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
Parameter Description
2 octet UUID to find
Parameter Description
Attribute value to find
Event(s) Generated:
When this request is received, the server will send the Find By Type Value Response. The client will
forward all the Find By Type Value Responses to the calling application. The response with the status
of bleProcedureComplete will indicate the end of the sub-procedure.
If no attributes will be returned or any of the requested parameters is invalid, the server will send an
Error Response.
Response Parameters:
handlesInfo: (4 to (ATT_MTU - 1) octets)
Value
XX:XX:XX:XXXX
Parameter Description
A list of 1 or more Handle Information.
The Handles Information List field is a list of one or more Handle Information. The Handles Information
field is an attribute handle range as defined in Format of the Handles Information table below:
2 octets
2 octets
Request Parameters:
Page 124 of 152
Copyright 2011 Texas Instruments, Inc
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
type: (2 or 16 octets)
Value
XX:XX or XX:XXXX
Parameter Description
2 or 16 octet UUID
Event(s) Generated:
When this request is received, the server will send the Read By Type Response. The client will forward
all the Read By Type Responses to the calling application. The response with the status of
bleProcedureComplete will indicate the end of the sub-procedure.
If no attribute with the given type exists within the handle range or the attribute value cannot be read,
the server will send an Error Response.
Response Parameters:
length: (1 octet)
Value
0xXX
Parameter Description
The size of each attribute handle-value pair
Parameter Description
A list of Attribute Data.
The Attribute Data field is comprised of a list of attribute handle and value pairs as defined in Format
of the Attribute Data table below:
Attribute Handle
Attribute Value
2 octets
(Length - 2) octets
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be read
Event(s) Generated:
When this request is received, the server will send the Read Response.
If the attribute handle is invalid or the attribute value cannot be read, the server will send an Error
Response.
Response Parameters:
value: (0 to (ATT_MTU - 1) octets)
Value
XX:XXXX
Parameter Description
The value of the attribute with the handle given
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be read
offset: (2 octets)
Value
0xXXXX
Parameter Description
The offset of the first octet to be read
Event(s) Generated:
When this request is received, the server will send the Read Blob Response. The client will forward all
the Read Blob Responses to the calling application. The response with the status of
bleProcedureComplete will indicate the end of the sub-procedure.
If the attribute handle or offset is invalid, or the attribute value cannot be read, the server will send an
Error Response.
Response Parameters:
value: (0 to (ATT_MTU - 1) octets)
Value
XX:XXXX
Parameter Description
Part of the value of the attribute with the handle given
Request Parameters:
handles: (4 to (ATT_MTU-1) octets)
Value
XX:XX:XX:XXXX
Parameter Description
A set of two or more attribute handles.
Event(s) Generated:
When this request is received, the server will send the Read Multiple Response.
If any of the attribute handles are invalid or any of the attribute values cannot be read, the server will
send an Error Response.
Response Parameters:
values: (0 to (ATT_MTU - 1) octets)
Value
Parameter Description
A set of two or more values.
XXXX
Request Parameters:
startHandle: (2 octets)
Value
Parameter Description
First requested handle number
0xXXXX
endHandle: (2 octets)
Value
Parameter Description
Last requested handle number
0xXXXX
groupType: (2 or 16 octets)
Value
XX:XX or XX:XXXX
Parameter Description
2 or 16 octet UUID
Event(s) Generated:
When this request is received, the server will send the Read By Group Type Response. The client will
forward all the Read By Group Type Responses to the calling application. The response with the status
of bleProcedureComplete will indicate the end of the sub-procedure.
If no attributes with the given type exists within the handle ranges or the Attribute Group Type is not a
supported grouping attribute, the server will send an Error Response.
Response Parameters:
length: (1 octet)
Value
0xXX
Parameter Description
The size of each attribute handle-value pair
Parameter Description
A list of Attribute Data.
The Attribute Data field is comprised of a list of attribute handle and value pairs as defined in Format
of the Attribute Data table below:
Attribute Value
2 octets
2 octets
(Length - 4) octets
Request Parameters:
The signature field represents different data as defined in the tables below depending on the type of
the message.
Parameter Description
Do not include the Authentication Signature with the
Write PDU.
Include the Authentication Signature with the Write PDU.
Value
0x00
0x01
0x02
Parameter Description
The Authentication Signature is not included with the
Write PDU.
The included Authentication Signature is valid.
The included Authentication Signature is not valid.
command: (1 octet)
Value
0x00 or 0x01
Parameter Description
Whether this is a Write Command:
0x00 - No
0x01 - Yes
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
Parameter Description
The value to be written to the attribute.
Event(s) Generated:
When this request is received, the server will send the Write Response.
If the attribute handle is invalid or the attribute value cannot be written, the server will send an Error
Response. The server will not send an Error Response for the Write Command.
Response Parameters:
None
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
offset: (2 octets)
Value
0xXXXX
Parameter Description
The offset of the first octet to be Written.
Parameter Description
Part of the value of the attribute to be written.
Event(s) Generated:
When this request is received, the server will send the Prepare Write Response. The client will forward
the response to the calling application only when the compile option TESTMODES is used.
If the attribute handle is invalid or the attribute value cannot be written, the server will send an Error
Response.
Response Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
offset: (2 octets)
Value
0xXXXX
Parameter Description
The offset of the first octet to be Written.
Parameter Description
Value
XXXX
Parameter Description
Part of the value of the attribute to be written.
Request Parameters:
flags: (1 octet)
Value
0x00
0x01
Parameter Description
Cancel all prepared writes
Immediately write all pending prepared values
Event(s) Generated:
When this request is received, the server will send the Execute Write Response.
If the attribute value cannot be written, the server will send an Error Response.
Response Parameters:
None
Request Parameters:
authenticated: (1 octet)
Value
0x00 or 0x01
Parameter Description
Whether or not an authenticated link is required:
0x00 - No
0x01 - Yes
handle: (2 octets)
Page 132 of 152
Copyright 2011 Texas Instruments, Inc
Value
0xXXXX
Parameter Description
The handle of the attribute.
Parameter Description
The current value of the attribute.
Event(s) Generated:
None
Request Parameters:
authenticated: (1 octet)
Value
0x00 or 0x01
Parameter Description
Whether or not an authenticated link is required:
0x00 - No
0x01 - Yes
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute.
Parameter Description
The current value of the attribute.
Event(s) Generated:
The client shall send a Handle Value Confirmation in response to a Handle Value Indication. No further
indications to this client shall occur until the confirmation has been received by the server.
Request Parameters:
None
Name
Size (octets)
Description
Opcode
connectionHandle
Command PDU
Variable
Command parameters
Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent
to this connection will be loop backed to the local host.
For the command parameters, please see the corresponding section below.
Event(s) Generated:
When a GATT command is received, the host will send the Command Status Event with the Status
parameter.
Return Parameters:
Status: (1 octet)
Value
Parameter Description
0x00
SUCCESS
0x02
INVALIDPARAMETER
0x04
MSG_BUFFER_NOT_AVAIL
0x13
bleMemAllocError
0x14
bleNotConnected
0x40
bleInvalidPDU
Request Parameters:
Please refer to Section 17.4 for the format of the request parameters.
Request Parameters:
None.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadByGrpTypeRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
value: (0 to (ATT_MTU - 7) octets)
Value
XX:XXXX
Parameter Description
Attribute value to find
Event(s) Generated:
This sub-procedure is complete when either ATT_FindByTypeValueRsp (with bleProcedureComplete
or bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application
task.
Request Parameters:
startHandle: (2 octets)
Value
0xXXXX
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadByTypeRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
startHandle: (2 octets)
Value
0xXXXX
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
Request Parameters:
startHandle: (2 octets)
Value
0xXXXX
Parameter Description
First requested handle number
endHandle: (2 octets)
Value
0xXXXX
Parameter Description
Last requested handle number
type: (2 or 16 octets)
Value
XX:XX or XX:XXXX
Parameter Description
2 or 16 octet UUID
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadByTypeRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Page 138 of 152
Copyright 2011 Texas Instruments, Inc
Event(s) Generated:
This sub-procedure is complete when either ATT_FindInfoRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.12 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadRsp (with bleProcedureComplete or bleTimeout
status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.10 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadByTypeRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.14 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadBlobRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.16 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadMultiRsp (with SUCCESS or bleTimeout status)
or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Parameter Description
The handle of the attribute to be Written.
Parameter Description
The value to be written to the attribute.
Event(s) Generated:
No response will be sent to the calling application task for this sub-procedure. If the Characteristic
Value write request is the wrong size, or has an invalid value as defined by the profile, then the write
will not succeed and no error will be generated by the server.
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
Parameter Description
The value to be written to the attribute.
Event(s) Generated:
No response will be sent to the calling application task for this sub-procedure. If the authenticated
Characteristic Value that is written is the wrong size, or has an invalid value as defined by the profile,
or the signed value does not authenticate the client, then the write will not succeed and no error will be
generated by the server.
Page 141 of 152
Copyright 2011 Texas Instruments, Inc
Request Parameters:
Please refer to Section 17.20 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_WriteRsp (with SUCCESS or bleTimeout status) or
ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
offset: (2 octets)
Value
0xXXXX
Parameter Description
The offset of the first octet to be Written.
Parameter Description
The value of the attribute to be written. Note: the stack
implementation supports the maximum length of 512
octets but this is always bound by the physical interface
used to communicate with the device.
Request Parameters:
numberRequests: (1 octet)
Value
Parameter Description
The number of Prepare Write Request messages.
0xXX
Parameter Description
A list of Prepare Write Request messages. Note: the
stack implementation supports the maximum length of
512 octets but this is always bound by the physical
interface used to communicate with the device.
The Requests field is comprised of a list of Attribute Value Length and Prepare Write Request as
defined in Format of the Requests table below:
Format of Requests
Attribute Value
Length
1 octet
Event(s) Generated:
Request Parameters:
Please refer to Section 17.12 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadRsp (with bleProcedureComplete or bleTimeout
status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.14 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_ReadBlobRsp (with bleProcedureComplete or
bleTimeout status) or ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.20 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when either ATT_WriteRsp (with SUCCESS or bleTimeout status) or
ATT_ErrorRsp (with SUCCESS status) is received by the calling application task.
Request Parameters:
handle: (2 octets)
Value
0xXXXX
Parameter Description
The handle of the attribute to be Written.
offset: (2 octets)
Value
0xXXXX
Parameter Description
The offset of the first octet to be Written.
Parameter Description
The value of the attribute to be written. Note: the stack
implementation supports the maximum length of 512
octets but this is always bound by the physical interface
used to communicate with the device.
Event(s) Generated:
This sub-procedure is complete when either ATT_PrepareWriteRsp (with bleTimeout status),
ATT_ExecuteWriteRsp (with SUCCESS or bleTimeout status), or ATT_ErrorRsp (with SUCCESS
status) is received by the calling application task.
Request Parameters:
Please refer to Section 17.26 for the format of the request parameters.
Event(s) Generated:
None.
Request Parameters:
Please refer to Section 17.27 for the format of the request parameters.
Event(s) Generated:
This sub-procedure is complete when ATT_HandleValueCfm (with SUCCESS or bleTimeout status) is
received by the calling application task.
Request Parameters:
UUID: (2 octets)
Value
Parameter Description
Page 146 of 152
Copyright 2011 Texas Instruments, Inc
Value
00:28 or 01:28
Parameter Description
The type of the service to be added:
0x2800 Primary Service
0x2801 Secondary Service
numAttrs: (2 octets)
Value
XX:XX
Parameter Description
The number of the attributes in the service (including the
service attribute).
Event(s) Generated:
None.
Request Parameters:
handle: (2 octets)
Value
XX:XX
Parameter Description
The handle of the service to be deleted (0x0000 if the
service hasnt been registered with the GATT Server
yet).
Event(s) Generated:
None.
Request Parameters:
UUID: (2 or 16 octets)
Page 147 of 152
Copyright 2011 Texas Instruments, Inc
Value
XX:XX or XX::XX
Parameter Description
The type of the attribute to be added to a service.
Parameter Description
0x01
GATT_PERMIT_READ
0x02
GATT_PERMIT_WRITE
0x04
GATT_PERMIT_AUTHEN_READ
0x08
GATT_PERMIT_AUTHEN_WRITE
0x10
GATT_PERMIT_AUTHOR_READ
0x20
GATT_PERMIT_AUTHOR_WRITE
Event(s) Generated:
None.
Name
Size (octets)
Description
Opcode
status
Event status
connectionHandle
pduLen
Event PDU
Variable
Event parameters
Event Status:
Value
Parameter Description
0x00
SUCCESS
0x14
bleNotConnected
0x17
bleTimeout
0x1A
bleProcedureComplete
For the event parameters, please see the corresponding section below.
Note: The connection handle of 0xFFFE is considered as the loopback connection. All messages sent
to this connection will be loop backed to the local host.
Response Parameters:
attributeHandle: (2 octets)
Value
Parameter Description
The handle of the Client Characteristic Configuration
attribute
0xXXXX
Parameter Description
0x0000
No operation
Page 149 of 152
Copyright 2011 Texas Instruments, Inc
Value
Parameter Description
0x0001
0x0002
0xFFF4
Value
Parameter Description
0x00
SUCCESS
0x00
FAILURE
0x02
INVALIDPARAMETER
0x03
INVALID_TASK
0x04
MSG_BUFFER_NOT_AVAIL
0x05
INVALID_MSG_POINTER
0x06
INVALID_EVENT_ID
0x07
INVALID_INTERRUPT_ID
0x08
NO_TIMER_AVAIL
0x09
NV_ITEM_UNINIT
0x0A
NV_OPER_FAILED
0x0B
INVALID_MEM_SIZE
0x0C
NV_BAD_ITEM_LEN
0x10
bleNotReady
0x11
bleAlreadyInRequestedMode
0x12
bleIncorrectMode
0x13
bleMemAllocError
0x14
bleNotConnected
0x15
bleNoResources
0x16
blePending
0x17
bleTimeout
0x18
bleInvalidRange
0x19
bleLinkEncrypted
0x1A
bleProcedureComplete
0x30
bleGAPUserCanceled
0x31
bleGAPConnNotAcceptable
0x32
bleGAPBondRejected
Page 151 of 152
Copyright 2011 Texas Instruments, Inc
0x40
bleInvalidPDU
0x41
bleInsufficientAuthen
0x42
bleInsufficientEncrypt
0x43
bleInsufficientKeySize
0xFF
INVALID_TASK_ID
Table 8: List of Possible Host Error Codes