NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

TI Bluetooth Stack for WL18xx - Demo Guide

From Texas Instruments Wiki
Jump to: navigation, search

TI Bluetooth Stack - BluetopiaPM Getting Started Guide

TI Bluetooth Stack - BluetopiaPM Build Process

Demo Overview[edit]

This page contains an index of all supported BluetopiaPM demos, in addition to steps for running and debugging Bluetooth demos on Linux with the TI Bluetooth Protocol Stack based on the Bluetopia Platform Manager (Bluetopia PM) Framework. The TI Bluetooth Stack - BluetopiaPM Getting Started Guide should be followed for more information on how to build and run sample applications.

The Sitara Bluetooth sample applications are provided to enable a rich out-of-box experience to the user. These applications allow the user to use a console to send Bluetooth commands, setup a Bluetooth Device to accept connections, connect to a remote Bluetooth device, and communicate over Bluetooth. The steps given here have been verified using Sitara SDK 3.01.00.06 with a WiLink 8 and TI Bluetooth Stack version 4.2.1.0.1.0.

Bluetooth Stack[edit]

The Stonestreet One (SS1) package comes with the below Linux executables:

LinuxAUDM		: A2DP Sink/Source and AVRCP Controller/Target
LinuxBASM		: Battery Alert Service
LinuxCSCM		: Cycling and Candace
LinuxDEVM		: Device Manager
LinuxFMPM_TAR 		: Find Me Target
LinuxFTPM_CLT 		: File Transfer Client
LinuxFTPM_SRV 		: File Transfer Server
LinuxGATM_CLT 		: GATT Client 
LinuxGATM_SRV 		: GATT Server
LinuxHDPM		: Health Device Source/Sink
LinuxHDPM_11073 	: Health Device Source/Sink According to IEEE 11073
LinuxHDSM_AG_CC256X	: Headset Audio Gateway For CC256X Device
LinuxHDSM_HS_CC256X	: Headset Head set For CC256X Device
LinuxHFRM_AG_CC256X	: Hands free Audio Gateway For CC256X Device
LinuxHFRM_HF_CC256X	: Hands free Head set For CC256X Device
LinuxHDSM_AG_WL18XX	: Headset Audio Gateway For WL18XX Device
LinuxHDSM_HS_WL18XX	: Headset Head set For WL18XX Device
LinuxHFRM_AG_WL18XX	: Hands free Audio Gateway For WL18XX Device
LinuxHFRM_HF_WL18XX	: Hands free Head set For WL18XX Device
LinuxHIDM		: HID Host/Device
LinuxHOGM		: HID over GATT
LinuxHRPM		: Heart Rate Collector
LinuxIBeacon 		: IBeacon
LinuxMAPM_MCE 		: Message Access Message Client Equipment
LinuxMAPM_MSE 		: Message Access Message Server Equipment
LinuxOPPM		: Object Push Profile
LinuxPANM		: Personal Area Network
LinuxPBAM		: Phone Book Access Phone Book Client Equipment
LinuxPXPM_MON 		: Proximity Monitor
LinuxSCOM		: Synchronous Connection-Oriented
LinuxSPPLE_PM 		: Serial Port over GATT
LinuxSPPM		: Serial Port
LinuxVoLE               : Voice Over BLE Application

In addition, the below two utility executables are also provided.

SS1BTPM			: BluetopiaPM Framework Server
SS1Tool			: Stonestreetone Bluetooth Tool

Demos[edit]

Classic Bluetooth Demos[edit]

A2DP Demo (Sink and Source)[edit]

  • The A2DP profile allows us to stream high quality audio over Bluetooth.
  • For a step by step demonstration on how to run this application visit the AUD Demo Application wiki.

DEVM Demo[edit]

  • DEVM is a BluetopiaPM framework module that works within every profile sample application on the local device to provide generic Bluetooth device functionality.
  • For a step by step demonstration on how to run this application visit the DEVM Demo Application wiki.

FTP Demo (Client and Server)[edit]

  • The File Transfer Profile allow us to browse, pull or push files using GOEP.
  • For a step by step demonstration on how to run this application visit the FTP Demo Application wiki.

HDP Demo (Sink and Source)[edit]

  • The Health Device Profile serves as a Bluetooth transport of the IEEE 11073 Medical / health device communication standard.

NoteNote: The Bluetooth Health Device Profile is only a transport for IEEE 11073 data and to decode and verify the data an 11073 stack is required and is not provided by Stonestreet One.

HDS Demo (Headset and Audio Gateway)[edit]

  • The Headset profile allows the user to demonstrate the use of Headset profile on embedded device. The Headset profile is used to connect a headset or speakerphone with a mobile device to provide remote control and voice connections.
  • The Headset profile supports two roles, Headset and Audio Gateway. Two sample applications provided: One demonstrates how to use the Audio Gateway role and second application demonstrates how to use the Headset role of the profile.
  • For a step by step demonstration on how to run this application visit the HDS Demo applications wiki.

HFP Demo(Headset and Audio Gateway)[edit]

  • The Hands free profile allows the user to demonstrate the use of Hands-free profile on embedded device. The hands free profile is used to connect a headset or speakerphone with a mobile device to provide remote control and voice connections.
  • The Hands-free profile supports two roles, Hands free and Audio Gateway. Two sample applications provided: One demonstrates how to use the Audio Gateway role and second application demonstrates how to use the hands free role of the profile.
  • For a step by step demonstration on how to run this application visit the HFP Demo applications wiki.

HID Demo (Host Role Only)[edit]

  • The human interface device enables a host to connect and control a HID device.
  • For a step by step demonstration on how to run this application visit the HID Demo Application Wiki.

MAP Demo[edit]

  • The MAP Demo allows us to exchange message objects over Bluetooth.
  • For a step by step demonstration on how to run this application visit the MAP Demo Application wiki.

OPP Demo[edit]

  • The OPP Demo allows us to Push objects over Bluetooth.
  • For a step by step demonstration on how to run this application visit the OPP Demo Application wiki.

PAN Demo[edit]

  • The PAN Demo allows us to create Personal area network over Bluetooth.
  • For a step by step demonstration on how to run this application visit the PAN Demo Application wiki.


PBAP Demo (Client Role Only)[edit]

  • The PBAP Demo allows us to exchange Phone Book objects over Bluetooth.
  • For a step by step demonstration on how to run this application visit the PBAP Demo Application wiki.

SPP Demo[edit]

  • This application shows how to utilize the SPP module and also how handle the different callback events. The application can be used to interface with a remote SPP Client or Server.
  • For a step by step demonstration on how to run this application visit the SPP Demo Application Wiki.


Bluetooth Low Energy Demos[edit]

BAS Demo[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the Battery Alert Service Profile (ANP) using the GATT profile. This sample acts as a LE Master and LE Slave.
  • For a step by step demonstration on how to run this application visit the BAS Demo Application Wiki.

FMP Demo (Target Role Only)[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the Find Me Profile(FMP) using the GATT profile. This sample acts as a LE Master and Slave.
  • For a step by step demonstration on how to run this application visit the FMP Demo Wiki.

GATM Demo[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the GATT profile. This sample acts as a LE Master and Slave.
  • For a step by step demonstration on how to run this application visit the GATT Demo Application Wiki.


HOGP Demo (Host Role Only)[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the HID Over GATT Profile (HOGP) using the GATT profile. This sample acts as a LE Master.
  • For a step by step demonstration on how to run this application visit the HOGP Demo Application Wiki.

HRP Demo (Collector Role Only)[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the Heart Rate Monitoring Profile (HRP) using the GATT profile. This sample acts as a LE Master and LE Slave.
  • For a step by step demonstration on how to run this application visit the HRP Demo Application Wiki.

iBeacon Demo[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the iBEACON Profile using the GATT profile. This sample acts as a LE Broadcaster.
  • For a step by step demonstration on how to run this application visit the iBeacon Demo Application Wiki.

PXP Demo (Monitor Role Only)[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample implements the ProXimity Profile(PXP) using the GATT profile. This sample acts as a LE Master and Slave.
  • For a step by step demonstration on how to run this application visit the PXP Demo Application Wiki.

SPPLE Demo[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample emulates using SPP over LE using the GATT Profile. This sample acts as a LE Master and LE Slave.
  • This application also shows how to utilize the SPP module and how to handle the different SPP callback events. This will act as either a SPP Server or SPP Client and exposes the same command set for SPP as the SPPDemo.
  • For a step by step demonstration on how to run this application visit the SPPLE Demo Application Wiki.

VoLE Demo[edit]

  • This application shows how to utilize Low Energy (LE) and the GATT profile. This sample enables voice streaming (receiver) over LE using the GATT Profile. This sample acts as an LE Master.
  • This application also allows for the use of the HID module acting as an HID Host to a companion CC2650RC Remote control.

Debugging and Troubleshooting[edit]

It can be helpful to enable debug logs while debugging Bluetooth applications. In Bluetopia PM the DEVM API function DEVM_EnableBluetoothDebug() can be used to enable debug logging. With debugging logging enabled every HCI packet sent or received is logged to a file. The format of the log depends on the parameters specified when calling DEVM_EnableBluetoothDebug().

Enabling Debug Logging[edit]

The LinuxDEVM demo has a command that calls the DEVM_EnableBluetoothDebug() function and can be used to enable debug logging. To enable debug in LinuxDEVM, with SS1BTPM running in the background, run the following:

DEVM>Initialize 1
BTPM_Initialize() Success: 0.
DEVM_RegisterEventCallback() Success: 5.
DEVM>SetDevicePower 1
DEVM_PowerOnDevice() Success: 0.
DEVM>
Device Powered On.
DEVM>EnableBluetoothDebug
Usage: EnableBluetoothDebug [Enable (0/1)] [Type (1 - ASCII File, 2 - Terminal, 3 - FTS File)] [Debug Flags] [Debug Parameter String (no spaces)].
Function Error.
DEVM>EnableBluetoothDebug 1 3 0 DebugLog.log
DEVM_EnableBluetoothDebug(TRUE) Success.

The debug log is not actually created until HCI packets have been sent or received. To generate HCI packets, with the Bluetooth device powered on, run the following:

DEVM>StartDeviceDiscovery 10
Attempting to Start Discovery (10 Seconds).
DEVM_StartDeviceDiscovery() Success: 0.

The file "TempDebugLog.btsnoop" will be created in the directory the PM Server (SS1BTPM) is running in.

To disable debug use the following commands:

DEVM>EnableBluetoothDebug 0
DEVM_EnableBluetoothDebug(FALSE) Success.


Debug Log Formats[edit]

When using the DEVM_EnableBluetoothDebug() function there are three optional formats:

  1. ASCII File
  2. Terminal
  3. FTS File.

ASCII File[edit]

When the ASCII format is specified a file is created that can be read by anyone. When this format is selected the debug log's contents will resemble the following:

[16:20:24.894 09/27/2013]
Sending 8 Bytes (HCI Command Packet):
           00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F    0123456789ABCDEF
  --------------------------------------------------------------------------------
    00000  01 04 05 33 8B 9E 03 0F                            ...3....
[16:20:24.905 09/27/2013]
Received 6 Bytes (HCI Event Packet):
           00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F    0123456789ABCDEF
  --------------------------------------------------------------------------------
    00000  0F 04 00 01 01 04                                  ......

One entry is added to the file for each packet sent or received. An ASCII Log can be created by using the following command in LinuxDEVM:

DEVM>EnableBluetoothDebug 1 1 0 ASCIIDebugLog.txt

Terminal[edit]

The terminal debugging option is similar to the ASCII File debugging option, except that HCI Packets that are sent/received are written to the system log using Linux's syslog() function instead of being written to a user-specified file. The format of the data written to the system log is the same as the format described just above for the ASCII file debugging option. If using the default kernel image provided with the AM335x SDK v6.00 then the system log data can be found in /var/log/messages. Terminal debugging can be enabled by using the following command in LinuxDEVM:

DEVM>EnableBluetoothDebug 1 2 0

FTS[edit]

FTS (Frontline Test System) logs are binary Bluetooth snoop HCI logs that can be imported and viewed with tools like Frontline's Capture File Viewer. Capture File Viewer will parse each packet and display each packet in a User-Friendly GUI Application.

An FTS Log can be created by using the following command in LinuxDEVM:

DEVM>EnableBluetoothDebug 1 3 0 FTSDebugLog.btsnoop

Reminder[edit]

As mentioned above the Bluetooth radio must first be powered on before debug logging can be enabled. To power on the radio from the LinuxDEVM sample run:

DEVM>SetDevicePower 1

After debugging has been enabled it is safe to quit the LinuxDEVM app and continue with any testing from another app. Debug logging will remain enabled until it is disabled or until the Bluetooth radio is powered off.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI Bluetooth Stack for WL18xx - Demo Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TI Bluetooth Stack for WL18xx - Demo Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TI Bluetooth Stack for WL18xx - Demo Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity