2.1 The Bluegiga Bluetooth Smart Stack ___________________________________________________ 7
2.2 The Bluegiga Bluetooth Smart SDK ____________________________________________________ 8
2.3 The BGAPI TM Protocol _____________________________________________________________ 9
2.4 The BGLIB TM Host Library _________________________________________________________ 10
2.5 The BGScript TM Scripting Language _________________________________________________ 11
2.6 The Profile Toolkit TM _____________________________________________________________ 12
3 API definition _________________________________________________________________________ 13
3.1
4 API Reference ________________________________________________________________________ 22
4.1 Attribute Client ___________________________________________________________________ 23
4.1.1 Commands--attclient ________________________________________________________ 23
4.1.2 Enumerations--attclient ______________________________________________________ 46
4.1.3 Events--attclient ____________________________________________________________ 47
4.2 Attribute Database ________________________________________________________________ 53
4.2.1 Commands--attributes _______________________________________________________ 53
4.2.2 Enumerations--attributes _____________________________________________________ 61
4.2.3 Events--attributes __________________________________________________________ 63
4.3 Connection ______________________________________________________________________ 66
4.3.1 Commands _______________________________________________________________ 66
4.3.2 Enumerations--connection ___________________________________________________ 76
4.3.3 Events--connection _________________________________________________________ 77
4.4 Generic Access Profile _____________________________________________________________ 81
4.4.1 Commands--gap ___________________________________________________________ 81
4.4.2 Enumerations--gap ________________________________________________________ 101
4.4.3 Events--gap ______________________________________________________________ 110
4.5 Hardware ______________________________________________________________________ 111
4.5.1 Commands--hardware ______________________________________________________ 111
4.5.2 Events--hardware _________________________________________________________ 142
4.6 Persistent Store _________________________________________________________________ 147
4.6.1 Commands--flash _________________________________________________________ 147
4.6.2 Events--flash _____________________________________________________________ 156
4.7 Security Manager ________________________________________________________________ 157
4.7.1 Commands--sm ___________________________________________________________ 157
4.7.2 Enumerations--sm _________________________________________________________ 168
4.7.3 Events--sm ______________________________________________________________ 171
4.8 System ________________________________________________________________________ 175
4.8.1 Commands--system _______________________________________________________ 175
4.8.2 Enumerations--system _____________________________________________________ 193
4.8.3 Events--system ___________________________________________________________ 194
4.9 Testing ________________________________________________________________________ 201
4.9.1 Commands--test __________________________________________________________ 201
4.10 Device Firmware Upgrade ________________________________________________________ 207
4.10.1 Commands--dfu __________________________________________________________ 207
4.10.2 Events--dfu _____________________________________________________________ 212
4.11 Error Codes ___________________________________________________________________ 213
4.11.1 BGAPI Errors ____________________________________________________________ 213
4.11.2 Bluetooth Errors _________________________________________________________ 214
4.11.3 Security Manager Protocol Errors ____________________________________________ 216
4.11.4 Attribute Protocol Errors ___________________________________________________ 217