.. _sec-examples-applications: Example Applications ==================== The purpose of this section is to give an overview of the sample applications included in the TI Bluetooth low energy stack software development kit. Some of these implementations are based on specifications that have been adopted by the Bluetooth Special Interest Group (Bluetooth SIG), while others are based on specifications that have not been finalized. Some applications are not based on any standardized profile being developed by the Bluetooth SIG but are custom implementations developed by TI. All projects contain an IAR and a CCS implementation. TI intends most sample applications described in this section to run on the |LP|. For any project using the UART peripheral for display, the following default parameters are used: ============ ================= UART Param Default Values ============ ================= Baud Rate 115200 Data length 8 bits Parity None Stop bits 1 bit Flow Control None ============ ================= .. _sec-sample-applications-bim-oad-off-chip: BIM OAD Off-Chip ---------------- The bim\_oad\_offchip is a small project used with the simple\_peripheral project, it is not used as a standalone project. Use the cc2640r2lp\_app-FlashROM\_OAD\_Offchip configuration of the simple\_peripheral application. See the :ref:`sec-oad` for more information. Interface ^^^^^^^^^ None. .. _sec-sample-applications-bim-oad-on-chip: BIM OAD On-Chip --------------- The bim\_oad\_onchip is a small project used with the oad\_target project, it is not used as a standalone project. See the :ref:`sec-oad` for more information. Interface ^^^^^^^^^ None. .. _sec-sample-applications-host-test: Host Test Project ----------------- The HostTest project implements a pure Bluetooth low energy network processor to use with an external microcontroller or a PC software application such as BTool. Communication occurs through the HCI interface. Interface ^^^^^^^^^ The host\_test project uses the UART peripheral without POWER\_SAVING by default to communicate with the host processor. The project also supports UART and SPI interface with power management enabled. .. _sec-sample-applications-micro-eddystone-beacon: Micro Eddystone Beacon ---------------------- The micro\_eddystone\_beacon project uses a unique Micro BLE Stack that has been optimized/reduced to only support the broadcast role to save memory. This project will demonstrate the implementation of a nonconnectable beacon that uses the Eddystone beacon format. A background and introduction to Bluetooth low energy beacons can be found here: `SWRA475 `_. The specifications and instructions on using the simple\_eddystone project in particular can be found here: `SWRA491 `_. See :ref:`sec-index-micro-ble-stack` for more details. Interface ^^^^^^^^^ The micro\_eddystone\_beacon project uses the UART peripheral to provide an interface for the application. The default parameters for UART used are: - Baud Rate: 115200 - Data length: 8 bits - Parity: None - Stop bits: 1 bit - Flow Control: None The following describes button functionality: ============ =================================== ================= Button Description Default Values ============ =================================== ================= KEY\_LEFT Toggle advertising on/off On KEY\_RIGHT Toggle frame type URL/UID mode UID ============ =================================== ================= .. _sec-sample-applications-multi-role: Multi Role ---------- This project will provide a demo to demonstrate the capabilities of the Texas Instruments BLE stack to function in multiple simultaneous connection roles. Specifically, the project is capable of functioning as a master and a slave simultaneously, in any combination, while maintaining up to 8 conections. The project is capable of connecting to any central / peripheral device. Any type of legacy pairing / bonding is possible. Parameter updates are supported. Connections can be established in any role. The project supports multiple simultaneous GATT discoveries and / or pairings / bondings. Interface ^^^^^^^^^ The multi\_role project uses the two buttons on the |LP| to accept user input and outputs information through the UART. In order to view this information, a terminal application such as PuTTY can be used with the default UART parameters. Main Menu """"""""" Upon powering on or resetting the device, the user will be in the main menu. When in the main menu, the left button will scroll through the possible actions which are: - Scan - Connect - GATT Read / Write - Connection Update - Disconnect - Advertising The right button is used to select one of these options. When selected, each option is defined below: Scan """" Pressing the right button will start a device discovery to search for advertising devices. Connect """"""" Pressing the right button from the main menu while "Connect" is shown will enter the connect menu. Here, the left button is used to browse through devices discovered from the last Scan. If a scan has not occurred yet, there won't be any devices to connect to. In this menu, the right button will select a device to connect to. It is also possible to browse to and select "Cancel" to return to the main menu. GATT Read / Write """"""""""""""""" Pressing the right button from the main menu while "GATT Read / Write" is shown will enter the "GATT Read / Write" menu. Here, the left button is used to browse through connected devices. When a device is selected with the right button, a GATT read / write of simple profile characteristic 1 will be sent to the connected device. Each time a device is chosen, the action toggles between read and write with the write value incrementing by 1. It is also possible to browse to and select "Cancel" to return to the main menu. Connection Update """"""""""""""""" Pressing the right button from the main menu while "Connection Update" is shown will enter the "Connection Update" menu. Here, the left button is used to browse through connected devices. When a device is selected with the right button, a connection parameter update is sent to the connected device with the following parameters: - 100 ms minimum connection interval - 187.5 ms maximum connection interval - 0 slave latency - 2 seconds supervision timeout It is also possible to browse to and select "Cancel" to return to the main menu. Disconnect """""""""" Pressing the right button from the main menu while "Disconnect" is shown will enter the "Disconnect" menu. Here, the left button is used to browse through connected devices. When a device is selected with the right button, a link termiantion request will be sent to the connected device. In this menu, the right button will select a device to connect to. It is also possible to browse to and select "Cancel" to return to the main menu. Advertising """"""""""" Pressing the right button will toggle advertising on / off. .. _sec-sample-applications-oad-target: OAD Target ---------- The oad\_target is used for on-chip Over the Air Download (OAD) firmware update, it consists of the Boot Image Manager (BIM), App, and Stack projects. See the :ref:`sec-oad` for more information. Interface ^^^^^^^^^ None. .. _sec-sample-applications-simple-broadcaster: Simple Broadcaster ------------------ The simple\_broadcaster project demonstrates demonstrates nonconnectable beacon applications, such as Apple iBeacon™ and Google Eddystone™. See Bluetooth low energy Beacons Application Note (`SWRA475 `_) for more information about Bluetooth low energy beacons. Interface ^^^^^^^^^ This application uses the UART peripheral to display messages. This application is configured to broadcast sample advertising data out of the box. .. _sec-sample-applications-simple-central: Simple Central -------------- The simple\_central project implements a simple Bluetooth low energy central device with GATT client functionality. This project can be run on various platforms, including the |LP|. By default, the simple\_central application is configured to filter and connect to peripheral devices with the TI Simple Profile UUID. To modify this behavior, set DEFAULT\_DEV\_DISC\_BY\_SVC\_UUID to FALSE in simple\_central. Interface ^^^^^^^^^ The application uses the UART peripheral to provide an interface for the application. The DisplayUART driver displays the following information: - BD address of the device - Device discovery results - Connection state - Pairing and bonding status - Attribute read or write value after parameter update The following briefly describes button functionality: ============ ================================================================ Button Description ============ ================================================================ KEY\_LEFT Scroll through scanned devices, choose from options from display KEY\_RIGHT Start/Cancel discovery procedure, connect, execute from options ============ ================================================================ .. _sec-sample-applications-simple-observer: Simple Observer --------------- The simple\_observer project only supports discovery(scanning) functionality. The project also provides interface to start/stop scanning and display the discovered devices. Interface ^^^^^^^^^ This application uses the UART peripheral to display messages and interact with buttons. The following describes button functionality: ============ =================================== Button Description ============ =================================== KEY\_LEFT Scroll through scanned devices KEY\_RIGHT Start/Cancel discovery procedure ============ =================================== .. _sec-sample-applications-simple-peripheral: Simple Peripheral ----------------- The simple\_peripheral project implements a simple Bluetooth low energy peripheral device with GATT services and demonstrates the TI Simple Profile. This project can be a framework for developing many different peripheral-role applications. The *Software Developer’s Guide* explains this project. Interface ^^^^^^^^^ The simple\_peripheral project uses the UART peripheral to provide an interface for the application. The UART is only used for display messages, PIN drivers can be implemented to add button functionality.