TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1
Page 26 of 36
Copyright © 2011-2015 Texas Instruments, Inc
Link Loss (for Proximity Profile, Reporter role; see [14] and [16])
Immediate Alert (for Proximity Profile, Reporter role and Find Me Profile, Target role; see
[14], [15], and [17])
Tx Power (for Proximity Profile, Reporter role; see [18])
Battery (see [13])
Accelerometer
SimpleKeys
The accelerometer and simple keys profiles are not aligned to official SIG profiles, but rather
serve as an example of profile service implementation. The device information service and
proximity-related services are based on adopted specifications.
12.1 Project Overview
The project structure is very similar to that of the SimpleBLEPeripheral project. The APP directory
contains the application source code and header files. The project supports the following
configurations.
- CC2540DK-MINI Keyfob Slave: using the keyfob hardware platform.
12.1.1 User Interface
There are two button inputs for this application, an LED, and buzzer.
Right Button
When not connected, this button is used to toggle advertising on and off. When in a connection,
this will register a key press which may be enabled to notify a peer device or may be read by a
peer device.
Left Button
When in a connection, this will register a key press which may be enabled to notify a peer device
or may be read by a peer device.
LED
Flash when Link Loss Alert is triggered.
Buzzer
The buzzer turns on if a Link Loss Alert is triggered.
12.1.2 Battery Operation
They KeyFob used an ADC to read remaining battery level. The battery profile allows for the USB
Dongle to read the percentage of battery remaining on the keyfob by reading the value of <
BATTERY_LEVEL_UUID>
12.1.3 Accelerometer Operation
The keyfob uses SPI to interface to a 3 axis accelerometer on the KeyFobDemo. The
accelerometer must be enabled < ACCEL_ENABLER_UUID> by writing a value of “01”. Once the
accelerometer is enabled, each axis can be configured to send notifications by writing “01 00” to
the characteristic configuration for each axis < GATT_CLIENT_CHAR_CFG_UUID>. In addition,
the values can be read by reading <ACCEL_X_UUID>, <ACCEL_Y_UUID>,<ACCEL_Z_UUID>.
12.1.4 Keys
The simple keys service on the keyfob allows the device to send notifications of key presses and
releases to a central device. The application registers with HAL to receive a callback in case HAL
detects a key change.
The peer device may read the value of the keys by reading <SK_KEYPRESSED_UUID>.
The peer device may enable key press notifications by writing a “01” to
<GATT_CLIENT_CHAR_CFG_UUID>.