Skip to end of metadata
Go to start of metadata

Document Revision
Document number: 9142285
Release: Jan 29, 2014 09:42
Document version: 12

Abstract

This document describes the cB-OLP425i-26-A Development Kit and how it is used to develop Bluetooth Low Energy applications.

The cB-OLP425 is based on the CC2540 Bluetooth Low Energy SoC from Texas Instruments and the tools and software for the CC2540 is used when developing applications for the cB-OLP425. This document describes the tools and software required to start development for the cB-OLP425. It also describes the sensors specific for the cB-OLP425 and the demo application that is used to show its functionality. This document is not an introduction to Bluetooth Low Energy or the Texas Instruments software development kit. Please read the CC2540 Bluetooth Low Energy Developers Guide from Texas Instruments to get an overview of the CC2540 and the development environment.

Table of Content

Related Documents

  1. The cB-OLx425 Electrical Mechanical Data Sheet contains important information about the electrical and mechanical characteristics of the cB-OLP425 hardware.
  2. Texas Instruments CC2540 Bluetooth Low Energy Developers Guide (SWRU271)
  3. The cB-ACC-73 CC Debugger Adapter Board - User Guide describes how to use the CC debugger adapter board to connect the OLP425 to the CC debugger

Development Kit Contents

After January 25, 2013:

Name

Qty

Description

 

cB-OLP425i-26

1

OEM Bluetooth Low Energy Platform Module 425 with internal antenna, JST connector, LEDs, temperature sensor, accelerometer and CR1632 battery holder

CC debugger adapter board with configuration jumper
(cB-ACC-73)

1

The CC debugger adapter board and JST to JST crossover cable connects the cB-OLP425i-26 module to the CC debugger for programming and debugging.

JST to JST crossover cable
(cB-ACC-74)

1

The CC debugger adapter board and JST to JST crossover cable connects the cB-OLP425i-26 module to the CC debugger for programming and debugging.

Support info sheet

1

Info sheet with information about where to find documentation, software, tools etc.


Before January 25, 2013:

Name

Qty

Description

 

cB-OLP425i-26

1

OEM Low Energy Platform 425 with internal antenna, JST connector, LEDs, temperature sensor, accelerometer and CR1632 battery holder

CC debugger adapter cable
(cB-ACC-71)

1

Debug adapter cable for connecting the cB-OLP425i-26 module to the CC debugger

cB-OLP425 Development Kit Getting Started

1

This document

 
Additional hardware and software required

Please note that besides the cB-OLP425 development kit you will also need additional hardware and software to get started with your application development. See the section Gettting started with Application Development below for more information.

Getting started with Application Development

To get started with application development for the cB-OLP425 you need tools and software from Texas Instruments and the IAR Embedded Workbench IDE from IAR Systems. List of tools and software:

Name

Description

Where

CC2540 BLE Software

Software Development Kit for the CC2540 including documentation, tools and sample applications.

http://www.ti.com/blestack

CC2540 Mini Development Kit

This kit includes a debugger, USB dongle and keyfob hw for the CC2540. The debugger included in this kit is used also to debug the cB-OLP425. The USB Dongle can be used to test the cB-OLP425. The sample applications for the keyfob hw can, with minor changes be executed on the cB-OLP425. The kit can be ordered online from Texas Instruments.

http://www.ti.com/tool/cc2540dk-mini#buy

IAR Embedded Workbench
for 8051

This IDE from IAR Systems is used to build and debug applications for the cB-OLP425. The project files and sample applications in the SDK for the CC2540 as well as the demo application for the cB-OLP425 are built using this tool.

For version current version (v1.4.0) of the SDK for the CC2540, version 8.20 of IAR Workbench must be used:

http://supp.iar.com/Download/SW/?item=EW8051-EVAL-820

Latest version of IAR Workbench:

http://supp.iar.com/Download/SW/?item=EW8051-EVAL

cB-OLP425 Development Kit

The development kit for the cB-OLP425 includes one cB-OLP425 device and adapters to connect the CC Debugger to the cB-OLP425 module.

http://www.connectblue.com/contact/where-to-buy/where-to-buy/

cB-OLP425
Software Development Kit (SDK)

The zip-archive includes the source for the demo application and drivers for the cB-OLP425 sensors.

http://support.connectblue.com/display/PRODBTPLA/cB-OLP425+SDK

cB-OLP425 iPhone appThe cB-OLP425 iPhone app allows for easy evaluation of  the cB-OLP425 with the supplied demo firmware. All the sensors and LEDs are accessible from the app. The app can be made available in source code for developers of custom specific code for the cB-OLP425.https://itunes.apple.com/app/cb-olp425/id575523395
mtOLP425 Android AppAndroid app for the cB-OLP425. The sensors and LEDs are accessable from the app. The app can be made available in source code for developers of custom specific code for the cB-OLP425.https://play.google.com/store/apps/details?id=com.mithings.mtOLP425

The demo application implements the BLE peripheral role and is a good starting point for an application that is using the sensors on the cB-OLP425. The CC2540 BLE Software from Texas Instruments contains many different sample applications that with minor modifications can be run on the cB-OLP425. Typically any hardware specific functionality must be removed from the sample of interest. Another approach can be to add the services of interest to the demo application for the cB-OLP425. The demo application only supports the peripheral role. For an application that shall run the central role please refer to the samples in the CC2540 BLE Software.

Installation of cB-OLP425 SDK zip-archive

Extract the cB-OLP425 SDK zip-archive into the installation folder for the Texas Instruments CC2540 BLE Software Development Kit. The figure below shows the dialog with the default installation folder for the CC2540 SDK. Note that the CC2540 BLE Software shall be installed before the cB-OLP425 SDK is installed.

Note that the figure shows the path to a specific version of the CC2540/CC2541 BLE Software. For the installation of the cB-OLP425 select the path to the latest version installed.

cB-OLP425 Hardware

The cB-OLP425 is based on the CC2540 which is a SoC solution from Texas Instruments. It combines a 2.4GHz transceiver, micro-controller, 256kB of in-system programmable flash memory, 8kB of RAM and peripherals. In addition to the peripherals integrated in the CC2540 SoC, the cB-OLP425 includes a temperature sensor and an accelerometer. The details of the cB-OLP425 is described in cB-OLx425 Electrical Mechanical Data Sheet. An overview is given by the block diagram below.

Block Diagram cB-OLP425

JST Connector

The JST connector is used only for power supply and debug. No UART signals are available on the JST connector. 

Using the cB-ACC-73 and cB-ACC-74 debug adapter board and cable

By using the supplied jumper the cB-ACC-73 CC debugger adapter board can be configured for different ways to power supply the OLP425 when connected to the CC debugger. Please see the cB-ACC-73 CC Debugger Adapter Board - User Guide for more information.

Using the cB-ACC-71 debug cable

The cB-ACC-71 debug adapter cable included in the Development kit SHALL NOT be connected to the OLP425 if the OLP425 at the same time is voltage supplied from another source e.g. a battery. A voltage supply collision will occur which could damage the electronics/battery because the CC Debugger also includes a voltage supply pin (CC-D pin 9) which is connected to the voltage supply pin on the J8 JST connector (JST pin 2) via the adapter cable. The CC-D pin 9 (not CC-D pin 2 which is a target voltage sense pin) from the CC Debugger should be detached in the adapter cable if the OLP425 is voltage supplied from another source.

In other words, remove the battery when the CC Debugger is connected to the cB-OLP425 using the cB-ACC-71 debug adapter cable.

 

cB-OLP425 Sensors

The cB-OLP425 contains an LIS3DH accelerometer from STMicroelectronics and and a TMP112 temperature sensor from Texas Instruments. Communication with the sensors are implemented using I2C. Drivers for the sensors are part of the demo application source code. The configuration of the sensors set in the demo application can be modified to suit a specific application. Useful application notes that describe how to configure the sensors are available from the sensor manufacturers. The files listed below are included in the cB-OLP425 zip-archive.

Sensor

Description

Driver source file

LIS3DH

3 axis accelerometer from STMicroelectronics

cb_lis3dh.c 
cb_lis3dh.h 

TMP112

Temperature sensor from Texas Instruments

cb_tmp112.c 
cb_tmp112.h

Development Environment

Application firmware for the cB-OLP425 is developed using the IAR Embedded Workbench for 8051. See the CC2540 Bluetooth Low Energy Developers Guide for details.

Demo Application

At delivery the cB-OLP425 contains a demo application that implements some standard BLE services and some device specific services to demonstrate the sensors and LEDs. This demo application is based on the keyfob demo part of the SDK for the CC2540 with changes to suit the cB-OLP425 hardware.

The following services are implemented:

  • Device Information Service (Part of TI Keyfob sample)
  • Battery Service (Part of TI Keyfob sample)
  • LED Service (Manufacturer / connectBlue Specific)
  • Temperature Service (Manufacturer / connectBlue Specific)
  • Accelerometer Service (Manufacturer / connectBlue Specific)

At start the demo application enters advertising state for 3min. After 3min advertising is stopped and the device enters sleep mode. The accelerometer is used to wake up the device. If the device is moved the accelerometer will wake it up and it will enter advertising state for  3min. The accelerometer can also be read using the accelerometer service. 

File list

File

Description

cb_demo.c
cb_demo.h

Demo application initialization and event handling

main.c

System initialization

OSAL_init.c

OSAL initialization

devinfoservice.c

Implementation of device info service for demo application

cb_assert_handler.c
cb_assert_handler.h

Application assert handling

cb_snv_ids.h

Application specific snv ids definition

cb_led_service.c
cb_led_service.h

Implementation of LED service

cb_temperature_service.c
cb_temperature_service.h

Implementation of temperature service

cb_serial_service.c
cb_serial_service.h
Implementation of serial service

cb_peripheral.c

Same as peripheral.c but including a fix for automatic parameter update with iPhone.

cb_led.c
cb_led.h

Implementation of LED functionality

cb_hw.c
cb_hw.h

cB-OLP425 specific HW initialization

cb_pio.c
cb_pio.h

IO pin functionality

cb_swi2c_master.c
cb_swi2c_master.h

I2C implementation

cb_tmp112.c
cb_tmp112.h

Driver for TMP112 temperature sensor

cb_lis3dh.c
cb_lis3dh.h

Driver for LIS3DH accelerometer

cb_log.c
cb_log.h

Logging functionality

cb_ble_serial.c
cb_ble_serial.h
Implementation of serial data handling using the serial service
cb_buffer.c
cb_buffer.h
Implementation of circular buffer handling

cb_assert.h

Definition of assert functionality

Services

LED Service (Service UUID: 0xFFD0)

The LED service is used to control the red and green LEDs of the cB-OLP425.

Characteristic

UUID

Type

Prop

Description

Red LED

0xFFD1

byte

Read
Write

0x00: LED off (default)
0x01: LED on

Green LED

0xFFD2

byte

Read
Write

0x00: LED off (default)
0x01: LED on

Temperature Service (Service UUID: 0xFFE0)

The temperature service is used to read the temperature sensor on the cB-OLP425. Notifications or indications can be enabled.

Characteristic

UUID

Type

Prop

Description

Temperature

0xFFE1

int8

Read
Indication
Notification

Temperature in Celsius. If enabled indications and notifications will be sent when the temperature changes.

Accelerometer Service (Service UUID: 0xFFA0)

The accelerometer service is used to monitor the status of the accelerometer on the cB-OLP425.

Characteristic

UUID

Type

 

Description

Range

0xFFA2

byte

Read

The range of the accelerometer. 
20 = 2G (default) This is a read only attribute.

X

0xFFA3

int8

Indication
Notification

Acceleration in X-direction. -2G to 2G. If enable notifications or indications and will be sent when the acceleration is changed.

Y

0xFFA4

int8

Indication
Notification

Acceleration in Y-direction. -2G to 2G. If enable notifications or indications and will be sent when the acceleration is changed.

Z

0xFFA5

int8

Indication
Notification

Acceleration in Z-direction. -2G to 2G. If enable notifications or indications and will be sent when the acceleration is changed

Build and Download Application

Connect the CC Debugger to the cB-OLP425 using the cB-ACC-73 and cB-ACC-74 (or alternatively cB-ACC-71). (warning)The battery shall be removed if the CC Debugger is connected with the cB-ACC-71 debug cable. The IAR Embedded workbench file Demo.eww contains the workspace for the demo application. The figure below shows IAR Embedded Workbench in debug mode.

Getting started with the Demo Application

The cB-OLP425 is at delivery loaded with a demo application. The application starts when the battery is inserted into the battery holder of the cB-OLP425. If no battery is available you can use the debugger to power the device using the cB-ACC-73 and cB-ACC-74 (or alternatively cB-ACC-71). See the cB-ACC-73 CC Debugger Adapter Board - User Guide for information on how to configure the cB-ACC-73. The red LED will flash three times when the application starts. The application wakes up and enters advertising state when the accelerometer on the cB-OLP425 detects a movement. When in advertising state the device be can found using scan and it accepts connections from other Bluetooth Low Energy Devices.

The CC2540DK Dongle and the BTool application part of the Texas Instruments mini development kit can be used to scan for and connect to the cB-OLP425 and to toggle the green LED of the cB-OLP425. To do this follow the steps below:

1. Insert the battery into the battery holder of the cB-OLP425. The red LED will flash three times when the application starts.
2. Scan for the cB-OLP425 using the BTool application. The demo application will enter advertising state for 3min every time the accelerometer detects a movements. Use the Scan button to start the scan.
3. Connect to the cB-OLP425 using the BTool. During the scan the device is found and the slave address field in the BTool is updated automatically. Use the Establish button to initiate the connection. Note that the address in the Slave BDA field will be unique for your specific device.

4. Now a connection is established but the characteristic value handle for the green LED is needed for the write operation.
4a. Switch to the Read/Write tab.
4b. For the Characteristic Read operation, enter the characteristic UUID for the green led (0xFFD2) in the Characteristic UUID field and press the Read button. Note that the characteristic UUID  is written as D2:FF. The response contains the characteristic value handle.
4c. For the Characteristic Write operation, enter the characteristic value handle.
4d. In the value field, enter 1 to enable the green LED. Enter value 0 to disable it.

Debug adapter and cable

The CC-Debugger can be connected to the JST connector on the OLP425 module using the cB-ACC-73 and cB-ACC-74 which are included in the cB-OLP425 Development Kit (or cB-ACC-71 which was included in the kit before January 25, 2013). cB-ACC-71 was replaced by cB-ACC-73 and cB-ACC-74 in January 25, 2013.

For information about the cB-ACC-73 and cB-ACC-74 please see the document cB-ACC-73 CC Debugger Adapter Board - User Guide

Using the cB-ACC-71 debug cable

The cB-ACC-71 debug adapter cable included in the Development kit SHALL NOT be connected to the OLP425 if the OLP425 at the same time is voltage supplied from another source e.g. a battery. A voltage supply collision will occur which could damage the electronics/battery because the CC Debugger also includes a voltage supply pin (CC-D pin 9) which is connected to the voltage supply pin on the J8 JST connector (JST pin 2) via the adapter cable. The CC-D pin 9 (not CC-D pin 2 which is a target voltage sense pin) from the CC Debugger should be detached in the adapter cable if the OLP425 is voltage supplied from another source.

In other words, remove the battery when the CC Debugger is connected to the cB-OLP425 with the cB-ACC-71 debug adapter cable.

CC Debugger Adapter Board
cB-ACC-73

JST to JST cross-over cable
cB-ACC-74

CC Debugger Adapter Cable
cB-ACC-71

 

The table below describes how to assemble your own debug adapter cable (cB-ACC-71) for connecting the cB-OLP425 directly to the CC debugger.

Signal

Pin on JST

Pin on CC Debugger 2x5 2.54mm connector

GND

1

1

V supply

2

2 and 9

Debug Clk (DC)

3

3

Debug Data (DD)

4

4

Reset-n

5

7

Port 0-0

6

NC

Support

For questions regarding the cB-OLP425 please contact support@connectblue.com. Note that the support will only handle issues with the cB-OLP425 HW or the functionality specific for the cB-OLP425. General questions on Bluetooth Low Energy or the hardware or software parts provided by Texas Instruments will not be handled.

Customer Specific Firmware

On request the cB-OLP425 can be programmed with a customer specific firmware in the production line at connectBlue. This shall only be considered for quantities exceeding 5k a year. The production test sequence is divided into two steps. In the first step the functionality of the hardware is verified. In the second step the device is programmed with the customer specific firmware. No test are done after the device has been programmed with the customer specific firmware.

If this is of interest please contact your sales representative or contact support@connectblue.com