UM1755 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 123
Technical content
Datasheet sections
- 1 Overview
- 1.1 BlueNRG ACI architecture
- 2 ACI command data format
- 2.1 Overview
- 2.2 HCI command packet
- 2.3 HCI event packet
- 2.4 HCI ACL data packet
- 3 Standard HCI commands
- 3.1 Supported HCI commands
- 3.2 Supported HCI events
- 4 Vendor specific commands
- 4.1 VS command and VS event format
- 4.2 L2CAP VS commands and events
- 4.2.1 L2CAP VS commands
- 4.2.2 Aci_L2CAP_Connection_Parameter_Update_Request
- 4.2.3 Aci_L2CAP_Connection_Parameter_Update_Response
- 4.2.4 L2CAP VS Events
- 4.2.5 Evt_Blue_L2CAP_Connection_Update_Resp
- 4.2.6 Evt_Blue_L2CAP_Procedure_Timeout
- 4.2.7 Evt_Blue_L2CAP_Connection_Update_Request
- 4.3 GAP VS commands and events
- 4.3.1 Overview
- 4.3.2 GAP VS Commands
- 4.3.3 Aci_Gap_Set_Non_Discoverable
- 4.3.4 Aci_Gap_Set_Limited_Discoverable
- 4.3.5 Aci_Gap_Set_Discoverable
- 4.3.6 Aci_Gap_Set_Direct_Connectable
- 4.3.7 Aci_Gap_Set_IO_Capability
- 4.3.8 Aci_Gap_Set_Auth_Requirement
- 4.3.9 Aci_Gap_Set_Author_Requirement
Datasheet sections
- 4.5.1 GATT VS commands
- 4.5.2 Aci_Gatt_Init
- 4.5.3 Aci_Gatt_Add_Service
- 4.5.4 Aci_Gatt_Include_Service
- 4.5.5 Aci_Gatt_Add_Characteristic
- 4.5.6 Aci_Gatt_Add_Char_Desc
- 4.5.7 Aci_Gatt_Update_Char_Value
- 4.5.8 Aci_Gatt_Del_Characteristic
- 4.5.9 Aci_Gatt_Del_Service
- 4.5.10 Aci_Gatt_Del_Include_Service
- 4.5.11 Aci_Gatt_Set_Event_Mask
- 4.5.12 Aci_Gatt_Exchange_Configuration
- 4.5.13 Aci_Att_Find_Information_Req
- 4.5.14 Att_Find_By_Type_Value_Req
- 4.5.15 Aci_Att_Read_Attr_By_Type_Req
- 4.5.16 Aci_Att_Read_By_Group_Type_Req
- 4.5.17 Aci_Att_Prepare_Write_Req
- 4.5.18 Aci_Att_Execute_Write_Req
- 4.5.19 Aci_Gatt_Disc_All_Prim_Services
- 4.5.20 Aci_Gatt_Disc_Prim_serv_By_Uuid
- 4.5.21 Aci_Gatt_Find_Included_Services
- 4.5.22 Aci_Gatt_Disc_All_Charac_Of_Serv
- 4.5.23 Aci_Gatt_Disc_Charac_By_UUID
- 4.5.24 Aci_Gatt_Disc_All_Charac_Descriptors
- 4.5.25 Aci_Gatt_Read_Charac_Val
- 4.5.26 Aci_Gatt_Read_Charac_Using_UUID
- 4.5.27 Aci_Gatt_Read_Long_Charac_Val
- 4.5.28 Aci_Gatt_Read_Multiple_Charac_Values
- 4.5.29 Aci_Gatt_Write_Charac_Val
- 4.5.30 Aci_Gatt_Write_Long_Charac_Val
- 4.5.31 Aci_Gatt_Write_Charac_Reliable
- 4.5.32 Aci_Gatt_Write_Long_Charac_Descriptor
- 4.5.33 Aci_Gatt_Read_Long_Charac_Descriptor
- 4.5.34 Aci_Gatt_Write_Charac_Descriptor
- 4.5.35 Aci_Gatt_Read_Charac_Descriptor
- 4.5.36 Aci_Gatt_Write_Without_Response
- 4.5.37 Aci_Gatt_Signed_Write_Without_Response
Datasheet sections
- 6 Revision history
BlueNRG Bluetooth® LE stack application command interface (ACI) Introduction The purpose of this document is to describe the design of the application command interface (ACI) of the BlueNRG Bluetooth low energy (LE) stack. This document specifies the list of commands supported by the BlueNRG ACI.
1 Overview
classic or Bluetooth high-speed systems. Bluetooth core specification. Please refer to the official document for more information. Figure 1. Bluetooth LE system with separate host and controller Sometimes the LE controller and the host can be combined into a single chipset solution. controller is no longer required. only the controller with an external Bluetooth tester.
Figure 2. Bluetooth LE system with combined host and controller
1.1 BlueNRG ACI architecture
command interface (ACI) is provided for accessing the BlueNRG host and controller. protocol is described in a later section. low-level hardware parameters with the HCI commands, without going through the host. Figure 3. BlueNRG ACI architecture
2 ACI command data format
2.1 Overview
Bluetooth specification, Volume 2, Part E, Chapter 5 for detailed information.
- HCI synchronous data packet
In the BlueNRG, the HCI synchronous data packet is not supported, but the other three are.
2.2 HCI command packet
packets, but does not transmit. Figure 4. HCI command packet group is assigned a unique OGF value.
- Standard HCI commands: the commands with an OGF value other than 0x3F. These
defined in the Bluetooth specification, so they are not described in this document.
- Vendor specific (VS) HCI commands: the commands with an OGF value 0x3F and are
- Vendor specific (VS) ACI commands: the commands also with an OGF value 0x3F, but
vendor specific. The ACI commands for the BlueNRG are described in this document. the host, i.e. to the whole BLE system, and not only to the controller at the lower level. when referring in general to commands, we use the term “ACI commands”. application should guarantee the OpCode value is used correctly. Table 1. OGF value
2.3 HCI event packet
Figure 5. HCI event packet
2.4 HCI ACL data packet
The ACL data packets are used to exchange data. Figure 6. HCI ACL data packet
3 Standard HCI commands
3.1 Supported HCI commands
BlueNRG. For the details of each command, e.g. command descriptions, parameters, etc. please refer to the Bluetooth core specification, Volume 2, Part E, Chapter 7. Table 2. HCI commands
1 HCI_Disconnect 0x01 0x06 0x0406
2 HCI_Read_Remote_Version_Information 0x01 0x1D 0x041D
3 HCI_Set_Event_Mask 0x03 0x01 0x0C01
4 HCI_Reset 0x03 0x03 0x0C03
5 HCI_Read_Transmit_Power_Level 0x03 0x2D 0x0C2D
6 HCI_Read_Local_Version_Information 0x04 0x01 0x1001
7 HCI_Read_Local_Supported_Commands 0x04 0x02 0x1002
8 HCI_Read_Local_Supported_Features 0x04 0x03 0x1003
9 HCI_Read_BD_ADDR 0x04 0x09 0x1009
10 HCI_Read_RSSI 0x05 0x05 0x1405
11 HCI_LE_Set_Event_Mask 0x08 0x01 0x2001
12 HCI_LE_Read_Buffer_Size 0x08 0x02 0x2002
13 HCI_LE_Read_Local_Supported_Feature 0x08 0x03 0x2003
14 HCI_LE_Set_Random_Address 0x08 0x05 0x2005
15 HCI_LE_Set_Advertizing_Parameters 0x08 0x06 0x2006
16 HCI_LE_Read_Advertizing_Channel_Tx_Power 0x08 0x07 0x2007
17 HCI_LE_Set_Advertizing_Data 0x08 0x08 0x2008
18 HCI_LE_Set_Scan_Response 0x08 0x09 0x2009
19 HCI_LE_Set_Advertize_Enable 0x08 0x0A 0x200A
20 HCI_LE_Set_Scan_Parameters 0x08 0x0B 0x200B
21 HCI_LE_Set_Scan_Enable 0x08 0x0C 0x200C
22 HCI_LE_Create_Connection 0x08 0x0D 0x200D
23 HCI_LE_Create_Connection_Cancel 0x08 0x0E 0x200E
24 HCI_LE_Read_White_List_Size 0x08 0x0F 0x200F
25 HCI_LE_Clear_While_List 0x08 0x10 0x2010
26 HCI_LE_Add_Device_To_While_List 0x08 0x11 0x2011
27 HCI_LE_Remove_Device_From_While_List 0x08 0x12 0x2012
28 HCI_LE_Connection_Update 0x08 0x13 0x2013
3.2 Supported HCI events
The table below lists the HCI events supported by the BlueNRG.
29 HCI_LE_Set_Host_Channel_Classification 0x08 0x14 0x2014
30 HCI_LE_Read_Channel_Map 0x08 0x15 0x2015
31 HCI_LE_Read_Remote_Used_Features 0x08 0x16 0x2016
32 HCI_LE_Encrypt 0x08 0x17 0x2017
33 HCI_LE_Rand 0x08 0x18 0x2018
34 HCI_LE_Start_Encryption 0x08 0x19 0x2019
35 HCI_LE_Long_Term_Key_Request_Reply 0x08 0x1A 0x201A
36 HCI_LE_Long_Term_Key_Requested_Negative_Reply 0x08 0x1B 0x201B
37 HCI_LE_Read_Supported_States 0x08 0x1C 0x201C
38 HCI_LE_Receiver_Test 0x08 0x1D 0x201D
39 HCI_LE_Transmitter_Test 0x08 0x1E 0x201E
40 HCI_LE_Test_End 0x08 0x1F 0x201F
Table 2. HCI commands (continued) Table 3. HCI events
1 Disconnect_Complete 0x05 -
2 Encryption_Change_Event 0x08 -
3 Read_Remote_Version_Information_Complete 0x0C -
4 Command_Complete_Event 0x0E -
5 Command_Status_Event 0x0F -
6 Hardware_Error_Event 0x10 -
7 Number_Of_Completed_Packets 0x13 -
8 Encryption_Key_Refresh_Complete 0x30 -
9 LE_Connection_Complete 0x3E 0x01
10 LE_Advertising_Report 0x3E 0x02
11 LE_Connection_Update_Complete 0x3E 0x03
12 LE_Read_Remote_Used_Features_Complete 0x3E 0x04
13 LE_Long_Term_Key_Request_Event 0x3E 0x05
4 Vendor specific commands
4.1 VS command and VS event format
Command Group ID and Command ID. Figure 7. OpCode format for VS Commands the ID of each command. Each CGID group can have up to 128 VS commands. 16-bit event parameter 0 has a different format. Table 4. CGID group
Figure 8. Event parameter 0 format for VS events the EID occupies the remaining 10 bits. Table 5. EGID group
4.2 L2CAP VS commands and events
4.2.1 L2CAP VS commands
4.2.2 Aci_L2CAP_Connection_Parameter_Update_Request
Send an L2CAP connection parameter update request from the slave to the master. Table 6. L2CAP VS Commands
1 Connection Parameter Update Request 0x03 0x01 0xFD81
2 Connection Parameter Update Response 0x03 0x02 0xFD82
Table 7. Aci_L2CAP_Connection_Parameter_Update_Request
4.2.3 Aci_L2CAP_Connection_Parameter_Update_Response
parameter has to be set if the connection parameters given in the event are acceptable. Table 9. Aci_L2CAP_Connection_Parameter_Update_Requests return parameters Table 10. Aci_L2CAP_Connection_Parameter_Update_Response Table 11. Aci_L2CAP_Connection_Parameter_Update_Response command Evt_Blue_L2CAP_Connection_Update_Req event. Evt_Blue_L2CAP_Connection_Update_Req event. Evt_Blue_L2CAP_Connection_Update_Req event. Evt_Blue_L2CAP_Connection_Update_Req event.
A command complete event is generated.
4.2.4 L2CAP VS Events
4.2.5 Evt_Blue_L2CAP_Connection_Update_Resp
with a connection update response packet or a command reject packet. Accept 1 byte 0x00: The connection update parameters are not acceptable. 0x01: The connection update parameters are acceptable. Table 12. Aci_L2CAP_Connection_Parameter_Update_Response return parameters Table 13. L2CAP VS events
1 Evt_Blue_L2CAP_Connection_Update_Resp 0x02 0x00 0x0800
2 Evt_Blue_L2CAP_Procedure_Timeout 0x02 0x01 0x0801
3 Evt_Blue_L2CAP_Connection_Update_Request 0x02 0x02 0x0802
Table 14. Evt_Blue_L2CAP_Connection_Update_Resp
- command reject packet if the request was rejected by the
- connection update response packet
4.2.6 Evt_Blue_L2CAP_Procedure_Timeout
4.2.7 Evt_Blue_L2CAP_Connection_Update_Request
Aci_L2CAP_Connection_Update_Resp command to the BlueNRG. Table 15. Evt_Blue_L2CAP_Procedure_Timeout Table 16. Evt_Blue_L2CAP_Connection_Update_Request Event code 2 bytes The event code for connection update request event. Aci_L2CAP_Connection_Update_Resp. connection update request received. layer in the command Aci_L2CAP_Connection_Update_Resp.
Vendor specific commands UM1755
4.3 GAP VS commands and events
4.3.1 Overview
There are 4 GAP roles defined for LE devices: Broadcaster: Broadcaster is a device that sends advertising events. Broadcaster shall have a transmitter and can optionally have a receiver. Observer: In observer role device receives the advertising events. An observer shall have a receiver and can optionally have a transmitter. Peripheral: Any device that accepts the establishment of LE physical link is referred as peripheral. A device operating in peripheral role will be slave in LL connection state. A peripheral shall have both a transmitter and receiver. Central: A device that initiates the establishment of LE physical link is referred as central device. A device operating in central role will be master in LL connection state. A central shall have both a transmitter and receiver. BlueNRG is capable of being the peripheral or central in the GAP profile context because: BlueNRG controller is capable of acting as a slave in a connection, i.e. it can accept the LL connection request from a central device and can support all the mandatory requirements of the GAP peripheral role as dictated in Table 2.1, Part C, Generic Access Profile of Bluetooth core specification 4.0. BlueNRG controller is capable of acting as a master in a connection, i.e. it can issue the LL connect request to a peripheral device and can support all the mandatory requirements of the GAP central role as dictated in Table 2.1, Part C, Generic Access Profile of Bluetooth core specification 4.0.
4.3.2 GAP VS Commands
Table 17. GAP VS commands
1 Aci_Gap_Set_Non_Discoverable 0x01 0x01 0xFC81
2 Aci_Gap_Set_Limited_Discoverable 0x01 0x02 0xFC82
3 Aci_Gap_Set_Discoverable 0x01 0x03 0xFC83
4 Aci_Gap_Set_Direct_Connectable 0x01 0x04 0xFC84
5 Aci_Gap_Set_IO_Capability 0x01 0x05 0xFC85
6 Aci_Gap_Set_Auth_Requirement 0x01 0x06 0xFC86
7 Aci_Gap_Set_Author_Requirement 0x01 0x07 0xFC87
8 Aci_Gap_Pass_Key_Response 0x01 0x08 0xFC88
9 Aci_Gap_Authorization_Response 0x01 0x09 0xFC89
10 Aci_Gap_Init 0x01 0x0A 0xFC8A
11 Aci_Gap_Set_Non_Connectable 0x01 0x0B 0xFC8B
12 Aci_Gap_Set_Undirected_Connectable 0x01 0x0C 0xFC8C
13 Aci_Gap_Slave_Security_request 0x01 0x0D 0xFC8D
14 Aci_Gap_Update_Adv_Data 0x01 0x0E 0xFC8E
15 Aci_Gap_Delete_AD_Type 0x01 0x0F 0xFC8F
16 Aci_Gap_Get_Security_Level 0x01 0x10 0xFC90
17 Aci_Gap_Set_Event_Mask 0x01 0x11 0xFC91
18 Aci_Gap_Configure_WhiteList 0x01 0x12 0xFC92
19 Aci_Gap_Terminate 0x01 0x13 0xFC93
20 Aci_Gap_Clear_Security_Database 0x01 0x14 0xFC94
21 Aci_Allow_Rebond 0x01 0x15 0xFC95
22 Aci_Gap_Start_Limited_Discovery_Proc 0x01 0x16 0xFC96
23 Aci_Gap_Start_General_Discovery_Proc 0x01 0x17 0xFC97
24 Aci_Gap_Start_Name_Discovery_Proc 0x01 0x18 0xFC98
25 Aci_Gap_Start_Auto_Conn_Establishment 0x01 0x19 0xFC99
26 Aci_Gap_Start_General_Conn_Establishment 0x01 0x1A 0xFC9A
27 Aci_Gap_Start_Selective_Conn_Establishment 0x01 0x1B 0xFC9B
28 Aci_Gap_Create_Connection 0x01 0x1C 0xFC9C
29 Aci_Gap_Terminate_Gap_Procedure 0x01 0x1D 0xFC9D
30 Aci_Gap_Start_Connection_Update 0x01 0x1E 0xFC9E
31 Aci_Gap_Send_Pairing_Request 0x01 0x1F 0xFC9F
32 Aci_Gap_Resolve_Private_Address 0x01 0x20 0xFCA0
33 Aci_Gap_Get_Bonded_Devices 0x01 0x23 0xFCA3
4.3.3 Aci_Gap_Set_Non_Discoverable
put the device in standby state. generate a command complete event.
4.3.4 Aci_Gap_Set_Limited_Discoverable
by issuing Aci_Gap_Set_Non_Discoverable command. the GAP will use default values for adv intervals for limited discoverable mode. Table 18. Aci_gap_set_non_discoverable Table 19. Aci_gap_set_non_discoverable return parameters Table 20. Aci_gap_set_limited_discoverable
Table 21. Aci_gap_set_limited_discoverable command parameters request from white list only. connect request from white list only. Length of the local name string in octets. service to be advertised, set this field to 0x00. Slave connection internal minimum value. Value of 0xFFFF indicates no specific minimum. Slave connection internal maximum value. than the Slave_Conn_Interval_Min. Value of 0xFFFF indicates no specific maximum.
Evt_Blue_Gap_Limited_Discoverable_Complete event.
4.3.5 Aci_Gap_Set_Discoverable
intervals for general discoverable mode. Table 22. Aci_gap_set_limited_discoverable return parameters Table 23. Aci_gap_set_discoverable Table 24. Aci_gap_set_discoverable command parameters
request from white list only. connect request from white list only. Length of the local name string in octets. service to be advertised, set this field to 0x00. Slave connection internal minimum value. Value of 0xFFFF indicates no specific minimum. Slave connection internal maximum value. than the Slave_Conn_Interval_Min. Value of 0xFFFF indicates no specific maximum. Table 25. Aci_gap_set_discoverable return parameters Table 24. Aci_gap_set_discoverable command parameters (continued)
4.3.6 Aci_Gap_Set_Direct_Connectable
connection was successfully established. Table 26. Aci_Gap_Set_Direct_Connectable Table 27. Aci_Gap_Set_Direct_Connectable command parameters Table 28. Aci_Gap_Set_Direct_Connectable return parameters
4.3.7 Aci_Gap_Set_IO_Capability
Table 29. Aci_Gap_Set_IO_Capability Table 30. Aci_Gap_Set_IO_Capability command parameters Table 31. Aci_Gap_Set_IO_Capability return parameters
4.3.8 Aci_Gap_Set_Auth_Requirement
given only when the device is not in a connected state. Table 32. Aci_Gap_Set_Auth_Requirement Table 33. Aci_Gap_Set_Auth_Requirement command parameters 0x01: Do not use fixed pin during the pairing process. Fixed pin 4 bytes Fixed pin to be used during pairing if MIMT protection is enabled.
4.3.9 Aci_Gap_Set_Author_Requirement
the device is not in a connected state. Table 34. Aci_Gap_Set_Auth_Requirement return parameters Table 35. Aci_Gap_Set_Author_Requirement Table 36. Aci_Gap_Set_Author_Requirement command parameters master (otherwise it can be also 0). Table 37. Aci_Gap_Set_Author_Requirement return parameters
4.3.10 Aci_Gap_Pass_Key_Response
Evt_Blue_Gap_Pairing_Complete event.
4.3.11 Aci_Gap_Authorization_Response
Evt_Blue_Gap_Authorization_Request event. Table 38. Aci_Gap_Pass_Key_Response Table 39. Aci_Gap_Pass_Key_Response command parameters Table 40. Aci_Gap_Pass_Key_Response return parameters Table 41. Aci_Gap_Authorization_Response Table 42. Aci_Gap_Authorization_Response command parameters
4.3.12 Aci_Gap_Init
these characteristics are returned in the event data. Table 43. Aci_Gap_Authorization_Response return parameters Table 44. Aci_Gap_Init Table 45. Aci_Gap_Init command parameters Table 46. Aci_Gap_Init return parameters
4.3.13 Aci_Gap_Set_Non_Connectable
A command complete event is generated upon the completion of the command. Table 46. Aci_Gap_Init return parameters (continued) Table 47. Aci_Gap_Set_Non_Connectable Table 48. Aci_Gap_Set_Non_Connectable command parameters Table 49. Aci_Gap_Set_Non_Connectable return parameters
4.3.14 Aci_Gap_Set_Undirected_Connectable
address of the type specified in Own_Address_Type is used for advertising. A command complete event is generated on the completion of the command. Table 50. Aci_Gap_Set_Undirected_Connectable Table 51. Aci_Gap_Set_Undirected_Connectable command parameters Table 52. Aci_Gap_Set_Undirected_Connectable return parameters
4.3.15 Aci_Gap_Slave_Security_Request
master, a Evt_Blue_Slave_Security_Initiated vendor specific event will be generated. Table 53. Aci_Gap_Slave_Security_Request Table 54. Aci_Gap_Slave_Security_Request command parameters Table 55. Aci_Gap_Slave_Security_Request return parameters
4.3.16 Aci_Gap_Update_Adv_Data
rejected and the old data is retained. status indicating success or failure.
4.3.17 Aci_Gap_Delete_AD_Type
Table 56. Aci_Gap_Update_Adv_Data Table 57. Aci_Gap_Update_Adv_Data command parameters Table 58. Aci_Gap_Update_Adv_Data return parameters Table 59. Aci_Gap_Delete_AD_Type
A command complete event will be generated and the status indicates success or failure.
4.3.18 Aci_Gap_Get_Security_Level
This command can be used to get the current security settings of the device. Table 60. Aci_Gap_Delete_AD_Type command parameters Table 61. Aci_Gap_Delete_AD_Type return parameters Table 62. Aci_Gap_Get_Security_Level
indicates the status of the security manager (channel opened or closed). Table 63. Aci_Gap_Get_Security_Level return parameters
4.3.19 Aci_Gap_Set_Event_Mask
It allows masking events from the GAP. The default configuration is all the events masked. A command complete event is generated on the completion of the command. Table 64. Aci_Gap_Set_Event_Mask Table 65. Aci_Gap_Set_Event_Mask command parameters Table 66. Aci_Gap_Set_Event_Mask return parameters
4.3.20 Aci_Gap_Configure_WhiteList
Configure the controller's white list with devices that are present in the security database.
4.3.21 Aci_Gap_Terminate
Command the controller to terminate the connection. Table 67. Aci_Gap_Configure_WhiteList Table 68. Aci_Gap_Configure_WhiteList return parameters Table 69. Aci_Gap_Terminate Table 70. Aci_Gap_Terminate command parameters
Disconnection Complete event will be generated when the link is disconnected.
4.3.22 Aci_Gap_Clear_Security_Database
Clear the security database. All the devices in the security database will be removed. The controller will generate a command complete event on the completion of the command. Table 71. Aci_Gap_Terminate return parameters Table 72. Aci_Gap_Clear_Security_Database Table 73. Aci_Gap_Clear_Security_Database return parameters
4.3.23 Aci_Allow_Rebond
Allows the security manager to complete the pairing procedure and rebond with the master. The controller will generate a command complete event on the completion of the command.
4.3.24 Aci_Gap_Start_Limited_Discovery_Proc
Start the limited discovery procedure. The controller is commanded to start active scanning. Table 74. Aci_Allow_Rebond Table 75. Aci_Allow_Rebond return parameters Table 76. Aci_Gap_Start_Limited_Discovery_Proc Table 77. Aci_Gap_Start_Limited_Discovery_Proc command parameters number N, Time = N * 0.625 msec.
Evt_Blue_Gap_Procedure_Complete event is returned with the procedure code set to 0x01. event Evt_Blue_Gap_Found_Device. Table 78. Aci_Gap_Start_Limited_Discovery_Proc return parameters Table 77. Aci_Gap_Start_Limited_Discovery_Proc command parameters (continued)
4.3.25 Aci_Gap_Start_General_Discovery_Proc
Evt_Blue_Gap_Procedure_Complete event is returned with the procedure code set to 0x02. Table 79. Aci_Gap_Start_General_Discovery_Proc Table 80. Aci_Gap_Start_General_Discovery_Proc command parameters Table 81. Aci_Gap_Start_General_Discovery_Proc return parameters
event Evt_Blue_Gap_Found_Device.
4.3.26 Aci_Gap_Start_Name_Discovery_Proc
device name was read successfully. Table 82. Aci_Gap_Start_Name_Discovery_Proc Table 83. Aci_Gap_Start_Name_Discovery_Proc command parameters number N, Time = N * 0.625 msec.
Evt_Blue_Gap_Procedure_Complete event is returned with the procedure code set to 0x04. less than or equal to Conn_Interval_Max. greater than or equal to Conn_Interval_Min. Conn_Latency 2 bytes Slave latency for the connection in number of connection events. Supervision timeout for the LE Link. Minimum length of connection needed for the LE connection. Maximum length of connection needed for the LE connection. Table 84. Aci_Gap_Start_Name_Discovery_Proc return parameters Table 83. Aci_Gap_Start_Name_Discovery_Proc command parameters (continued)
4.3.27 Aci_Gap_Start_Auto_Conn_Establishment
LE_Create_Connection_Cancel call will be made to the controller by GAP . Table 85. Aci_Gap_Start_Auto_Conn_Establishment Table 86. Aci_Gap_Start_Auto_Conn_Establishment command parameters number N, Time = N * 0.625 msec. less than or equal to Conn_Interval_Max.
Evt_Blue_Gap_Procedure_Complete event is returned with the procedure code set to 0x08. greater than or equal to Conn_Interval_Min. Conn_Latency 2 bytes Slave latency for the connection in number of connection events. Supervision timeout for the LE Link. Minimum length of connection needed for the LE connection. Maximum length of connection needed for the LE connection. es 1 byte Number of devices that have to be added to the whitelist. Table 87. Aci_Gap_Start_Auto_Conn_Establishment return parameters
4.3.28 Aci_Gap_Start_General_Conn_Establishment
which it wants to connect by issuing the command Aci_Gap_Create_Connection. Table 88. Aci_Gap_Start_General_Conn_Establishment Table 89. Aci_Gap_Start_General_Conn_Establishment command parameters number N, Time = N * 0.625 msec. Table 90. Aci_Gap_Start_General_Conn_Establishment return parameters
with the procedure code set to 0x10.
4.3.29 Aci_Gap_Start_Selective_Conn_Establishment
Table 91. Aci_Gap_Start_Selective_Conn_Establishment Table 92. Aci_Gap_Start_Selective_Conn_Establishment command parameters number N, Time = N * 0.625 msec.
with the procedure code set to 0x20.
4.3.30 Aci_Gap_Create_Connection
ries 1 byte Number of devices that have to be added to the whitelist. Table 93. Aci_Gap_Start_General_Conn_Establishment return parameters Table 94. Aci_Gap_Create_Connection
Table 95. Aci_Gap_Create_Connection command parameters number N, Time = N * 0.625 msec. less than or equal to Conn_Interval_Max. greater than or equal to Conn_Interval_Min. Conn_Latency 2 bytes Slave latency for the connection in number of connection events. Supervision timeout for the LE Link. Minimum length of connection needed for the LE connection. Maximum length of connection needed for the LE connection.
4.3.31 Aci_Gap_Terminate_Gap_Procedure
The gap procedure specified is terminated. Table 96. Aci_Gap_Create_Connection return parameters Table 97. Aci_Gap_Terminate_Gap_Procedure Table 98. Aci_Gap_Terminate_Gap_Procedure command parameters Table 99. Aci_Gap_Terminate_Gap_Procedure return parameters
4.3.32 Aci_Gap_Start_Connection_Update
Table 100. Aci_Gap_Start_Connection_Update Table 101. Aci_Gap_Start_Connection_Update command parameters less than or equal to Conn_Interval_Max. greater than or equal to Conn_Interval_Min. Conn_Latency 2 bytes Slave latency for the connection in number of connection events. Supervision timeout for the LE Link.
LE_Connection_Update_Complete event is returned to the upper layer.
4.3.33 Aci_Gap_Send_Pairing_Request
Aci_Set_IO_Capabilities and Aci_Set_Authentication_Requirements commands. Minimum length of connection needed for the LE connection. Maximum length of connection needed for the LE connection. Table 102. Aci_Gap_Start_Connection_Update return parameters Table 101. Aci_Gap_Start_Connection_Update command parameters (continued) Table 103. Aci_Gap_Send_Pairing_Request Table 104. Aci_Gap_Send_Pairing_Request command parameters
Evt_Blue_Pairing_Complete event is returned after the pairing process is completed.
4.3.34 Aci_Gap_Resolve_Private_Address
Table 105. Aci_Gap_Send_Pairing_Request return parameters Table 106. Aci_Gap_Resolve_Private_Address Table 107. Aci_Gap_Resolve_Private_Address command parameters Address 6 bytes Address to be resolved. Table 108. Aci_Gap_Resolve_Private_Address return parameters
4.3.35 Aci_Gap_Get_Bonded_Devices
address for each bonded device). value of all the devices in the list.
4.4 GAP VS Events
Table 109. Aci_Gap_Get_Bonded_Devices Table 110. Aci_Gap_Get_Bonded_Devices return parameters Table 111. GAP VS events
1 Evt_Blue_Gap_Limited_Discoverable 0x01 0x00 0x0400
2 Evt_Blue_Gap_Pairing_Complete 0x01 0x01 0x0401
3 Evt_Blue_Pass_Key_Request 0x01 0x02 0x0402
4 Evt_Blue_Authorization_Request 0x01 0x03 0x0403
5 Evt_Blue_Slave_Security_Initiated 0x01 0x04 0x0404
6 Evt_Blue_Gap_Bond_Lost 0x01 0x05 0x0405
7 Evt_Blue_Gap_Device_Found 0x01 0x06 0x0406
4.4.1 Evt_Blue_Gap_Limited_Discoverable
timeout. The timeout is 180 seconds.
4.4.2 Evt_Blue_Gap_Pairing_Complete
timeout has occurred so that the upper layer can decide to disconnect the link.
4.4.3 Evt_Blue_Pass_Key_Request
Aci_Gap_Pass_Key_Response command. event with advertising data (ADV_IND or ADV_SCAN_IND) from the same device.
8 Evt_Blue_Gap_Procedure_Complete 0x01 0x07 0x0407
9 Evt_Blue_Gap_Reconnection_Address 0x01 0x08 0x0408
Table 111. GAP VS events (continued) Table 112. Evt_Blue_Gap_Pairing_Complete
Table 113. Evt_Blue_Pass_Key_Request
4.4.4 Evt_Blue_Authorization_Request
This event is generated when the slave security request is successfully sent to the master.
4.4.6 Evt_Blue_Gap_Bond_Lost
slave to continue the pairing process with the master.
4.4.7 Evt_Blue_Gap_Device_Found
Table 114. Evt_Blue_Authorization_Request Table 115. Evt_Blue_Gap_Device_Found
4.4.8 Evt_Blue_Gap_Procedure_Complete
Table 115. Evt_Blue_Gap_Device_Found (continued) Table 116. Evt_Blue_Gap_Procedure_Complete
4.4.9 Evt_Blue_Gap_Reconnection_Address
connect to this reconnection address.
4.5 GATT VS commands and events
4.5.1 GATT VS commands
Table 117. Evt_Blue_Gap_Reconnection_Address Table 118. GATT VS commands
1 Aci_Gatt_Init 0x02 0x01 0xFD01
2 Aci_Gatt_Add_Service 0x02 0x02 0xFD02
3 Aci_Gatt_Include_Service 0x02 0x03 0xFD03
4 Aci_Gatt_Add_Characteristic 0x02 0x04 0xFD04
5 Aci_Gatt_Add_Char_Desc 0x02 0x05 0xFD05
6 Aci_Gatt_Update_Char_Value 0x02 0x06 0xFD06
7 Aci_Gatt_Del_Characteristic 0x02 0x07 0xFD07
8 Aci_Gatt_Del_Service 0x02 0x08 0xFD08
9 Aci_Gatt_Del_Include_Service 0x02 0x09 0xFD09
10 Aci_Gatt_Set_Event_Mask 0x02 0x0A 0xFD0A
11 Aci_Gatt_Exchange_configuration 0x02 0x0B 0xFD0B
12 Aci_Att_Find_Information_Req 0x02 0x0C 0xFD0C
13 Aci_Att_Find_Attr_By_Typ_And_Value_Req 0x02 0x0D 0xFD0D
14 Aci_Att_Find_Attr_By_Typ_And_Value_Req 0x02 0x0E 0xFD0E
15 Aci_Att_Read_Attr_By_Grp_Type_Req 0x02 0x0F 0xFD0F
16 Aci_Att_Prepare_Write_Req 0x02 0x10 0xFD10
17 Aci_Att_Execute_Write_Req 0x02 0x11 0xFD11
18 Aci_Gatt_Disc_All_Prim_Services 0x02 0x12 0xFD12
19 Aci_Gatt_Disc_Prim_serv_By_Uuid 0x02 0x13 0xFD13
20 Aci_Gatt_Find_Included_Services 0x02 0x14 0xFD14
21 Aci_Gatt_Disc_All_Charac_Of_Serv 0x02 0x15 0xFD15
22 Aci_Gatt_Disc_Charac_By_UUID 0x02 0x16 0xFD16
23 Aci_Gatt_Disc_All_Charac_Descriptors 0x02 0x17 0xFD17
24 Aci_Gatt_Read_Charac_Val 0x02 0x18 0xFD18
25 Aci_Gatt_Read_Charac_Using_UUID 0x02 0x19 0xFD19
26 Aci_Gatt_Read_Long_Charac_Val 0x02 0x1A 0xFD1A
27 Aci_Gatt_Read_Multiple_Charac_Values 0x02 0x1B 0xFD1B
28 Aci_Gatt_Write_Charac_Val 0x02 0x1C 0xFD1C
29 Aci_Gatt_Write_Long_Charac_Val 0x02 0x1D 0xFD1D
30 Aci_Gatt_Write_Charac_Reliable 0x02 0x1E 0xFD1E
31 Aci_Gatt_Write_Long_Charac_Descriptor 0x02 0x1F 0xFD1F
32 Aci_Gatt_Read_Long_Charac_Descriptor 0x02 0x20 0xFD20
33 Aci_Gatt_Write_Charac_Descriptor 0x02 0x21 0xFD21
34 Aci_Gatt_Read_Charac_Descriptor 0x02 0x22 0xFD22
35 Aci_Gatt_Write_Without_Response 0x02 0x23 0xFD23
36 Aci_Gatt_Signed_Write_Without_Response 0x02 0x24 0xFD24
37 Aci_Gatt_Confirm_Indication 0x02 0x25 0xFD25
38 Aci_Gatt_Write_Resp 0x02 0x26 0xFD26
39 Aci_Gatt_Allow_Read 0x02 0x27 0xFD27
40 Aci_Gatt_Set_Security_Permission 0x02 0x28 0xFD28
41 Aci_Gatt_Set_Descriptor_Value 0x02 0x29 0xFD29
42 Aci_Gatt_Read_Handle_Value 0x02 0x2A 0xFD2A
Table 118. GATT VS commands (continued)
4.5.2 Aci_Gatt_Init
command has to be given before using any of the GAP features.
4.5.3 Aci_Gatt_Add_Service
service is returned in command complete event. Table 119. Aci_Gatt_Init Table 120. Aci_Gatt_Init return parameters Table 121. Aci_Gatt_Add_Service Table 122. Aci_Gatt_Add_Service command parameters
command complete event with status and handle for the service as parameters.
4.5.4 Aci_Gatt_Include_Service
handle of this in command complete event as Included_Handle. Table 123. Aci_Gatt_Add_Service return parameters Table 122. Aci_Gatt_Add_Service command parameters (continued) Table 124. Aci_Gatt_Include_Service
command complete event with status and handle for the service as parameters.
4.5.5 Aci_Gatt_Add_Characteristic
Table 125. Aci_Gatt_Include_Service command parameters Table 126. Aci_Gatt_Include_Service return parameters Table 127. Aci_Gatt_Add_Characteristic
Add a characteristic to a service. Table 128. Aci_Gatt_Add_Characteristic command parameters
4.5.6 Aci_Gatt_Add_Char_Desc
Add a characteristic descriptor to a service. Table 129. Aci_Gatt_Add_Characteristic return parameters Table 130. Aci_Gatt_Add_Char_Desc
Table 131. Aci_Gatt_Add_Char_Desc command parameters
4.5.7 Aci_Gatt_Update_Char_Value
Update a characteristic value in a service. Table 132. Aci_Gatt_Add_Char_Desc return parameters Table 133. Aci_Gatt_Update_Char_Value Table 134. Aci_Gatt_Update_Char_Value command parameters the attribute while adding the characteristic.
4.5.8 Aci_Gatt_Del_Characteristic
Delete the characteristic specified from the service. Table 135. Aci_Gatt_Update_Char_Value return parameters Table 134. Aci_Gatt_Update_Char_Value command parameters (continued) Table 136. Aci_Gatt_Del_Characteristic Table 137. Aci_Gatt_Del_Characteristic command parameters
generate a command complete event.
4.5.9 Aci_Gatt_Del_Service
Delete the service specified from the GATT server database. Table 138. Aci_Gatt_Del_Characteristic return parameters Table 139. Aci_Gatt_Del_Service Table 140. Aci_Gatt_Del_Service command parameters Table 141. Aci_Gatt_Del_Service return parameters
4.5.10 Aci_Gatt_Del_Include_Service
Delete the Include definition from the service.
4.5.11 Aci_Gatt_Set_Event_Mask
It allows masking events from the GATT. The default configuration is all the events masked. Table 142. Aci_Gatt_Del_Include_Service Table 143. Aci_Gatt_Del_Include_Service command parameters Table 144. Aci_Gatt_Del_Include_Service return parameters Table 145. Aci_Gatt_Set_Event_Mask
A command complete event is generated on the completion of the command.
4.5.12 Aci_Gatt_Exchange_Configuration
Perform an ATT MTU exchange. Table 146. Aci_Gatt_Set_Event_Mask command parameters Table 147. Aci_Gatt_Set_Event_Mask return parameters Table 148. Aci_Gatt_Exchange_Configuration
4.5.13 Aci_Att_Find_Information_Req
Post the Find information request. Table 149. Aci_Gatt_Exchange_Configuration command parameters Table 150. Aci_Gatt_Exchange_Configuration return parameters Table 151. Aci_Att_Find_Information_Req Table 152. Aci_Att_Find_Information_Req command parameters
the procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.14 Att_Find_By_Type_Value_Req
Post the Find by type value request. Table 153. Aci_Att_Find_Information_Req return parameters Table 154. Att_Find_By_Type_Value_Req Table 155. Aci_Att_Find_Attr_By_Typ_And_Value_Req command parameters
of the procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.15 Aci_Att_Read_Attr_By_Type_Req
It posts the read by type request. Length of the attribute value to follow. Table 156. Aci_Att_Find_Attr_By_Typ_And_Value_Req return parameters Table 157. Aci_Att_Read_Attr_By_Type_Req
procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.16 Aci_Att_Read_By_Group_Type_Req
It posts the read by group type request. Table 158. Aci_Att_Read_Attr_By_Type_Req command parameters Table 159. Aci_Att_Find_Attr_By_Typ_And_Value_Req return parameters Table 160. Aci_Att_Read_By_Group_Type_Req
the procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.17 Aci_Att_Prepare_Write_Req
This will prepare a write of the attribute value specified. Table 161. Aci_Att_Read_Attr_By_Grp_Type_Req command parameters Table 162. Aci_Att_Read_Attr_By_Grp_Type_Req return parameters Table 163. Aci_Att_Prepare_Write_Req
procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.18 Aci_Att_Execute_Write_Req
as specified by the execute parameter. Table 164. Aci_Att_Prepare_Write_Req command parameters Table 165. Aci_Att_Prepare_Write_Req return parameters Table 166. Aci_Gatt_Execute_Write_Req
procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.19 Aci_Gatt_Disc_All_Prim_Services
Table 167. Aci_Att_Execute_Write_Req command parameters Table 168. Aci_Att_Execute_Write_Req return parameters Table 169. Aci_Gatt_Disc_All_Prim_Services Table 170. Aci_Gatt_Disc_All_Prim_Services command parameters
the procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.20 Aci_Gatt_Disc_Prim_serv_By_Uuid
Table 171. Aci_Gatt_Disc_All_Prim_Services return parameters Table 172. Aci_Gatt_Disc_Prim_serv_By_Uuid
of the procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.21 Aci_Gatt_Find_Included_Services
Start the procedure to find all included services. Table 174. Aci_Gatt_Disc_Prim_serv_By_Uuid return parameters Table 175. Aci_Gatt_Find_Included_Services Table 176. Aci_Gatt_Find_Included_Services command parameters
procedure is indicated by a Evt_Blue_Procedure_Complete event.
4.5.22 Aci_Gatt_Disc_All_Charac_Of_Serv
Start the procedure to discover all the characteristics of a given service. Table 177. Aci_Gatt_Find_Included_Services return parameters Table 178. Aci_Gatt_Disc_All_Charac_Of_Serv Table 179. Aci_Gatt_Disc_All_Charac_Of_Serv command parameters
4.5.23 Aci_Gatt_Disc_Charac_By_UUID
Start the procedure to discover all the characteristics specified by the UUID. Table 180. Aci_Gatt_Disc_All_Charac_Of_Serv return parameters Table 181. Aci_Gatt_Disc_Charac_By_UUID Table 182. Aci_Gatt_Disc_Charac_By_UUID command parameters
Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp event.
4.5.24 Aci_Gatt_Disc_All_Charac_Descriptors
Start the procedure to discover all characteristic descriptors on the server. Table 183. Aci_Gatt_Disc_Charac_By_UUID return parameters Table 184. Aci_Gatt_Disc_All_Charac_Descriptors Table 185. Aci_Gatt_Disc_All_Charac_Descriptors command parameters
completion the response packets are given through Evt_Blue_Att_Find_Info_Resp event.
4.5.25 Aci_Gatt_Read_Charac_Val
Start the procedure to read the attribute value. Table 186. Aci_Gatt_Disc_All_Charac_Descriptors return parameters Table 187. Aci_Gatt_Read_Charac_Val Table 188. Aci_Gatt_Read_Charac_Val command parameters Table 189. Aci_Gatt_Read_Charac_Val return parameters
Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp event.
4.5.26 Aci_Gatt_Read_Charac_Using_UUID
Start the procedure to read all the characteristics specified by the UUID. Table 190. Aci_Gatt_Read_Charac_Using_UUID Table 191. Aci_Gatt_Read_Charac_Using_UUID command parameters Table 192. Aci_Gatt_Read_Charac_Using_UUID return parameters
Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp event.
4.5.27 Aci_Gatt_Read_Long_Charac_Val
Start the procedure to read a long characteristic value. completion the response packets are given through Evt_Blue_Att_Read_Blob_Resp event. Table 193. Aci_Gatt_Read_Long_Charac_Val Table 194. Aci_Gatt_Read_Long_Charac_Val command parameters Table 195. Aci_Gatt_Read_Long_Charac_Val command return parameters
4.5.28 Aci_Gatt_Read_Multiple_Charac_Values
Post the Read Multiple request. Table 196. Aci_Gatt_Read_Multiple_Charac_Values Table 197. Aci_Gatt_Read_Multiple_Charac_Values command parameters Table 198. Aci_Gatt_Read_Multiple_Charac_Values return parameters
4.5.29 Aci_Gatt_Write_Charac_Val
Start the procedure to write a characteristic value. is completed, a Evt_Blue_Gatt_Procedure_Cmplt event is generated. Table 199. Aci_Gatt_Write_Charac_Val Table 201. Aci_Gatt_Write_Charac_Val return parameters
4.5.30 Aci_Gatt_Write_Long_Charac_Val
Start the procedure to write a long characteristic value. Evt_Blue_Att_Exec_Write_Resp events. Table 202. Aci_Gatt_Write_Long_Charac_Val Table 204. Aci_Gatt_Write_Long_Charac_Val return parameters
4.5.31 Aci_Gatt_Write_Charac_Reliable
Start the procedure to write a characteristic reliably. Evt_Blue_Att_Exec_Write_Resp events. Table 205. Aci_Gatt_Write_Charac_Reliable Table 207. Aci_Gatt_Write_Charac_Reliable return parameters
4.5.32 Aci_Gatt_Write_Long_Charac_Descriptor
Start the procedure to write a long characteristic descriptor. and Evt_Blue_Att_Exec_Write_Resp event. Table 208. Aci_Gatt_Write_Long_Charac_Descriptor Table 209. Aci_Gatt_Write_Long_Charac_Descriptor command parameters Table 210. Aci_Gatt_Write_Long_Charac_Descriptor return parameters
4.5.33 Aci_Gatt_Read_Long_Charac_Descriptor
Start the procedure to read a long characteristic value. completion the response packets are given through Evt_Blue_Att_Read_Blob_Resp event. Table 211. Aci_Gatt_Read_Long_Charac_Descriptor Table 212. Aci_Gatt_Read_Long_Charac_Descriptor command parameters Table 213. Aci_Gatt_Read_Long_Charac_Descriptor return parameters
4.5.34 Aci_Gatt_Write_Charac_Descriptor
Start the procedure to write a characteristic value. is completed, a Evt_Blue_Gatt_Procedure_Cmplt event is generated. Table 214. Aci_Gatt_Write_Charac_Descriptor Table 215. Aci_Gatt_Write_Charac_Descriptor command parameters Table 216. Aci_Gatt_Write_Charac_Descriptor return parameters
4.5.35 Aci_Gatt_Read_Charac_Descriptor
Start the procedure to read the descriptor specified. completion the response packet is given through Evt_Blue_Att_Read_Resp event.
4.5.36 Aci_Gatt_Write_Without_Response
Table 217. Aci_Gatt_Read_Charac_Descriptor Table 218. Aci_Gatt_Read_Charac_Descriptor command parameters Table 219. Aci_Gatt_Read_Charac_Descriptor return parameters Table 220. Aci_Gatt_Write_Without_Response
A command complete event is generated when this command is processed.
4.5.37 Aci_Gatt_Signed_Write_Without_Response
waiting for any response from the server. It cannot be used when the link is encrypted. Table 221. Aci_Gatt_Write_Without_Response command parameters Table 222. Aci_Gatt_Write_Without_Response return parameters Table 223. Aci_Gatt_Signed_Write_Without_Response
A command complete event is generated when this command is processed.
4.5.38 Aci_Gatt_Confirm_Indication
receives the event Evt_Blue_Gatt_Indication. Table 224. Aci_Gatt_Signed_Write_Without_Response command parameters Table 225. Aci_Gatt_Signed_Write_Without_Response return parameters Table 226. Aci_Gatt_Confirm_Indication Table 227. Aci_Gatt_Confirm_Indication command parameters
A command complete event is generated when this command is processed.
4.5.39 Aci_Gatt_Write_Resp
the error code has to be set to the error code that has to be passed to the client. Table 228. Aci_Gatt_Confirm_Indication return parameters Table 229. Aci_Gatt_Write_Resp Table 230. Aci_Gatt_Write_Resp command parameters Att_Val 0-N bytes Value as passed in the event Evt_Blue_Gatt_Write_Permit_req.
A command complete event is generated when this command is processed.
4.5.40 Aci_Gatt_Allow_Read
this command. The application should perform the required operations within 30 seconds. Otherwise the GATT procedure will be timeout. A command complete event is generated when this command is processed. Table 231. Aci_Gatt_Write_Resp return parameters Table 232. Aci_Gatt_Allow_Read Table 233. Aci_Gatt_Allow_Read command parameters Table 234. Aci_Gatt_Allow_Read return parameters
4.5.41 Aci_Gatt_Set_Security_Permission
setting of security permission is allowed only for client configuration descriptor. A command complete event is generated when this command is processed. Table 235. Aci_Gatt_Set_Security_Permission Table 236. Aci_Gatt_Set_Security_Permission command parameters permission has to be modified. Table 237. Aci_Gatt_Set_Security_Permission return parameters
4.5.42 Aci_Gatt_Set_Descriptor_Value
This command sets the value of the descriptor specified by Desc_handle. A command complete event is generated when this command is processed. Table 238. Aci_Gatt_Set_Descriptor_Value Table 239. Aci_Gatt_Set_Descriptor_Value command parameters Service handle 2 bytes Handle of the service which contains the descriptor. Char handle 2 bytes Handle of the characteristic which contains the descriptor. Desc handle 2 bytes Handle of the descriptor whose value has to be set. val_offset 2 bytes Offset from which the descriptor value has to be updated. Table 240. Aci_Gatt_Set_Descriptor_Value return parameters
4.5.43 Aci_Gatt_Read_Handle_Value
Reads the value of the attribute handle specified. contain the length and value of the attribute handle specified. Table 241. Aci_Gatt_Read_Handle_Value Table 242. Aci_Gatt_Read_Handle_Value command parameters Table 243. Aci_Gatt_Read_Handle_Value return parameters Value 0-N bytes Value read. The length is as specified in the Length field.
4.6 GATT VS events
4.6.1 Evt_Blue_Gatt_Attribute_modified
Table 244. GATT VS events
1 Evt_Blue_Gatt_Attribute_modified 0x03 0x01 0x0C01
2 Evt_Blue_Gatt_Procedure_Timeout 0x03 0x02 0x0C02
3 Evt_Blue_Att_Exchange_MTU_Resp 0x03 0x03 0x0C03
4 Evt_Blue_Att_Find_Information_Resp 0x03 0x04 0x0C04
5 Evt_Blue_Att_Find_By_Type_Value_Resp 0x03 0x05 0x0C05
6 Evt_Blue_Att_Read_By_Type_Resp 0x03 0x06 0x0C06
7 Evt_Blue_Att_Read_Resp 0x03 0x07 0x0C07
8 Evt_Blue_Att_Read_Blob_Resp 0x03 0x08 0x0C08
9 Evt_Blue_Att_Read_Multiple_Resp 0x03 0x09 0x0C09
10 Evt_Blue_ Att_Read_By_Group_Type_Resp 0x03 0x0A 0x0C0A
11 Evt_Blue_Att_Write_Resp 0x03 0x0B 0x0C0B
12 Evt_Blue_Att_Prepare_Write_Resp 0x03 0x0C 0x0C0C
13 Evt_Blue_Att_Exec_Write_Resp 0x03 0x0D 0x0C0D
14 Evt_Blue_Gatt_Indication 0x03 0x0E 0x0C0E
15 Evt_Blue_Gatt_notification 0x03 0x0F 0X0C0F
16 Evt_Blue_Gatt_Procedure_Complete 0x03 0x10 0X0C10
17 Evt_Blue_Gatt_Error_Response 0x03 0x11 0X0C11
18 Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp 0x03 0x12 0X0C12
19 Evt_Blue_Gatt_Write_Permit_req 0x03 0x13 0X0C13
20 Evt_Blue_Gatt_Read_Permit_Req 0x03 0x14 0X0C14
21 Evt_Blue_Gatt_Read_Multi_Permit_Req 0x03 0x15 0X0C15
Table 245. Evt_Blue_Gatt_Attribute_modified
4.6.2 Evt_Blue_Gatt_Procedure_Timeout
4.6.3 Evt_Blue_Gatt_Procedure_Complete
4.6.4 Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp
"Read using Characteristic UUID" procedure. Table 246. Evt_Blue_Gatt_Procedure_Timeout Table 247. Evt_Blue_Gatt_Procedure_Complete data_len 1 byte Will always be 1 byte. Table 248. Evt_Blue_Gatt_Disc_Read_Charac_By_UUID_Resp
4.6.5 Evt_Blue_Gatt_Write_Permit_req
only if the event bit for this event generation is set when the characteristic was added. for write can be allowed to be written and respond with the command Aci_Gatt_Write_Resp. error response will be sent to the client, with the error code as specified by the application.
4.6.6 Evt_Blue_Gatt_Read_Permit_Req
for this event generation is set when the characteristic was added. can send the response to the client. Table 249. Evt_Blue_Gatt_Write_Permit_req Table 250. Evt_Blue_Gatt_Read_Permit_Req
4.6.7 Evt_Blue_Gatt_Read_Multi_Permit_Req
event bit for this event generation is set when the characteristic was added. can send the response to the client.
4.6.8 Other GATT VS Events
Table 251. Evt_Blue_Gatt_Read_Multi_Permit_Req Table 252. Other GATT VS Events
4.7 HCI Vendor specific commands
4.7.1 HCI VS commands
- For the updater commands, i.e. OpCode with 0xFC2x, please refer to the separate document BlueNRG
- The 4 HAL_IO_XXX commands (Item 1-4) are disabled in the current release.
Table 253. HCI VS commands
1 Hal_IO_Init 0x00 0x01 0xFC01
2 Hal_IO_Configure 0x00 0x02 0xFC02
3 Hal_IO_set_bit 0x00 0x03 0xFC03
4 Hal_IO_get_bit 0x00 0x04 0xFC04
5 Write_Config_data 0x00 0x0C 0xFC0C
6 Read_Config_data 0x00 0x0D 0xFC0D
7 Set_Tx_power_level 0x00 0x0F 0xFC0F
8 Device_Standby 0x00 0x13 0xFC13
9 Number_Of_Packet_Sent_in_DirectTX 0x00 0x14 0xFC14
10 Tone_Start 0x00 0x15 0xFC15
11 Tone_Stop 0x00 0x16 0xFC16
12 Updater_Start 0x00 0x20 0xFC20
13 Updater_Reboot 0x00 0x21 0xFC21
14 Updater_Version 0x00 0x22 0xFC22
15 Updater_Buffer_Size 0x00 0x23 0xFC23
16 Updater_Erase_Blue_Flag 0x00 0x24 0xFC24
17 Updater_Reset_Blue_Flag 0x00 0x25 0xFC25
18 Updater_Erase_Sector 0x00 0x26 0xFC26
19 Updater_Program_Data_Block 0x00 0x27 0xFC27
20 Updater_Read_Data_Block 0x00 0x28 0xFC28
21 Updater_Calculate_CRC 0x00 0x29 0xFC29
22 Updater_Read_HW_Version 0x00 0x2A 0xFC2A
4.7.2 Hal_IO_Init
Initialize the GPIOs of the BlueNRG device. The controller will generate a command complete event.
4.7.3 Hal_IO_Configure
Set the direction of the GPIOs. The controller will generate a command complete event. Table 254. Hal_IO_Init Table 255. Hal_IO_Init return parameters Table 256. Hal_IO_Configure Table 257. Hal_IO_Configure command parameters Table 258. Hal_IO_Configure return parameters
4.7.4 Hal_IO_set_bit
Set the value of a given IO. The controller will generate a command complete event.
4.7.5 Hal_IO_get_bit
Table 259. Hal_IO_set_bit Table 260. Hal_IO_set_bit command parameters Index 1 byte The index of the pin to be manipulated. Table 261. Hal_IO_set_bit return parameters Table 262. Hal_IO_get_bit Table 263. Hal_IO_get_bit command parameters Index 1 byte The index of the pin to be manipulated.
The controller will generate a command complete event.
4.7.6 Write_Config_Data
directly some low level parameters for the system in the runtime. Table 264. Hal_IO_get_bit return parameters Table 265. Write_Config_Data structure will have an offset 0. Table 267. Write_Config_Data members
The controller will generate a command complete event.
4.7.7 Read_Config_Data
changes for different Offset. Select the BlueNRG roles and mode configuration. Table 268. Write_Config_Data return parameters Table 267. Write_Config_Data members (continued) Table 269. Read_Config_Data Table 270. Read_Config_Data command parameters structure will have an offset 0. Table 271. Read_Config_Data return parameters
The controller will generate a command complete event.
4.7.8 Set_Tx_power_level
power level (dBm). See the table below. command to observe the signal strength changing. another Set TX Power command, or the system reboots. Table 272. Set_Tx_power_level Table 273. Set_Tx_power_level command parameters EN_HIGH_POWER 1 byte Can be only 0 or 1. Set high power bit on or off. PA_LEVEL 1 byte Can be from 0 to 7. Set the PA level value. Table 274. Tx_power_level command parameters combination
The controller will generate a command complete event.
4.7.9 Device_Standby
wake up the device is by the external signals, e.g. a HCI command sent via SPI bus. value is ~1.5 uA in standby mode. code “command disallowed” will return. The controller will generate a command complete event. Table 275. Set_Tx_power_level return parameters Table 274. Tx_power_level command parameters combination (continued) Table 276. Device_Standby Table 277. Device_Standby return parameters
4.7.10 Number_Of_Packet_Sent_in_DirectTX
packets were sent during the Direct TX test. The controller will generate a command complete event.
4.7.11 Tone_Start
This command should not be used when normal Bluetooth activities are ongoing. The tone should be stopped by Tone_Stop command. Table 278. Number_Of_Packet_Sent_in_DirectTX Table 279. Number_Of_Packet_Sent_in_DirectTX return parameters Table 280. Tone_Start
The controller will generate a command complete event.
4.7.12 Tone_Stop
This command is used to stop the previously started Tone_Start command. The controller will generate a command complete event. Table 281. Tone_Start command parameters Table 282. Tone_Start return parameters Table 283. Tone_Stop Table 284. Tone_Stop return parameters
5 SPI interface
communication protocol over the SPI bus between the BlueNRG and the external device.
5.1 Hardware SPI interface
DataRdy_IRQ (transmit interrupt request). the silicon chip and the pin direction from the BlueNRG's side.
- The CS line is active low.
- The clock signal can go up to 8 MHz, or can go as low as 100 kHz.
- The clock is inactive low, i.e. the clock polarity CPOL = 0.
- The data is valid on clock leading edge, i.e. the clock phase CPHA = 0.
- The data transfer is always 8-bit byte based.
- For each byte, the Most Significant Bit is sent first.
Figure 9 shows how to connect BlueNRG SPI bus to an external SPI master. Table 285. SPI pins
Figure 9. SPI wire connection low, then sends the SPI clock and dummy data to read an SPI header from the BlueNRG. the communication will fail. other than those indicated as the SPI header, otherwise the communication will fail. configured as output for SPI interface.
5.2 SPI communication protocol
until the time instant when the nCS line is back to high. 5 bytes of header, and may have 0-N bytes of data.
5.2.1 Header
Figure 10. SPI header format control byte can have only the value of 0x0A (SPI write) or 0x0B (SPI read). BlueNRG are waiting for the master to read. and it should read back 5 bytes from the BlueNRG as soon as possible. real data. So the write/read action will not happen in practice.
5.2.2 Write data to BlueNRG
To write data to the BlueNRG, the SPI master must start an SPI frame to check the BlueNRG SPI header, and the following 3 conditions must be met: 1. The master sends the CTRL byte as 0x0A. 2. The slave replies with SPI READY byte as 0x02. 3. The write buffer size is bigger than 0. If so, the master can put the data bytes following the 5 header bytes on the MOSI line in the same transaction. If the master is fast enough, it may start sending data bytes immediately in the same SPI transaction where the 3 conditions are just seen satisfied. Or the master may choose to stop the SPI transaction for now, go back to prepare the data, and send them in a later SPI transaction. The SPI master is allowed to write less bytes than the write buffer size, but it is forbidden to write more. In case an ACI command packet is bigger than 128 bytes. The master has to send it in 2 SPI write transactions. The master firstly sends 128 bytes, then waiting for the write buffer to be available again, and then write the remaining bytes. The BlueNRG will count how many bytes are actually received on the MOSI line. So the master does not need to indicate how many bytes it intends to write. The write buffer size value is the data bytes of the payload. It does not include the 5 header bytes. When the master is sending real data bytes on the MOSI line, the BlueNRG will return the same amount of bytes from its own shift register. The master should ignore these bytes.
5.2.3 Read data from BlueNRG
The BlueNRG uses the IRQ pin to notify the SPI master when it has data to be read. When the SPI master sees the IRQ pin become high, it should read data from BlueNRG. The protocol is similar to SPI write. The SPI master starts a transaction to check the SPI header. The master puts 0xB in the CTRL byte, and checks again if the slave is ready (0x02), and the read buffer size is non-zero. Then the master sends certain amount of dummy bytes (e.g. 0x00 or 0xFF) on the MOSI line, while reading back the slave data from the MISO line. The reading process can happen in 1 SPI transaction or in multiple SPI transactions. The SPI master should read from BlueNRG as long as the IRQ pin is high.
5.2.4 SPI operation with BlueNRG sleep mode
The BlueNRG device is designed with a deep sleep mode, in which it turns off most of the internal functions to save power. The BlueNRG goes into sleep mode automatically when there is no Bluetooth activity ongoing. So it is very likely that the BlueNRG is sleeping when the master starts an SPI transaction. The BlueNRG wakes up as soon as the nCS line is put to low. But then it needs to initialize and prepare the SPI buffers. This will take some time. So the following sequence is likely to occur on the SPI bus: 1. The master puts the nCS line to low and the BlueNRG wakes up. BlueNRG is expecting a command within 2 ms before going to sleep. 2. The master sends the header, but the BlueNRG replies with the READY byte as 0x00 or 0xFF. This means the BlueNRG SPI interface is still not initialized. 3. The master keeps polling the BlueNRG, (releasing and asserting CS again). In order to read again the header, the SPI master has to release the CS line and assert it within 2ms from the previous CS assertion. After a while, the READY byte becomes 0x02 but both the buffer sizes are 0x00. This means the BlueNRG SPI is initialized, but the buffer is not yet prepared. 4. As soon as the buffer size becomes non-zero, the master can write data to the BlueNRG. With the measurement, the master should allow about 0.5 ms for the BlueNRG to be completely ready for the SPI communication. Note that 0.5 ms is when non-retention RAM of BlueNRG must be initialized upon wakeup (i.e. device in mode1 - slave only mode). The value can be 0.3 ms if non-retention RAM initialization is not required, which makes the SPI ready faster. This waiting operation is only needed when the SPI bus is idle for a while. If the master is continuously writing, from the 2 nd write transaction there is no need to wait, because the BlueNRG will not sleep if there is still SPI data to be processed. Also, there is no need to wait when reading from the BlueNRG, because it cannot sleep if it still holds data for the master.
6 Revision history
Table 286. Document revision history 30-May-2014 1 Initial release.