Texas Instruments CC2541 User manual

Bluetooth® low energy CC2541 Advanced
Remote Control Kit
User's Guide
Literature Number: SWRU343A
April 2013–Revised June 2015

Contents
1 References.......................................................................................................................... 5
1.1 Printed Copy Included in the Box with CC2541-ARC................................................................... 5
1.2 Included with TI BLE-Stack Software Installer........................................................................... 5
1.3 Available from Bluetooth Special Interest Group (SIG)................................................................. 5
2 Introduction......................................................................................................................... 6
2.1 Kit Contents Overview ...................................................................................................... 6
2.2 System Requirements....................................................................................................... 7
2.2.1 Dongle................................................................................................................ 7
2.2.2 Windows 8........................................................................................................... 8
2.2.3 Debugging ........................................................................................................... 8
3 Using the CC2540 USB Dongle .............................................................................................. 9
3.1 Plugging the Dongle into a Computer..................................................................................... 9
3.2 Connecting to the Advanced Remote Control ........................................................................... 9
3.2.1 Pairing for the First Time .......................................................................................... 9
3.2.2 Connecting Devices Already Bonded........................................................................... 11
3.2.3 Disconnecting...................................................................................................... 11
3.2.4 Removing Long Term Bond-Data............................................................................... 11
3.2.5 LED States......................................................................................................... 11
3.2.6 Button Actions ..................................................................................................... 11
4 Connecting the Advanced Remote Control to Windows 8........................................................ 12
4.1 Adding the Advanced Remote Control .................................................................................. 12
4.2 Remove Device............................................................................................................. 15
5 Using the Advanced Remote Control.................................................................................... 17
5.1 Advertising and Connecting............................................................................................... 17
5.2 Using the Keyboard ....................................................................................................... 17
5.3 Controlling the Media Settings with Consumer Control Buttons ..................................................... 17
5.4 Using the Mouse ........................................................................................................... 18
5.5 Removing Bond Information .............................................................................................. 18
5.6 Calibrating................................................................................................................... 18
6 Programming and Debugging the CC2541 Advanced Remote.................................................. 19
6.1 Hardware Setup for Advanced Remote ................................................................................. 19
6.2 Hardware Setup for USB Dongle......................................................................................... 20
6.3 Using SmartRF Flash Programmer Software........................................................................... 22
6.3.1 Reading or Writing a Hex File to the CC2540/41 ............................................................. 23
6.3.2 Reading or Writing the CC2540/41 Device Address.......................................................... 24
6.4 Using IAR for Debugging and Programming ........................................................................... 24
6.4.1 Advance Remote Project Files .................................................................................. 25
6.4.2 HID Dongle Project Files......................................................................................... 25
7 Software Overview.............................................................................................................. 26
7.1 HID over GATT............................................................................................................. 26
7.1.1 BLE HID Terminology............................................................................................. 26
7.1.2 GATT Services .................................................................................................... 26
7.1.3 Data Flow........................................................................................................... 27
7.1.4 HID Report Overview ............................................................................................. 27
2Contents SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

www.ti.com
List of Figures
2-1. Hardware Included with the CC2541ARC................................................................................ 7
2-2. Bluetooth Devices as seen in Windows Device Manager.............................................................. 8
3-1. CC2540 USB Dongle Viewed in the Device Manager.................................................................. 9
3-2. SW1 - Clear Bonding Information SW2 - Scan and Pair With Advanced Remote Control ...................... 10
4-1. Remove Bluetooth Device ................................................................................................ 16
5-1. Advanced Remote Control................................................................................................ 17
6-1. Advanced Remote Programming Setup................................................................................. 19
6-2. CC2540 USB Dongle Connected to CC Debugger.................................................................... 21
6-3. Flash Programmer ......................................................................................................... 23
7-1. Data Flow.................................................................................................................... 27
List of Tables
3-1. LED States.................................................................................................................. 11
3-2. Button Actions .............................................................................................................. 11
6-1. Hex Image Files ............................................................................................................ 24
6-2. Advanced Remote Kit Software Projects................................................................................ 24
6-3. File Components of the Advance Remote Control Project ........................................................... 25
6-4. File Components of the HID Dongle Project............................................................................ 25
7-1. BLE HID Terminology...................................................................................................... 26
7-2. HID Profile Services........................................................................................................ 26
7-3. HID Reports................................................................................................................. 27
4List of Figures SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 1
SWRU343A–April 2013–Revised June 2015
References
The following references provide additional information on the CC2540, CC2541, the TI Bluetooth®low
energy stack (BLE-Stack™), the BLE HID over GATT profile, the HID Service, and the Bluetooth Core
Specification. Path and file references in this document assume you have installed the BLE-Stack
development kit software to the default path C:\Texas Instruments\BLE-CC254x-1.4.x\. See the release
notes in the installed BLE-Stack version for the latest updates.
1.1 Printed Copy Included in the Box with CC2541-ARC
•CC2541 Advanced Remote Control Kit Quick Start Guide (SWRU341)
1.2 Included with TI BLE-Stack Software Installer
The software installer is available for download at www.ti.com/ble-stack
•TI Bluetooth low energy Software Developer’s Guide (SWRU271)
C:\Texas Instruments\BLE-CC254x-1.4.x\Documents\TI_BLE_Software_Developer's_Guide.pdf
•TI BLE Vendor Specific HCI Reference Guide
C:\Texas Instruments\BLE-CC254x-1.4.x\Documents\TI_BLE_Vendor_Specific_HCI_Guide.pdf
•TI BLE Sample Applications Guide (SWRU297)
C:\Texas Instruments\BLE-CC254x-1.4.x\Documents\TI_BLE_Sample_Applications_Guide.pdf
1.3 Available from Bluetooth Special Interest Group (SIG)
• HID over GATT profile, Version 1.0 (27-Dec-2011)
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245141
• HID Service, Version 1.0 (27-Dec-2011)
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245140
• Specification of the Bluetooth System, Covered Core Package version: 4.0 (30-June-2010)
https://www.bluetooth.org/technical/specifications/adopted.htm
BLE-Stack, SmartRF are trademarks of Texas Instruments.
OSX is a registered trademark of Apple Inc..
Bluetooth is a registered trademark of Bluetooth SIG.
Linux is a registered trademark of Linus Torvaldis.
Windows, Windows 8, Windows 7 are registered trademarks of Microsoft Inc..
5
SWRU343A–April 2013–Revised June 2015 References
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 2
SWRU343A–April 2013–Revised June 2015
Introduction
Thank you for purchasing a TI Bluetooth low energy (BLE) Advanced Remote Control Kit. The purpose of
this document is to provide you an overview of the hardware and software included in the CC2541
Advanced Remote Control Kit (CC2541ARC).
Use the information in this guide begin with the kit. For more detailed information on BLE technology and
the TI BLE protocol stack, consult the TI Bluetooth low energy Software Developer’s Guide (SWRU271).
For more information on the HID over GATT profile (Human Interface Device over Generic Attribute
Profile), or HOGP, which is the BLE profile used to transfer HID Reports such as keyboard and mouse
keys, see the HID over GATT profile and HID Service specifications available from the Bluetooth SIG
website and listed in Section 1.3.
2.1 Kit Contents Overview
The kit contains the following hardware components, including cables:
The CC2541 Advanced Remote Control is designed to act as an HID peripheral device (BLE slave),
operating according to the specifications laid out in the HID over GATT profile. The remote comes pre-
assembled in plastic casing with rubber buttons, battery enclosure, and a hole to access the programming
header.
The advanced remote control operates on three 1.5-V alkaline AAA (LR03) batteries. Available peripheral
hardware on the board includes a buzzer, gyroscope, accelerometer, and shift registers for key scanning.
The PCB design also includes a 3.3-V LDO (TPS78330) to lower the voltage from a maximum 4.5 V to 3.3
V for use by the integrated circuits.
The CC2540 USB Dongle can emulate any Bluetooth low energy behavior, but usually acts as a central
device (BLE master) and HID host. In this kit, the dongle comes pre-loaded with firmware that acts in a
central role and as a HID service client towards the advanced remote control, and sends received input
data to emulated human interface devices (USB HID) on a connected Windows®, Linux®, or OSX
®computer.
The CC Debugger flashes the software onto both the USB dongle and the advanced remote control. The
debugger can also debug software using IAR embedded workbench.
6Introduction SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

www.ti.com
System Requirements
Figure 2-1. Hardware Included with the CC2541ARC
The RF boards in this kit are FCC- and IC-certified, and tested to comply with ETSI/R&TTE over
temperature from 0 to 35°C.
CAUTION
The kits include a non-rechargeable lithium battery. Always make sure the
battery is removed from the CC2540/41 keyfob when it is connected to an
external power source. Do not apply voltage less than 3.6 V. Dispose of the
battery properly, and keep out of the reach of children. If swallowed, contact a
physician immediately.
CAUTION
The kits contain ESD sensitive components. Handle with care to prevent
permanent damage.
2.2 System Requirements
2.2.1 Dongle
To use the CC2540 USB dongle as a bridge between the advanced remote control and a host computer,
you only need USB HID support in the operating system.
For computers without Bluetooth low energy-capable hardware and native support for the HID over GATT
profile in the operating system, use the dongle because it hides the wireless aspect from the operating
system.
Ensure the PC has a free USB port. An additional free USB port is required to use the CC debugger and
the USB dongle simultaneously.
7
SWRU343A–April 2013–Revised June 2015 Introduction
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

System Requirements
www.ti.com
2.2.2 Windows 8
Computers running Windows 8®require a Bluetooth 4.0 dual mode dongle or internal hardware, with
hardware drivers that support Bluetooth low energy. You can verify that these are supported in the
Windows device manager by checking that for a reference to Bluetooth LE Enumerator.
Figure 2-2. Bluetooth Devices as seen in Windows Device Manager
2.2.3 Debugging
You must have the IAR Embedded Workbench for 8051 development environment to make changes to
the keyfob software. You can find more information on IAR in the TI Bluetooth low energy Software
Developer’s Guide (SWRU271) .
8Introduction SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 3
SWRU343A–April 2013–Revised June 2015
Using the CC2540 USB Dongle
This section describes how the USB dongle appears to a computer running Windows 7®, how it operates,
and how to use the buttons on the dongle.
3.1 Plugging the Dongle into a Computer
As the CC2540 USB dongle comes pre-programmed with emulated HID USB endpoints. The dongle
works out of the box free of extra drivers. After the USB dongle has been discovered and configured by
Windows, several USB HID devices appear in the device manager.
Figure 3-1. CC2540 USB Dongle Viewed in the Device Manager
Figure 3-1 shows the USB dongle enumerated as a USB composite device, with four interfaces
representing the different capabilities of the advanced remote control and USB dongle:
• HID Keyboard Device
Number keys, arrow keys, OK, and Back on the advanced remote
• HID-compliant consumer control device
Volume buttons, play, pause, rewind, and similar consumer device control buttons
• HID-compliant mouse
Movement data sent from the Advanced Remote when the mouse is activated
• HID-compliant device
Control point for communication between the USB dongle firmware and applications running on the
computer. Can be used for pairing, pin codes, feedback, resetting, and so forth. Not in use by the pre-
programmed USB dongle firmware.
3.2 Connecting to the Advanced Remote Control
3.2.1 Pairing for the First Time
When the devices are programmed, they lose stored pairing information. The dongle powers up and
shows a solid red LED.
1. To initiate a connection to an ARC, press the SW2 button on the HID dongle.
9
SWRU343A–April 2013–Revised June 2015 Using the CC2540 USB Dongle
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Connecting to the Advanced Remote Control
www.ti.com
NOTE: This action causes the HID dongle to scan for an ARC for 5 seconds. While scanning, the
red LED will blink once a second.
2. Press any key on the ARC to start advertising.
NOTE: When a suitable advertisement is found, the CC2540 USB dongle connects, pairs, and
exchanges long-term bonding information with the remote, performs discovery of the
services and characteristics used by the HID over GATT profile, and enables GATT
notifications to be sent for button presses and mouse movements from the advanced remote.
The green LED lights up when the connection is alive, and the red LED blinks when data is
received. The connection is terminated to save power after the advanced remote has been
idle for 60 s.
Figure 3-2. SW1 - Clear Bonding Information
SW2 - Scan and Pair With Advanced Remote Control
Sequence:
10 Using the CC2540 USB Dongle SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

www.ti.com
Connecting to the Advanced Remote Control
1. Press SW2 to start scanning for the remote. (A blinking red LED indicates scanning.)
2. Press any key on remote to start advertising.
3. Verify a green LED, which indicates a successful connection.
3.2.2 Connecting Devices Already Bonded
If an HID dongle and an advanced remote previously paired and stored bonding data, then the HID dongle
will continuously scan for this specific advanced remote. When in this continuous scanning mode, the HID
dongle will blink the green LED once per second.
An HID dongle only stores pairing information for one remote, so other remotes will be unable to connect
to the HID dongle until the bonding info is cleared.
3.2.3 Disconnecting
Pressing SW2 on the dongle disconnects it from the advanced remote control and returns to scanning,
while retaining long-term bonding information.
Because the advanced remote and the USB dongle are bonded and notifications are enabled on the
remote, activating the advanced remote control causes it to start advertising, reconnect, and immediately
transmit the button presses recorded while disconnected.
3.2.4 Removing Long Term Bond-Data
Pressing SW1 (see Figure 3-2) while not connected erases the USB dongle's record of the long-term
bonding data stored for the advanced remote in the flash memory of the USB dongle.
This action does not affect the data stored on the advanced remote. See Chapter 5 for information on
erasing this data.
3.2.5 LED States
Table 3-1. LED States
LED Action HID Dongle State
Solid Red Idle
Blinking Red Scanning for any BLE advanced remote
Solid Green Connected
Blinking Green Scanning for previously bonded remote
3.2.6 Button Actions
Table 3-2. Button Actions
Button State Action
SW1 Idle Erase bonding info
SW2 Idle Start scanning
SW2 Connected Disconnect
11
SWRU343A–April 2013–Revised June 2015 Using the CC2540 USB Dongle
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 4
SWRU343A–April 2013–Revised June 2015
Connecting the Advanced Remote Control to Windows 8
When the Bluetooth low energy-capable hardware is installed in a Windows 8 computer and updated
drivers are installed (refer to Section 2.2.2), discover and use the advanced remote control by following
the steps below.
4.1 Adding the Advanced Remote Control
1. Click Settings.
NOTE: A new widget appears, allowing you to click on Change PC Settings.
2. Click Change PC settings.
12 Connecting the Advanced Remote Control to Windows 8 SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

www.ti.com
Adding the Advanced Remote Control
3. In the PC Settings window, choose PC and devices.
4. In PC and devices, select Bluetooth.
13
SWRU343A–April 2013–Revised June 2015 Connecting the Advanced Remote Control to Windows 8
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Adding the Advanced Remote Control
www.ti.com
5. Ensure that the Bluetooth is set to ON.
NOTE: The PC will search for Bluetooth devices.
6. Press any button on the remote to start advertising.
NOTE: The HID AdvRemote will appear in the device list.
7. Press the icon.
8. Press the Pair to pair the remote to the PC.
NOTE: A window opens with a passcode.
9. Input the passcode using the numeric buttons on the remote.
10. Press OK .
14 Connecting the Advanced Remote Control to Windows 8 SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

www.ti.com
Remove Device
NOTE: The PC and remote will start the pairing process. When finished, the remote appears as a
connected device in the device list.
NOTE: The remote stops advertising after 30 seconds. If the remote does not show up in the list,
press any button to begin advertising again.
4.2 Remove Device
To remove the remote from Windows and to delete the bond data, do the following:
1. Click the device.
2. Click Remove device
15
SWRU343A–April 2013–Revised June 2015 Connecting the Advanced Remote Control to Windows 8
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 5
SWRU343A–April 2013–Revised June 2015
Using the Advanced Remote Control
Figure 5-1. Advanced Remote Control
5.1 Advertising and Connecting
All keys, except the mouse speed and action keys, make the advanced remote advertise and become
discoverable by hosts scanning for HID-capable BLE devices.
5.2 Using the Keyboard
Pressing any number acts as a keyboard input of that number. OK acts as Enter. Back is Backspace.
The four keys surrounding OK act as directional keys.
5.3 Controlling the Media Settings with Consumer Control Buttons
Volume, Mute, Play/Pause, and so forth are consumer control keys that control the media settings on the
computer.
17
SWRU343A–April 2013–Revised June 2015 Using the Advanced Remote Control
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Using the Mouse
www.ti.com
5.4 Using the Mouse
Holding down the middle mouse button prompts the advanced remote to interpret the movement of the
remote as mouse input, and send this input to the computer.
Double-clicking the middle button locks the mouse function. The left and right buttons act as left and right
mouse buttons.
Pressing AV and –/– decreases and increases mouse speed.
5.5 Removing Bond Information
Pressing the Red action key removes the bonding information stored on the advanced remote. Pairing can
be redone using a passkey entry if applicable. If the remote is in a connection, the connection is dropped,
and the bonding information is erased.
5.6 Calibrating
1. Ensure the mouse function is off and the device is laying on a flat surface.
2. Press the Blue action key to recalibrate the onboard motion sensors.
NOTE: If the advanced remote is not ready for calibration, a high-pitched note sounds.
3. Press the blue key again
NOTE: During calibration, a low-pitched tick sounds for 12 seconds. A high-pitched note indicates
success.
18 Using the Advanced Remote Control SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated

Chapter 6
SWRU343A–April 2013–Revised June 2015
Programming and Debugging the CC2541 Advanced
Remote
The CC debugger lets you debug using the IAR Embedded Workbench for 8051. The debugger also lets
you read and write hex files to the CC2540/41 flash memory using the SmartRF™ Flash Programmer
software. The hex files are included with the installer. SmartRF Flash Programmer can also change the
IEEE address of the CC2540/41 device. This section details the hardware setup using the CC debugger
and includes information on using SmartRF Flash Programmer. You can find information on using IAR
Embedded Workbench for debugging in the TI Bluetooth low energy Software Developer’s Guide
(SWRU271).
6.1 Hardware Setup for Advanced Remote
The debug port is on the back of the remote.
• Connect the debugger as shown in Figure 6-1.
Figure 6-1. Advanced Remote Programming Setup
19
SWRU343A–April 2013–Revised June 2015 Programming and Debugging the CC2541 Advanced Remote
Submit Documentation Feedback Copyright © 2013–2015, Texas Instruments Incorporated

Hardware Setup for USB Dongle
www.ti.com
NOTE: The red stripe (pin 1) should be on the same side as the blue and 3 keys. When connected
properly, the debugger LED shows green after pressing the CC debugger reset button.
Power Savings Tip: Leaving the remote in debug mode causes extra power drain on the battery.
To exit debug mode, do the following:
1. Remove the debugger cable.
2. Power cycle the remote.
6.2 Hardware Setup for USB Dongle
The setup process for flashing the USB dongle is similar to the process of flashing the remote.
1. Connect the CC debugger to the USB dongle as shown in Figure 6-2.
20 Programming and Debugging the CC2541 Advanced Remote SWRU343A–April 2013–Revised June 2015
Submit Documentation Feedback
Copyright © 2013–2015, Texas Instruments Incorporated
Other manuals for CC2541
4
This manual suits for next models
1
Table of contents
Other Texas Instruments Remote Control manuals
Popular Remote Control manuals by other brands

Scientific Atlanta
Scientific Atlanta AllTouch AT2400 user manual

Deceptively Simple
Deceptively Simple Cue Command Instructions guide and user manual

Bang & Olufsen
Bang & Olufsen Beosound ESSENCE quick guide

NuTone
NuTone DH100 Specification sheet

Hitachi
Hitachi PC-ARFP1E Installation and operation manual

X10
X10 SuperRemote UR47A Code List