TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1
Page 13 of 36
Copyright © 2011-2015 Texas Instruments, Inc
Speed and Cadence Profile. This profile also makes use of the optional Device Info Service,
which has default values that may be altered at compile or runtime to aid in identifying a specific
BLE device. This information is available in:
C:\Texas Instruments\BLE-CC254x-1.4.1\Projects\ble\Profiles\DevInfo\devinfoservice.c
The project can be opened with the following IAR workspace file:
C:\Texas Instruments\BLE-CC254x-1.4.1\Projects\ble\CyclingSensor\CC2541DB\CyclingSensor.eww
5.1 Project Overview
The project is very similar to the heart rate sensor project. The APP directory contains the
application source code and header files. The project contains two configurations:
CC2541DK-MINI Keyfob Slave: using the keyfob hardware platform.
CC2541: using the SmartRF platform.
5.1.1 User Interface
When not connected, the keyfob’s right button is used to toggle advertising on and off. When in a
connection, the keyfob’s left button cycles through different cycling speed and cadence sensor
data formats.
Holding both keys down for 5 seconds initiates a “soft reset.” This includes:
Terminate all current connections
Clearing all bond data
Clearing white list of all peer addresses
5.1.2 Basic Operation
Power up the device and press the right button to enable advertising. From a CSC collector peer
device, initiate a device discovery and connection procedure to discover and connect to the
cycling sensor. The peer device should receive a slave security request and initiate a bond.
Once bonded, the collector should discover the CSC service and configure it to enable cycling
speed and cadence measurements.
Once CSC measurement notifications have been enabled the application will begin sending data
to the peer containing simulated measurement values. Pressing the left button cycles through
different data formats as follows:
Sensor at rest (no speed or cadence detected).
Sensor detecting speed but no cadence.
Sensor detecting cadence but no speed.
Sensor detecting speed and cadence.
The application advertises using either a fast interval or a slow interval. When advertising is
initiated by a button press or when a connection is terminated due to link loss, the application will
start advertising at the fast interval for 30 seconds. If the sensor has successfully bonded to a
peer device and stored the devices address in its white list, then for the for the first 10 seconds of
advertising the sensor will only attempt to connect to any device addresses stored in its white list.
After 10 seconds, the sensor will attempt to connect to any peer device that wishes to connect.
Independent of white list use, after 30 seconds of fast interval connection, a 30 second period of
slow interval advertising passes. After this, the device sleeps and waits for the right button to be
pressed before resuming advertising again.
If the device terminates connection for any other reason, the sensor will advertise for 60 seconds
at a slow interval and then sleep if no connection is made. It will begin advertising again only if
the right button is pressed.
5.2 Software Description