Texas Instruments 2540KEYFOB User Manual

Web sites: www.ti.com/ble E2E Forum: www.ti.com/ble-forum
Kit Contents
1 x CC2540 USB dongle  1 x CC2540 Keyfob board  1 x Keyfob plastic case  1 x CC Debugger with cables  1 x CR2032 Battery  Documentation
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 kit contains ESD sensitive components. Handle with care to prevent permanent damage.
Introduction
This document will guide you through the initial steps required in order to run the pre programmed Bluetooth® low energy demo application.
You will get familiar with the hardware in the box and some of the tools that can be used for developing your own software at a later stage. For the CC2540DK-MINI, there are two ways of getting started:
1. Evaluate Using BTool. BTool is a Windows application that allows you to control a central device using the serial interface and perform various BLE functions while connected to a peripheral device, such as the CC2540 Keyfob.
2. Evaluate Using iPhone 4S/5. Apple iPhone 4S and 5 both support BT4.0 and Texas Instruments have created an iOS Application to evaluate a peripheral device, such as the CC2540 Keyfob.
Hardware Setup
First, you will need to power up the CC2540 Keyfob. When you insert the CR 2032 battery, the LED will be lit green for one second.
You can toggle Advertisements on and off by pushing the right button on the CC2540 Keyfob. During advertisement, the LED will be blinking red.
Caution! This kit includes a non-rechargeable
lithium battery. Always make sure the battery is removed from the CC2540 Keyfob when it is connected to an external power source (Do not apply voltage > 3.6V). Dispose the battery properly and keep out of the reach of children. If swallowed, contact a physician immediately.
Evaluate Using BTool
1. Download & Install BLE-Stack
The latest BLE software can be downloaded at
www.ti.com/ble-stack.
After the BLE-Stack software installation is complete, the USB Dongle driver must be associated with the device in order to use the BTool application. To associate the USB Dongle driver, you must first connect the USB Dongle to
the PC’s USB port, or to a USB hub that
connects to the PC The first time that the dongle is connected to the
PC, a message will pop-up, indicating that Windows does not recognize the device.
The driver is found in the folder Accessories\ Drivers in the default install directory. For more information on how to install the driver, please refer to the CC254XDK-MINI User Guide, found at...
2. Identify the COM Port Number
Once the driver is installed, you need to determine which COM port Windows has assigned to the USB Dongle. Right-click on “Computer”, listed in the Start Menu, and select “Properties”.
The “System Properties” window should open up,
where you can select “Device Manager”.
A list of all hardware devices should appear.
Under the section “Ports (COM & LPT)”, the
device “TI CC2540 Low-Power RF to USB CDC
Serial Port” should appear. Next to the name
should be the port number (COM#) Take note of this port number, as it will be needed
in order to use BTool.
3. Start BTool
BTool is included as part of the installation of the BLE stack and can be found in the folder \Projects\BTool in the default install directory.
When you start up BTool, you will be prompted to set port settings. Select the options below and press “OK”.
4. Connect to CC2540 Keyfob
Pressing the right button on the CC2540 Keyfob starts the advertisement. The device advertises for 30 seconds. In BTool, press SCAN button:
After the scanning is complete, choose the device to connect to and press “Establish”.
5. Button Notifications
To notify when buttons are presses on the CC2540 Keyfob, notifications need to be enabled. This is done in the “Read/Write” Tab of BTool. Simply write 01:00 to character handle 0x0048.
If a button on the CC2540 Keyfob is now pushed, notifications will be sent and can be monitored in the BTool log window.
6. Enable Accelerometer
Similar to the button notifications, the notifications for the accelerometer data can be enabled. In this example we will only enable notifications for the x-axis.
First of all, the accelerometer need to be enabled, which is done by writing 01:00 to character handle 0x0034 in the “Read/Write” tab of BTool.
To enable notifications for the x-axis, write 01:00 to character handle 0x003B. This will enable the CC2540 Keyfob to send notifications as you move it.
CC2540 Mini Development Kit Quick Start Guide
Opening the Box and Evaluating Bluetooth® Low Energy
SWRU3XX
December 2012
7. Immediate Alert
To sound the buzzer located on the CC2540 Keyfob, write the following value to handle 0x0028:
01:00 for low Alert  02:00 for high Alert  00:00 to turn off.
The buzzer will sound for 10 seconds.
8. Terminate Connection
To terminate the connection you will have three options:
Remove the battery from the CC2540
Keyfob, which will trigger a supervision timeout.
Move the CC2540 Keyfob out of range
(typically >10m), which will trigger a supervision timeout.
Press the “Terminate” button in BTool as
indicated in the image below.
9. Source Code
The project and source code files for the pre programmed application (as well as many others) are included with the Bluetooth low energy (BLE) stack from Texas Instruments, which can be downloaded at www.ti.com/ble-stack.
The project implementing this demo is called Keyfobdemo (CC2540 Slave configuration). The project can be modified as desired, and should provide a good framework for developing your own custom BLE applications.
More details on these projects can be found
within the BLE Software Developer’s Guide,
which is included with the stack. For troubleshooting please refer to the
CC254XDK-MINI User Guide, found at...
Evaluate Using iPhone 4S/5
1. Download the Application
The iPhone 4S/5 app can be downloaded via iTunes (found at www.apple.com/itunes) or App Store which are pre installed on the iPhone 4S/5.
!! This image will be updated when App released
2. Connect to CC2541 Keyfob
!! This image will be updated when App released
3. Evaluate the Application
TBD
BLE Packet Sniffer
The CC2540 USB Dongle can be used as a BLE sniffer and monitor packets while the iPhone 4S Demo is running.
The SmartRF Protocol Packet Sniffer software can be downloaded at www.ti.com/packetsniffer
SmartRF Flash Programmer
Texas Instruments has a simple tool which can be used to program and flash the CC2540.
SmartRF Flash Programmer can be downloaded at www.ti.com/tool/flash-programmer
IAR Embedded Workbench
To develop software, program, and debug the CC2540, you should use IAR Embedded Workbench for 8051.
More information on IAR EW8051, including a free evaluation version download, can be found at www.iar.com/ew8051.
BLE E2E Forum
For additional help, visit the TI Bluetooth low energy E2E forum, www.ti.com/ble-forum, for instant support during your development.
BLE Wiki
Our BLE Wiki contains application examples, guides and documentation covering those extra steps you might need help with. The Wiki is not only managed by Texas Instruments employees but also E2E community members. Anyone can share, edit and make use of the information posted here. The Wiki is found at www.ti.com/ble-
wiki.
Useful Links
TI BLE Stack and Software:
www.ti.com/ble-stack
CC2540/41 Development Kit User Guide:
www.ti.com/lit/pdf/swru ####
CC2540/41 BLE Software Developer’s Guide:
www.ti.com/lit/pdf/swru271
CC2540/41 User’s Guide:
http://www.ti.com/lit/pdf/swru191
CC2541 Product Page:
www.ti.com/cc2541
Beep
Additional Tools and Links
Loading...
+ 4 hidden pages