Silicon Labs DKBT Factory Demo Walkthrough Quick start guide

Type
Quick start guide
BT121 Bluetooth
®
Smart Ready Module Factory Demo Walkthrough
May 2015
2 Silicon Labs Confidential
TOPICS
Getting started
The DKBT development Kit
The project file
Hardware configuration
Bluetooth BR/EDR profiles
Bluetooth GATT database
The BGScript code
Compiling and installing firmware
BGTool test application
3 Silicon Labs Confidential
Download the SDK and Quick Start from:
www.bluegiga.com/bt121
Follow the instructions on the Quick Start
to see how the demo works
The demo is pre-installed on the DKBT
development kits when they are delivered and
also included in the SDK
Folder: examples/bgdemo
Getting Started
4 Silicon Labs Confidential
The DKBT Development Kit
The carrier board:
Contains the BT121 module
The main board:
Contains peripherals like Accelerometer, Altimeter,
display
Current measurement ports
Power supply
USB-to-Serial
Button and leds
The demo uses:
BT121 running a BGScript application
Display connected via SPI
Altimeter connected via I2C
USB-to-Serial for PC connectivity and SPP data
See: Development Kit User Guide for details
5 Silicon Labs Confidential
The Project File
Project file defines all the components included in the
project
<gatt> Bluetooth Smart service (GATT) database
<hardware> Hardware interfaces configuration
<sdp> Bluetooth BR/EDR profile configuration
<scripting> BGScript code (if used)
<image> Firmware output binaries
See: Configuration Guide for details
6 Silicon Labs Confidential
The Hardware Config
Host and peripheral interface configuration
<sleep> Sleep mode configuration
<uart> UART host or peripheral interface settings
bgapi = true (UART used for host)
bgapi = false (UART used for peripherals)
For host comms. RTS/CTS is mandatory
<spi> SPI peripheral interface settings
<port> GPIO configuration
<i2c> I2C peripheral interface settings
See: Configuration Guide for details
7 Silicon Labs Confidential
The Bluetooth BR/EDR Services
The Bluetooth BR/EDR services need to be defined in
the so called SDP database (Service Discovery Protocol)
<ServiceClassIDList> Service UUID
1101 = Serial Port Profile
<Protocol> RFCOMM channel assignment
5 = RFCOMM channel 5
<ServiceName> Service Name
Shown f.ex by Windows
See: Configuration Guide for details
8 Silicon Labs Confidential
The Bluetooth BR/EDR Services
Device ID Service = Device identity
<UINT16 value="0201"/> Vendor ID parameter
<UINT16 value="0047"/> Vendor ID value
<UINT16 value=“0202"/> Product ID parameter
<UINT16 value=“1234"/> Product ID value
<UINT16 value=“0205"/> Source of Vendor ID
<UINT16 value=“0001"/> Bluetooth ORG
0002 = USB
See: Configuration Guide for details
9 Silicon Labs Confidential
The GATT Database
The GATT database defines the services and data for
Bluetooth Smart
Services describe which kind of data the device
exposes
Heart Rate Service
Proximity service
Characteristics define the actual data
Type
Length
Characteristics properties define the access and
security properties
Read, write, indicate, notify
Open, authenticated, encrypted
See: Profile Toolkit Developer Guide for details
10 Silicon Labs Confidential
The GATT Database
The GATT database define the services and data for
Bluetooth Smart
<service> The service definition
uuid = Service UUID
16-bit = Standardized
128-bit = Vendor specific
<characteristic> The data definition
uuid = characteristic UUID
16-bit = Standardized
128-bit = Vendor specific
<properties> Characteristic properties
read, write, indicate, notify
const = constant (fixed) values
<value> The actual data
type = hex or UTF-8
See: Profile Toolkit Developer Guide for details
11 Silicon Labs Confidential
The BGScript Code
BGScript is used to implement the application
event system_boot(...)
Like main() function in C
Always generated on power-up
call function_name(parameter) (return value)
Used to run a function
Parameters given inside brackets
Return values (if any) returned right away
event event_handler(parameters)
Usually generated by a function call
Or events like a Bluetooth connection,
ADC read, software timer
Write the application code in the event handler
12 Silicon Labs Confidential
Compiling and Installing Firmware
Compiling from command line:
SDK includes BGBuild compiler for the firmware
Compiles the Bluetooth stack, hardware configuration,
BR/EDR services, GATT database and BGScript (optional)
into a firmware image
Syntax : bgbuild.exe <project file>
Firmware update from command line:
SDK includes BGUpdate.exe tool to perform a DFU update
Uploads the firmware image to the module over UART
Syntax : bgupdate.exe <COM port> <project file>
13 Silicon Labs Confidential
BGTool Test Application
BGTool can be used to test the BT121 using the
BGAPI serial protocol.
You can make device discovery
Bluetooth connections
Bluetooth security
Data exchange
Firmware updates over UART
BGTool is included in the SDK.
To use BT121 with BGTool you need to install a
correct firmware into the module, which included
in the SDK
Folder: examples/bt121
Thank You
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14

Silicon Labs DKBT Factory Demo Walkthrough Quick start guide

Type
Quick start guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI