Texas Instruments 2540KEYFOB 用户手册

下载
页码 6
SWRU3XX 
December 2012 
 
 
Web sites: 
www.ti.com/ble
  
E2E Forum: 
www.ti.com/ble-forum
 
 
 
 
CC2540 Mini Development Kit Quick Start Guide
 
 
Opening the Box and Evaluating Bluetooth® Low Energy 
 
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 
. 
 
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.