SWRU301 TABLE OF CONTENTS REFERENCES............................4 CC2540DK ................4 RINTED NCLUDED IN THE OX WITH CC2541EMK ................4 RINTED NCLUDED IN THE OX WITH ........4 NCLUDED WITH EXAS NSTRUMENTS LUETOOTH NERGY OFTWARE NSTALLER (SIG) ..............4 VAILABLE FROM LUETOOTH PECIAL NTEREST ROUP...
SWRU301 1. References The following references provide additional information on the CC2540/41, the Texas Instruments Bluetooth® low energy (BLE) stack and the BLE specification in general. (All path and file references in this document assume that the BLE development kit software has been installed to the default path C:\Texas Instruments\BLE-CC254X-1.1B\)
Thank you for purchasing a Texas Instruments (TI) Bluetooth® low energy (BLE) Kit. The purpose of this document is to give an overview of the hardware and software included in the CC2540 Development Kit (CC2540DK) and the add-on CC2541 Evaluation Module Kit (CC2541EMK).
From a hardware standpoint, the Windows PC must contain at least one, and up to three, free USB ports. With one free port, a single CC2540/41 device can be flashed or debugged, or the BLE sniffer can be used. In order to simultaneously flash or debug both evaluation modules (EMs) while running the BLE sniffer software, three USB ports are required.
SimpleBLEPeripheral application. The LCD screens on the two SmartRF05EBs should display messages similar to those below: The “0x…” value displayed on each board is the device address. Every CC2540/41 device has a unique address. 3.5 Using the Joystick The SimpleBLEPeripheral application runs autonomously and does not require any user interaction.
SWRU301 3.6 Device Discovery Before the two devices can connect, the central device must first discover the peripheral device. To perform device discovery, press up on joystick U1 once. The LCD on the central device should display “Discovering…”. After a few seconds, it should display “Devices Found 1 / <- To Select”. This means that the central device successfully discovered the peripheral.
3.13 SimpleBLE Demo Source Code The project and source code files for these applications (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/blestack. The two projects implementing this demo are called SimpleBLECentral (Master configuration) and SimpleBLEPeripheral (Slave configuration).
Texas Instruments Bluetooth® Low Energy Software Developer’s Guide [3]. More information on the HCI interface, as well as details on the HCI vendor specific commands that are used by the CC2540/41, can be found in the TI BLE Vendor Specific HCI Reference Guide [4].
SWRU301 4.2 Determining the COM Port You will need to know which COM port Windows has assigned to the serial port. To find out, right-click on the “Computer” icon on your Start and select “Properties”, shown in Figure 4. Figure 4 Win7 PC, Finding Computer Properties The “System”...
4.3 Starting the Application To start the application go into your programs by choosing Start > All Programs > Texas Instruments > Bluetooth-LE-1.1b > BTool. On Start-up you should be able to set the Serial Port Settings. Set the “Port”...
SWRU301 4.4 Creating a BLE Connection between Central and Peripheral Devices At this point the central device (connected to the PC) is ready to discover other BLE devices that are advertising. If you have left the SimpleBLEPeripheral application running on one SmartRF05EB, you should be ready to use BTool.
SWRU301 4.4.2 Selecting Connection Parameters Before establishing a connection, you will want to set up the desired connection parameters. The default values of 100ms connection interval, 0 slave latency, and 20000ms supervision timeout should serve as a good starting point; however for different applications you may want to experiment with these values. Once the desired values have been set, be sure to click the “Set”...
The SimpleBLEPeripheral software contains one sample GATT service profile (More information on the SimpleGATTProfile can be found in the Texas Instruments Bluetooth® Low Energy Software Developer’s Guide [3]). GATT services contain data values known as “characteristic values”. All application data that is being sent or received in BLE must be contained within characteristic value.
SWRU301 Figure 17 SimpleBLEPeripheral Attribute Table 4.5.1 Reading a Characteristic Value by UUID The first characteristic of the SimpleGATTProfile service has both read and write permissions, and has a UUID of 0xFFF1. The simplest way to read its value is to use the “Read Characteristic by UUID” sub- procedure.
SWRU301 Figure 18 BTool, Read a Characteristic Value by UUID 4.5.2 Writing a Characteristic Value In the previous section, the handle of the first characteristic in the SimpleGATTProfile was found to be 0x0022. Knowing this, and based on the fact that the characteristic has both read and write permissions, it is possible for us to write a new value.
SWRU301 The LCD screen on the peripheral SmartRF05EB should display “Char 1:”, and the value written in decimal format. 4.5.3 Reading a Characteristic Value by Handle After writing a new value to the first characteristic in the profile, we can read the value back to verify the write.
SWRU301 Figure 21 BTool, Discover a Characteristic by UUID 4.5.5 Reading Multiple Characteristic Values It is also possible to read multiple characteristic values with one request, as long as the handle of each value is known. To read the values of both of the characteristics that we previously read, select the option “Read Multiple Characteristic Values”...
SWRU301 Figure 22 BTool, Read Multiple Characteristic Values 4.5.6 Enabling Notifications In BLE, it is possible for a GATT server device to “push” characteristic value data out to a client device, without being prompted with a read request. This process is called a “characteristic value notification”. Notifications are useful in that they allow a device in a BLE connection to send out as much or as little data as required at any point in time.
Page 22
SWRU301 Figure 23 BTool, Enable Notifications The value should be “03” in each notification, since it is copied from the value of the third characteristic in the profile (which has a default value of 3). The third characteristic has write-only properties, and therefore can be changed.
GATT characteristic definition, the UUID values, and the functional behavior, was developed by Texas Instruments for use with the CC2540DK or CC2542EMK development kit, and is intended as a demonstration of the capabilities of the Bluetooth low energy protocol.
Since the SimpleBLEPeripheral does not have a file system, it is simply storing the data in the nonvolatile memory of the CC2540/41. More information on the bond manager can be found in Texas Instruments Bluetooth® Low Energy Software Developer’s Guide [3].
Page 25
SWRU301 With a bond now active, you can enable notifications of a characteristic value and have that setting remembered for later. Note that if notifications were enabled before going through the pairing process, then the setting will not be stored. Therefore, you will need to re-write the value “01:00” to a client characteristic configuration descriptor.
Blood Pressure Sensor- with simulated measurements Heart Rate Sensor- with simulated measurements Health Thermometer- with simulated measurements More information on these projects can be found in Texas Instruments BLE Sample Applications Guide [5]. Page 26 of 32...
1.11.1 Rev. M), which is available at the following URL: http://focus.ti.com/docs/toolsw/folders/print/flash-programmer.html To start the application go into your programs by choosing Start > Programs > Texas Instruments > SmartRF Flash Programmer > SmartRF Flash Programmer. The program should open up the following...
SWRU301 If the action completes successfully, you should see the progress bar at the bottom of the window fill up, and either one of the following two messages, depending on whether a write or a read was performed: “CC254x – ID8008: Erase, program and verify OK” or “CC254x – ID8008: Flash read OK”. You may see the following error message: Figure 31 If this comes up, it most likely means that you have IAR open and are debugging.
Page 29
SWRU301 Figure 32 Note that every time you re-program the device using SmartRF Flash Programmer, the secondary address of the device will get set to FF:FF:FF:FF:FF:FF. This can be avoided by selecting the option “Retain IEEE address when reprogramming the chip”. A similar situation exists when a device is reprogrammed through IAR Embedded Workbench, in that the secondary address will get set to FF:FF:FF:FF:FF:FF each time.
SWRU301 6. SmartRF™ Packet Sniffer The SmartRF™ Packet Sniffer is a PC software application used to display and store RF packets captured with a listening RF hardware node. Various RF protocols are supported, included BLE. The Packet Sniffer filters and decodes packets and displays them in a convenient way, with options for filtering and storage to a binary file format.
SWRU301 7. General Information 7.1 Document History Revision Date Description/Changes SWRU301 2011-08-22 Initial release with BLE software release v1.1 SWRU301A 2012-01-10 Updated with CC2541EMK , for BLE software release v1.1b Page 31 of 32...
Page 32
SWRU301 Appendix A Schematics CC2540/41 Evaluation Module Page 32 of 32...
Page 34
C_1N_0402_NP0_J_50 SMD_SOCKET_2X10 FIDUCIAL_MARK_1MM FIDUCIAL_MARK_1MM TESTPOINT_CIRCLE_40MILS P0.5 P1.2 P2.0 TESTPOINT_CIRCLE_40MILS For comparator test P0.4 In - P0.5 In + CONTRACT NO. COMPANY NAME Texas Instruments APPROVALS DATE CC2541EM DRAWN SIZE FSCM NO. DWG NO. REV. CHECKED 1.1.0 ISSUED 1 (1) SCALE...
Page 35
Any exceptions to this is strictly prohibited and unauthorized by Texas Instruments unless user has obtained appropriate experimental/development licenses from local regulatory authorities, which is responsibility of user including its acceptable authorization.
Page 36
REGULATORY COMPLIANCE INFORMATION (continued) FCC Interference Statement for Class B EVM devices This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.
Page 37
Japan with respect to this product. Also, please do not transfer this product, unless you give the same notice above to the transferee. Please note that if you could not follow the instructions above, you will be subject to penalties of Radio Law of Japan. Texas Instruments Japan Limited (address) 24-1, Nishi-Shinjuku 6 chome, Shinjukku-ku, Tokyo, Japan http://www.tij.co.jp 【ご使用にあたっての注】...
Page 39
IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
Need help?
Do you have a question about the CC2540 and is the answer not in the manual?
Questions and answers