Example: air traffic controller

Bluetooth® Low Energy Sample Applications …

Copyright 2011-2013 Texas Instruments, Inc. Texas Instruments CC2540/41 Bluetooth Low Energy Sample Applications Guide Document Number: SWRU297 Page 2 of 30 Copyright 2012-2013 Texas Instruments, Inc Table Of Contents TABLE OF CONTENTS .. 2 REFERENCES .. 5 1 6 INTRODUCTION .. 6 2 BLOOD PRESSURE SENSOR .. 6 PROJECT OVERVIEW .. 6 User Interface .. 6 Basic Operation .. 6 SOFTWARE 7 Initialization .. 7 Event Processing .. 7 Callbacks .. 7 Sending Blood Pressure Measurement Indications .. 8 Sending Intermediate Measurement Notifications .. 8 Blood Pressure Measurement .. 8 3 HEALTH THERMOMETER .. 8 PROJECT OVERVIEW .. 8 User Interface .. 8 Basic Operation .. 9 SOFTWARE 9 Initialization .. 9 Event Processing .. 10 Callbacks .. 10 Sending Temperature Indications .. 10 Sending Intermediate Measurement Notifications .. 10 Sending Interval Change Indications .. 10 Thermometer Measurement Format.

before attempting to use these sample applications, as [1] some knowledge of the CC2540/41 BLE protocol stack and software is required. 1.1 Introduction

Tags:

  Applications, Samples, Energy, Low energy sample applications

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Bluetooth® Low Energy Sample Applications …

1 Copyright 2011-2013 Texas Instruments, Inc. Texas Instruments CC2540/41 Bluetooth Low Energy Sample Applications Guide Document Number: SWRU297 Page 2 of 30 Copyright 2012-2013 Texas Instruments, Inc Table Of Contents TABLE OF CONTENTS .. 2 REFERENCES .. 5 1 6 INTRODUCTION .. 6 2 BLOOD PRESSURE SENSOR .. 6 PROJECT OVERVIEW .. 6 User Interface .. 6 Basic Operation .. 6 SOFTWARE 7 Initialization .. 7 Event Processing .. 7 Callbacks .. 7 Sending Blood Pressure Measurement Indications .. 8 Sending Intermediate Measurement Notifications .. 8 Blood Pressure Measurement .. 8 3 HEALTH THERMOMETER .. 8 PROJECT OVERVIEW .. 8 User Interface .. 8 Basic Operation .. 9 SOFTWARE 9 Initialization .. 9 Event Processing .. 10 Callbacks .. 10 Sending Temperature Indications .. 10 Sending Intermediate Measurement Notifications .. 10 Sending Interval Change Indications .. 10 Thermometer Measurement Format.

2 11 4 HEART RATE SENSOR .. 11 PROJECT OVERVIEW .. 11 User Interface .. 11 Basic Operation .. 11 SOFTWARE 11 Initialization .. 12 Event Processing .. 12 Callbacks .. 12 Sending Notifications .. 12 5 GLUCOSE COLLECTOR .. 12 PROJECT OVERVIEW .. 13 User Interface .. 13 Basic Operation .. 13 Record Filter Configuration .. 13 SOFTWARE 13 Initialization .. 14 Event Processing .. 14 Callbacks .. 14 Service Discovery .. 14 Service Configuration .. 14 Record Access Control Point .. 15 6 GLUCOSE SENSOR .. 15 PROJECT OVERVIEW .. 15 User Interface .. 15 TI CC2540 Bluetooth Low Energy Sample Applications Guide SWRU297 Version Page 3 of 30 Copyright 2012-2013 Texas Instruments, Inc Basic Operation .. 15 SOFTWARE 16 Initialization .. 16 Event Processing .. 16 Callbacks .. 16 Sending Notifications and Indications .. 16 Record Access Control Point Processing .. 16 7 HID ADVANCED REMOTE CONTROL .. 17 8 HID EMULATED KEYBOARD.

3 17 PROJECT OVERVIEW .. 17 User Interface .. 17 Basic Operation .. 17 SOFTWARE 18 HIDEMUKBD APPLICATION .. 18 Initialization .. 18 Event Processing .. 18 Callbacks .. 18 Sending Notifications .. 18 HID DEVICE PROFILE .. 19 Initialization .. 19 Event Processing .. 19 Callbacks .. 19 GATT Read and Write Callbacks .. 19 Mapping HID Reports to HID Characteristics .. 19 Sending and Receiving HID Reports .. 19 Advertising and Connection Procedures .. 20 9 HOSTTESTRELEASE- BLE NETWORK PROCESSOR .. 20 10 KEYFOBDEMO .. 20 PROJECT OVERVIEW .. 20 User Interface .. 21 Battery Operation .. 21 Accelerometer Operation .. 21 Keys .. 21 Proximity .. 21 SOFTWARE 22 Initialization .. 22 Event Processing .. 22 Callbacks .. 22 11 SENSORTAG .. 22 22 SENSORS .. 23 12 SIMPLEBLECENTRAL .. 23 13 SIMPLEBLEPERIPHERAL .. 23 14 TIMEAPP- BLE WATCH .. 23 PROJECT OVERVIEW .. 23 User Interface .. 24 Basic Operation .. 24 SOFTWARE 25 Initialization.

4 25 Event Processing .. 25 Callbacks .. 25 Service Discovery .. 25 Service Configuration .. 26 Handling Indications and Notifications .. 26 TI CC2540 Bluetooth Low Energy Sample Applications Guide SWRU297 Version Page 4 of 30 Copyright 2012-2013 Texas Instruments, Inc Clock Time .. 26 15 SERIAL BOOTLOADER .. 26 BASIC OPERATION .. 26 Build and Flash the SBL .. 26 Build the Project to be Bootloaded .. 27 Download the User Project Image (.bin) .. 27 16 USB BOOTLOADER .. 27 BASIC OPERATION .. 27 Flash UBL .. 27 Build the Project to be Bootloaded .. 27 Download the User Project Image (.bin) .. 27 17 OVER AIR DOWNLOAD .. 28 TARGET REQUIREMENTS .. 28 SERVER REQUIREMENTS .. 28 OAD DEVELOPER S GUIDE .. 28 18 GENERAL INFORMATION .. 29 DOCUMENT HISTORY .. 29 19 ADDRESS INFORMATION .. 29 20 TI WORLDWIDE TECHNICAL SUPPORT .. 29 TI CC2540 Bluetooth Low Energy Sample Applications Guide SWRU297 Version Page 5 of 30 Copyright 2012-2013 Texas Instruments, Inc References Included with Texas Instruments Bluetooth Low Energy Stack Release (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\ \): [1] Texas Instruments Bluetooth Low Energy Software Developer s Guide (SWRU271B) C:\Texas Instruments\ \Documents\TI_BLE_Software_Developer' Adopted Bluetooth specifications (which can be downloaded from ).

5 [2] Blood Pressure Profile (BLP) Specification [3] Blood Pressure Service (BLS) Specification [4] Health Thermometer Profile (HTP) Specification [5] Health Thermometer Service (HTS) Specification [6] Heart Rate Profile (HRP) Specification [7] Heart Rate Service (HRS) Specification [8] HID over GATT Profile (HOGP) Specification [9] HID Service (HIDS) Specification [10] Scan Parameters Profile (ScPP) [11] Scan Parameters Service (ScPS) [12] Device Information Service (DIS) Specification [13] Battery Service (BAS) specification [14] Proximity Profile (PXP) Specification [15] Find Me Profile (FMP) Specification [16] Link Loss Service (LLS) Specification [17] Immediate Alert Service (IAS) Specification [18] Tx Power Service (TPS) Specification [19] Time Profile (TIP) Specification [20] Alert Notification Profile (ANP) Specification [21] Phone Alert Status (PASP) Specification TI CC2540 Bluetooth Low Energy Sample Applications Guide SWRU297 Version Page 6 of 30 Copyright 2012-2013 Texas Instruments, Inc 1 Overview The purpose of this document is to give an overview of the Sample Applications that are included in the Texas Instruments CC2540/41 Bluetooth low Energy (BLE) software development kit.

6 It is recommended that you read [1] before attempting to use these Sample Applications , as some knowledge of the CC2540/41 BLE protocol stack and software is required. Introduction Version of the Texas Instruments CC2540/41 BLE software development kit includes several Sample Applications implementing a variety of GATT-based profiles. Some of these implementations are based on specifications that have been adopted by the Bluetooth Special Interest Group (BT SIG), while others are based on specifications that are a work-in-progress and have not been finalized. In addition, some Applications are not based on any standardized profile being developed by the BT SIG, but rather are custom implementations developed by Texas Instruments. In order to interoperate with other Bluetooth low Energy devices (such as a mobile phone), an application would need to be written on the other device which implements the proper GATT client and/or server functionality that matches the CC2540/41 Sample application.

7 The status of the implementation of each profile/application is included in this document. The information in this guide specifically mentions only CC2540 projects; however all of the Applications and configurations (with the exception of those that use the USB interface) also can run on the CC2541. Be sure to open the correct project file depending on the chipset that is being used. 2 Blood Pressure Sensor This Sample project implements the Blood Pressure profiles in a BLE peripheral device to provide an example blood pressure monitor using simulated measurement data. The application implements the "Sensor" role of the blood pressure profile. The project is based on the adopted profile and service specifications for Blood Pressure ([2] and [3]). The project also includes the Device Information Service ([12]). The project can be opened with the following IAR workspace file: C:\Texas Instruments\ \ Projects\ble\BLoodPressure\CC2540DB\ Project Overview The project structure is very similar to that of the SimpleBLEP eripheral project.

8 The APP directory contains the application source code and header files. The project contains two configurations. - CC2540DK-MINI Keyfob Slave: using the keyfob hardware platform. - CC2540 Slave: using the SmartRF platform. User Interface There are two button inputs for this application. KeyFob Right or SmartRF Joystick Right When not connected, this button is used to toggle advertising on and off. When in a connection, this increases the value of various measurements. KeyFob Left or SmartRF Joystick Up This button cycle through different optional measurement formats. Basic Operation Power up the device and press the right button to enable advertising. From a blood pressure collector peer device, initiate a device discovery and connection procedure to discover and connect to the blood pressure sensor. The peer device should discover the blood pressure service and configure it to enable indication or notifications of the blood pressure measurement.

9 TI CC2540 Bluetooth Low Energy Sample Applications Guide SWRU297 Version Page 7 of 30 Copyright 2012-2013 Texas Instruments, Inc The peer device may also discover the device information service for more information such as mfg and serial number. Once blood pressure measurements have been enabled the application will begin sending data to the peer containing simulated measurement values. Pressing the left button cycles through different data formats as follows: MMHG | TIMESTAMP | PULSE | USER | STATUS MMHG | TIMESTAMP MMHG KPA KPA | TIMESTAMP KPA |TIMESTAMP | PULSE If the peer device initiates pairing, the blood pressure sensor will request a passcode. The passcode is 000000 . Upon termination, the BPM will not begin to advertising again until the button is pressed. The peer device may also query the blood pressure for read only device information. Further details on the supported items are listed in the GATT_DB excel sheet for this project.

10 Examples are model number, serial number, etc. Software Description The application is implemented in the file Initialization The initialization of the application occurs in two phases: first, the Bloodpressure_Init function is called by the OSAL. This function configures parameters in the peripheral profile, GAP, and GAP bond manager. It also sets up the blood pressure service along with standard GATT and GAP services in the attribute server. Then it sets an OSAL START_DEVICE_EVT event. This triggers the second phase of the initialization, which can be found within the Bloodpressure_ProcessEvent function. During this phase, the GAPRole_StartDevice function is called to set up the GAP functions of the application. Then GAPBondMgr_Register is called to register with the bond manager. Event Processing The application has two main event processing functions, Bloodpressure_ProcessEvent and Bloodpressure_ProcessOSALMsg.


Related search queries