Silicon Labs
TABLE OF CONTENTS
1 Introduction ....................................................................................................................................................4
2 What is Bluetooth Low Energy Technology? ...........................................................................................5
3 Typical Bluetooth 4.0 Application Architecture .......................................................................................6
3.1 Overview ...............................................................................................................................................6
3.2 What is a Profile? ..................................................................................................................................7
3.3 What Is a Service? ................................................................................................................................8
3.4 What is a Characteristic? ......................................................................................................................9
3.5 Relationship Between Profiles, Services and Characteristics ........................................................... 10
4 Introduction to the Bluegiga Bluetooth Low Energy Software ............................................................ 11
4.1 The Bluetooth Low Energy Stack ...................................................................................................... 11
4.2 The Bluetooth Low Energy SDK ........................................................................................................ 11
4.3 The BGAPI Protocol .......................................................................................................................... 13
4.4 The BGLib Host Library ..................................................................................................................... 14
4.5 BGScriptTM Scripting Language ......................................................................................................... 15
4.6 The Profile Toolkit .............................................................................................................................. 16
5 Implementation of “BGDemo” Sensor ................................................................................................... 17
5.1 Installing the Tools ............................................................................................................................. 18
5.2 Creating a Project .............................................................................................................................. 19
5.3 Hardware Configuration ..................................................................................................................... 20
5.4 Building a GATT Database with Profile Toolkit .................................................................................. 21
5.4.1 Generic Access Profile Service ..................................................................................................... 21
5.4.2 Device ID ....................................................................................................................................... 23
5.4.3 A Manufacturer Specific Service.................................................................................................... 24
5.5 Writing BGScript Code ....................................................................................................................... 25
5.6 Compiling and Installing the Firmware .............................................................................................. 27
5.6.1 Using BLE Update tool .................................................................................................................. 27
5.6.2 Compiling Using bgbuild.exe ......................................................................................................... 29
5.6.3 Installing the firmware with TI’s Flash Tool .................................................................................... 30
6 Testing the BGDemo Sensor ................................................................................................................... 31
6.1 Using BLEGUI ................................................................................................................................... 31
6.1.1 Discovering the BGDemo Sensor .................................................................................................. 31
6.1.2 Establishing a Connection ............................................................................................................. 32
6.1.3 Making GATT Service Discovery ................................................................................................... 33
6.1.4 Reading the Serial Number String ................................................................................................. 34
6.2 Reading and Writing the Manufacturer Specific Service ................................................................... 36