Você está na página 1de 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

March 27, 2011


MindTree Limited, Global Village Campus, RVCE Post, Bangalore - 560 059 www.mindtree.com

MindTree Limited

7 April 2011

Page 1 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Table of Contents
ABSTRACT .................................................................................................................... 9 Revision History ............................................................................................................ 10 Introduction ................................................................................................................ 12 MSP-EXP430F5438+PAN1315EMK ...................................................................................... 12 EZ430-RF2560............................................................................................................ 14 Requirements............................................................................................................... 16 Hardware ................................................................................................................. 16 Software .................................................................................................................. 20 Software Architecture .................................................................................................... 20 Software tasks ........................................................................................................... 21 Semaphores ........................................................................................................... 24 Flow Diagrams ........................................................................................................ 26 Considerations to be taken while customizing the application.................................................. 28 Creating additional tasks............................................................................................ 28 Creating additional semaphores ................................................................................... 28 Handling ISRs .......................................................................................................... 29 Changing Task Priorities ............................................................................................. 29 Modifying the Bluetooth Initialization Sequence ................................................................ 29 sdk_handle_init_sequence() ........................................................................................ 29 Functions referred to by the SDK .................................................................................. 31 Memory Management ................................................................................................... 33 Directory Structure ..................................................................................................... 34 MSP-EXP430F5438+PAN1315EMK Directory Structure ........................................................... 34 EZ430-RF2560 Directory Structure................................................................................. 35 Building Bluetooth SDK Components for MSP430 ..................................................................... 36 MSP-EXP430F5438+PAN1315EMK ................................................................................... 36 EZ430-RF2560 ......................................................................................................... 37
MindTree Limited 7 April 2011 Page 2 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Installation of Bluetooth SDK Components ............................................................................ 40 EtherMind Stack API & Profile Libraries for MSP430 with IAR ................................................. 40 Configuring EtherMind Stack API Library ............................................................................... 41 MSP-EXP430F5438+PAN1315EMK ................................................................................... 41 EZ430-RF2560 ......................................................................................................... 41 Configuration parameters for the Application and EtherMind Stack ........................................... 41 Setup details ............................................................................................................... 53 MSP-EXP430F5438+PAN1315EMK -Temperature application ................................................... 53 EZ430-RF2560 - Accelerometer application ...................................................................... 57 Simple application ................................................................................................... 58 LCD Menu navigation with MSP-EXP430F5438+PAN1315EMK- Temperature application ........................ 59 Examples of Menu Navigation ......................................................................................... 59 BLUETOOTH MENU ................................................................................................... 59 SETTINGS MENU....................................................................................................... 60 INFO MENU ............................................................................................................ 60 LCD status indications for MSP-EXP430F5438+PAN1315EMK Temperature application ......................... 61 LCD backlight control for MSP-EXP430F5438+PAN1315EMK Temperature application .......................... 61 LED STATUS INDICATIONS ................................................................................................. 62 MSP-EXP430F5438+PAN1315EMK ...................................................................................... 62 Temperature Application ........................................................................................... 62 Accelerometer Application ......................................................................................... 62 Simple Application ................................................................................................... 63 EZ430-RF2560............................................................................................................ 63 Low power mode configurations ........................................................................................ 65 LPM implementation in sample SPP application ...................................................................... 65 MSP-EXP430F5438+PAN1315EMK-Temperature application ...................................................... 65 EZ430-RF2560-Accelerometer application .......................................................................... 66 LPM and Bluetooth Stack considerations ............................................................................ 66
MindTree Limited 7 April 2011 Page 3 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Maximum output power configurations for CC2560 Bluetooth Controller ........................................ 67 sdk_set_max_output_power () ..................................................................................... 67 Change config local name suffix ........................................................................................ 67 Flight Mode for CC2560 Bluetooth controller ......................................................................... 68 Power Saving Modes ....................................................................................................... 69 eHCILL mode............................................................................................................. 69 LPS ........................................................................................................................ 70 Sniff mode .................................................................................................................. 71 Sequence chart for Sniff Mechanism ................................................................................. 71 APIs........................................................................................................................ 71 APIs for controlling the SPP application ............................................................................... 73 General Stack APIs ...................................................................................................... 73 EtherMind Stack Initialization ...................................................................................... 73 Switching Bluetooth On ............................................................................................. 74 Switching Bluetooth Off ............................................................................................. 75 SPP APIs .................................................................................................................. 76 BT_spp_init () ......................................................................................................... 76 BT_spp_start () ....................................................................................................... 77 BT_spp_connect () ................................................................................................... 77 BT_spp_disconnect () ................................................................................................ 78 BT_spp_send() ........................................................................................................ 78 BT_spp_stop()......................................................................................................... 79 Changing Bluetooth HCI UART baud rate of SDK ................................................................... 79 sdk_set_controller_uart_baudrate() .............................................................................. 80 Application Callback ................................................................................................... 80 Callback Prototype ................................................................................................... 81 Possible Events Received (Possible Values for parameter SPP_EVENTS) .................................... 81 Interpretation of parameters of application callback .......................................................... 81
MindTree Limited 7 April 2011 Page 4 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

HCI Event Indication Callback ........................................................................................ 83 Bluetooth Connection Establishment & Management ............................................................. 86 SPP Scenarios Message Sequence Chart (MSC).................................................................... 89 Initialization .......................................................................................................... 90 SPP Connection Establishment ..................................................................................... 91 SPP Connection Release ............................................................................................. 93 SPP Shutdown with active connection ............................................................................ 94 SDP APIs .................................................................................................................. 94 BT_sdp_open .......................................................................................................... 95 BT_sdp_close.......................................................................................................... 95 BT_sdp_servicesearchattributerequest ........................................................................... 96 SDP Structures/Data Types ............................................................................................ 97 SDP Handle ............................................................................................................ 97 SDP Callback ............................................................................................................. 98 SDP Response Callback .............................................................................................. 98 SDP Utility APIs .......................................................................................................... 99 BT_sdp_get_channel_number .................................................................................... 100 SDP_SET_HANDLE................................................................................................... 100 GAP APIs ................................................................................................................ 101 1) Device Setup APIs ............................................................................................... 104 BT_hci_reset ........................................................................................................ 104 2) Controller Information APIs ................................................................................... 104 BT_hci_read_local_version_information........................................................................ 104 BT_hci_get_local_bd_addr ........................................................................................ 105 3) Controller Configuration APIs ................................................................................. 106 BT_hci_change_local_name ...................................................................................... 106 BT_hci_write_class_of_device ................................................................................... 106 BT_hci_read_current_iac_lap .................................................................................... 107
MindTree Limited 7 April 2011 Page 5 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_hci_write_current_iac_lap ................................................................................... 107 BT_hci_write_scan_enable ....................................................................................... 108 4) Device Discovery APIs .......................................................................................... 109 BT_hci_inquiry ...................................................................................................... 109 BT_hci_inquiry_cancel ............................................................................................ 110 BT_hci_write_inquiry_scan_type ................................................................................ 110 5) Connection Setup APIs ......................................................................................... 111 BT_hci_create_connection........................................................................................ 111 BT_hci_disconnect ................................................................................................. 112 BT_hci_write_page_timeout...................................................................................... 113 BT_hci_write_page_scan_type ................................................................................... 113 6) Connection State APIs .......................................................................................... 114 BT_hci_write_link_policy_settings .............................................................................. 114 BT_hci_sniff_mode ................................................................................................. 115 BT_hci_exit_sniff_mode ........................................................................................... 116 BT_hci_sniff_subrating (Bluetooth v2.1+EDR) ................................................................. 117 7) LINK INFORMATION APIs ........................................................................................ 118 BT_hci_read_transmit_power_level ............................................................................. 118 BT_hci_read_rssi ................................................................................................... 119 BT_hci_write_link_supervision_timeout ........................................................................ 119 8) REMOTE INFORMATION APIs ................................................................................... 120 BT_hci_remote_name_request ................................................................................... 120 9) Testing and Vendor Specific APIs ............................................................................. 121 BT_hci_enable_device_under_test_mode ...................................................................... 121 BT_hci_vendor_specific_command .............................................................................. 121 10) AUTHENTICATION AND ENCRYPTION APIs .................................................................. 122 BT_sm_connection_request_reply ............................................................................... 122 BT_sm_pin_code_request_reply ................................................................................. 123
MindTree Limited 7 April 2011 Page 6 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_sm_get_device_link_key ...................................................................................... 123 BT_sm_link_key_request_reply .................................................................................. 124 BT_sm_user_conf_request_reply ................................................................................ 125 Security Manager Callbacks ......................................................................................... 125 SM User Interface Notification Callback ........................................................................ 125 SM UI Notification Callback Event Identifiers .................................................................. 127 Porting Security Manager Persistent Storage ........................................................................ 128 Updating SDP Database ................................................................................................. 135 How do I change the SPP Server Channel? ........................................................................ 138 How do I change the ServiceName attribute of SPP record? ................................................. 138 How do I add a new custom UUID in the existing record? ...................................................... 139 MSP430 resources used by the Sample SPP applications .......................................................... 144 Mandatory Resources ................................................................................................. 144 Optional Resources ................................................................................................... 144 Explanation of the Sample Temperature Application .............................................................. 144 Explanation of the Sample Accelerometer Application ............................................................ 150 (Common for both MSP-EXP430F5438+PAN1315EMK and EZ430-RF2560) .................................. 150 Explanation of the Simple Application ............................................................................... 155 Flow Diagram for Establishing SPP connection ...................................................................... 157 Flow Diagram for SPP Disconnection ................................................................................. 160 Flow Diagram for sending SPP Data ................................................................................... 161 Flow diagrams for eHCILL related data handling ................................................................... 162 1. 2. 3. Awake to Sleep state .......................................................................................... 162 Sleep to Awake state (Wake-up from host)................................................................ 163 Sleep to Awake state (Wake up from peer) ............................................................... 164

Macros for debugging ................................................................................................... 165 Support for CC2560, CC256x, CC2564 and CC2567 devices ....................................................... 165 Support for CC256x Power Circuitry .................................................................................. 166
MindTree Limited 7 April 2011 Page 7 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Paring the SDK with a PC ............................................................................................... 166 Performance Analysis ................................................................................................... 168 1. Bluetooth Initialization Time .................................................................................... 168 2. CPU Utilization Calculation ...................................................................................... 169 3. Information on Code & Data sizes .............................................................................. 170 4. Throughput measurements ....................................................................................... 172 APPENDIX.................................................................................................................. 173 How to build pre-existing project using IAR ...................................................................... 173 MSP-EXP430F5438+PAN1315EMK ................................................................................. 173 EZ430-RF2560 ....................................................................................................... 178 Loading a pre-built binary to the board using IAR workbench ................................................. 181 Performing an Inquiry with RSSI data in the inquiry result..................................................... 194 IAR Version Information.............................................................................................. 195 Frequently asked Questions ......................................................................................... 221 Abbreviations .......................................................................................................... 223 References ................................................................................................................ 223

MindTree Limited

7 April 2011

Page 8 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

ABSTRACT
This document gives an overview of the following: Hardware & software requirements needed to build the EtherMind Bluetooth SDK Overview of the software architecture. System requirements of the Bluetooth stack (Timers, Interrupts, API interfaces, Tasks etc.) Procedure to integrate the Bluetooth stack with the end user application. Minimum information on accessing the vendor specific API commands. Installation procedure and how to use EtherMind Bluetooth SDK. Explanation of sample application to send data over SPP Performance analysis data related to related to Bluetooth initialization time, CPU utilization and Code & Data sizes

MindTree Limited

7 April 2011

Page 9 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Revision History
Owner contact: ethermind_support@mindtree.com Version 1 2 3 Initial Version Changes based on Feedback from TI. Additional information added based on changes in GUI Updates to description of software architecture, measurements and data throughput measurements LPM Change Description Date 11th March 2010 20th March 2010 21st April 2010

Added flow diagrams, aligned documentation for sdk config parameters with source code, Updated code and data sizes for temperature application, BT initialization times, LPM measurements, Diagram showing connection between MSP430 and PAN1315ETU, Updated based on additional feedback from TI. Refer to Issue id 30 for list of modifications Updates to throughput calculations, changes on feedback from TI Incorporated other

14th May 2010

5 6 7

21st May 2010 11th June 2010 14th June 2010

Updated directory tree structure, SDK configuration table, code and data size calculations, throughput measurements, initialization times. 8 Updated the section Considerations to be taken while customizing the application Updated code and data size measurements, initialization time. Added more information on read, write and user tasks. Added section on changing baud rate. Added flow diagrams related to eHCILL Updated code and data size measurements according to RC3.22 release. Changes related to security manager. Added section on updating SDP database. Updated code and data size measurements according to RC3.24 release. Changes related to renaming sdk_config.h to sdk_bluetooth_config.h Updated Version Info to RC3.25, Directory structure and section related to Security Manager Added documentation related to EZ430, updated directory structure, code and data size, power level related information, FAQ section, Version Info changed to RC4.0 Added changes related to sdk_bluetooth_common_config.h, changed version info to RC4.0.1, Added controller version
7 April 2011 Page 10 of 224

16th July 2010

4th Oct 2010

10

8th Oct 2010

11

29th Oct 2010

12

15th Nov 2010

13

23rd Dec 2010 13th Jan 2011

14

MindTree Limited

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

info PG_3.10, Added sdk functions, Updated BT init sequence section, Added Connection Flow Charts, Added info related to simple application, Removed hyperlinks and added explicit section names. 15 Updated documentation as per Release 5.16 18th Mar 2011

MindTree Limited

7 April 2011

Page 11 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Introduction
The EtherMind Bluetooth SDK provides a platform for end system designers to quickly evaluate EtherMind Bluetooth Software Protocol Stack and Profiles, and implement applications using it. The SDK is available for TI MSP430BT5190 processor. The reference applications and the development tool included in the kit help implementers to quickly develop customized Bluetooth prototype applications on the MSP430BT5190+CC2560 platform. This document provides step-by-step procedures for installation of EtherMind Bluetooth SDK, and also instructions for running the included reference applications. For simplicity and documentation purpose, the BT_SDK_DIR will be used to denote the directory where released EtherMind Bluetooth SDK components are unzipped. All directory paths in this document are relative to BT_SDK_DIR.

MSP-EXP430F5438+PAN1315EMK
The picture below shows the MSP-EXP430F5438 plugged in with the PAN1315ETU Bluetooth connectivity board.

MindTree Limited

7 April 2011

Page 12 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The picture of the PAN1315ETU Bluetooth connectivity board is shown below

MindTree Limited

7 April 2011

Page 13 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

EZ430-RF2560
The EZ430-RF2560 shown below is a complete TI Bluetooth evaluation and demonstration tool for the MSP430 and CC2560 that includes all the necessary hardware in a convenient USB stick. The EZ430-RF2560 package includes a USB-powered emulator board to program and debug your application and two CC2560based Bluetooth target boards featuring the highly integrated MSP430BT5190 ultra-low-power MCU.

MindTree Limited

7 April 2011

Page 14 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The package also includes a battery expansion board (requiring two AAA batteries) as shown below:

MindTree Limited

7 April 2011

Page 15 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Requirements
Hardware
The following hardware is required to run software package MSP-EXP430F5438 (AEC14718U) and EZ430+RF2560. This can be obtained from http://www.tiestore.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=MSP-EXP430F5438. PAN1315ETU CC2560 Development board. This can be obtained from http://www.panasonic.com/industrial/electronic-components/rfmodules/bluetooth/pan1315etu.aspx USB Debug Interface (JFET)

The MSP-EXP430F5438 supports MSP430F5438, MSP430F5438A and the MSP430BT5190 chips. The MSP430BT5190 is the recommended chip for Bluetooth operation since the MSP430F5438 and MSP430F5438A parts are subject to a timeout value during Bluetooth operation.

MindTree Limited

7 April 2011

Page 16 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The following picture shows some of the connections available on the MSP-EXP430F5438.

Power Selector switch RF3

JP2

JP3

JP1

JTAG Connector

USB Connector

Switch S3

RF2

LCD RF1

Joystick LED1 & 2

Switch S1

Switch S2

MindTree Limited

7 April 2011

Page 17 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The PAN1315ETU is connected at the RF1 & RF2 headers of the MSP-EXP430F5438. To use the PAN1315ETU with MSP-EXP430F5438, the following pins of RF3 needs to be shorted as shown below.

MindTree Limited

7 April 2011

Page 18 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The interface signals between the MSP430BT5190 and PAN1315 for MSP-EXP430F5438 are as shown below:

The interface signals between the MSP430BT5190 and PAN1315 for EZ430+RF2560 are as shown below:

MindTree Limited

7 April 2011

Page 19 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Software
The following software is required for installation of EtherMind Bluetooth SDK: IAR Embedded Workbench for MSP430. T know the IAR Version Information, refer to IAR Version Information section

Software Architecture
The following diagram shows the application interfaced to the TI Bluetooth controller using the EtherMind Bluetooth stack. The SPP, RFCOMM, SDP, GAP and L2CAP layers are implemented as part of the EtherMind Bluetooth stack.

Application SPP RFCOMM L2CAP HCI Interface TI CC2560 Bluetooth Baseband Controller
The tasks & buffers implemented as part of the MSP430BT5190+CC2560 SPP solution are shown in the diagram below: Security Manager

SDP

GAP

Application Command & Data Queue

Write Task

Read Task

Transport Driver OS, HAL, Boot code


MindTree Limited 7 April 2011 Page 20 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Software tasks
The MSP430BT5190+CC2560 software solution uses FreeRTOS as the underlying OS. The source files for FreeRTOS can be obtained from http://www.freertos.org. FreeRTOS v6.0.2 is used in EtherMind Bluetooth SDK. The MSP-EXP430F5438+PAN1315EMKprovides three software packages: 1. Accelerometer package 2. Temperature package 3. Simple package

The EZ430-RF2560 provides one software package: 1.Accelerometer package All the packages differ only at the application level and link to the same set of libraries to build the final application. This developer guide focuses mainly on the temperature package to explain the software architecture and provides a brief description of the software flow for the accelerometer package. The temperature application has four tasks Read & Write tasks implemented by the EtherMind Bluetooth SDK, User task implemented as part of the application and the default idle task created by the FreeRTOS. The task priorities in the order of highest to lowest are read task, write task, user task and finally the idle task. FreeRTOS is configured to be used in the pre-emptive scheduler mode. The tasks implement the following functionality: Read Task This reads incoming data from the host controller hardware from a circular buffer, waits for a complete HCI packet (Event or ACL data) and then passes it to the HCI transport layer for further processing xReadSemaphore is the semaphore used for synchronization between UART Rx ISR and ReadTask. A circular buffer is used to store the data received from UART Rx ISR. After the reception of complete packet, data is copied from uart circular buffer to the read task buffer and xReadSemaphore is released. As part of ReadTask, xReadSemaphore is acquired and packet is sent to HCI transport layer for further processing. Write Task This is responsible to en-queue the data received from application or higher layers to uart tx circular buffer. xWritePlSemaphore is the semaphore used for synchronization between UART Tx ISR and Write Task. When the data is ready for the transmission, xWritePlSemaphore is acquired by Write Task. Based on the availability of uart tx circular buffer space, the packet is fragmented and first chunk of data is copied to the uart tx circular buffer. On completing the data transmission first chunk of data of uart tx circular buffer, xWritePlSemaphore is released for the next chunk of data. At the end of transmission of complete packet, xWritePlSemaphore will be in the released state. User Task Used to handle the events generated by switch buttons and Timer1_A3 of MSP430BT5190. The TIMER1_A0_ISR and the PORT2_VECTOR_ISR generate the events and write them to the circular buffer. The user task reads the events from the circular buffer and handles them appropriately.
MindTree Limited 7 April 2011 Page 21 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

TIMER1_A0_ISR

PORT2_VECTOR_ISR

User Task

The circular buffer is defined in the file user_task.c as follows: /* Circular buffer used to handle Timer and Port 2 vectors */ UCHAR circular_user_buffer[MAX_USER_BUF]; /* Read pointer in user buffer; This gets incremented in the user task handler */ static INT16 circular_user_buf_rd = 0; /* Write pointer in the user buffer; This gets incremented in the Timer ISR and * Switch ISR */ INT16 circular_user_buf_wt = 0; The size of the buffer is currently set to 20 in in appl_sdk.h #define MAX_USER_BUF 20 The macro UPDATE_USER_BUFFER, defined in the file sdk_pl.h(as shown below), is used by the two ISRs to insert values into the circular buffer. #define UPDATE_USER_BUFFER(data) \ { \ circular_user_buffer[circular_user_buf_wt] = data;\ circular_user_buf_wt++;\ if (circular_user_buf_wt == MAX_USER_BUF) {\ circular_user_buf_wt = 0;\ }\ bytes_to_be_processed_in_user_buf++;\ }

MindTree Limited

7 April 2011

Page 22 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The TIMER1_A0_ISR, inserts the information into the circular buffer, such as the temperature display data, LCD contrast adjustment, RSSI and Tx Power levels, and the PORT2_VECTOR_ISR handles key presses, joystick actions, debouncing and LPM switching modes information. The user_task_routine, in user_task.c ,reads the events sent by the ISRs from the circular buffer and handles them appropriately.

The table below provides more information about the different tasks: Task name ReadTask WriteTask UserTask Task Handler Name Not available to the user Not available to the user user_task_routine() Filename Bluetooth Platform Library Bluetooth Core Library Priority 3* 2 1 Task size (bytes) 700 600 550

BT SDK DIR \bluetooth\private\platforms\spp\temp_a rch\msp430\user_task.c or BT_SDK_DIR \bluetooth\private\platforms\spp\accl_ar ch\msp430\user_task.c

IdleTask***

vApplicationIdleHook()

BT SDK DIR \bluetooth\export\temp_appl\appl_spp.c or BT_SDK_DIR \bluetooth\export\accl_appl\appl_spp.c or BT_SDK_DIR \bluetooth\export\simple_appl\appl_spp. c

256

* The greater the number higher the task priority ** xReadSemaphore is created as part of the library. However, it is visible as part of the UART ISR. This should not be modified by the user. *** Idle task is created by default as part of FreeRTOS scheduler

MindTree Limited

7 April 2011

Page 23 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Semaphores
Tasks are created in a blocked state. Semaphores are used to synchronize the activities between the tasks and ISRs. Read semaphore moves the read task to ready state on receiving expected bytes of data from the UART. After processing the received data, the read task is moved back to the blocked state. User semaphore moves the user task to ready state on generating the events from switch buttons or Timer1_A3. After processing these events, the user task is moved to blocked state. Few other semaphores are used internally as part of the Bluetooth core library but are not exposed to the end user. The table below shows the semaphores that are exposed to the end user in the case of the MSPEXP430F5438+PAN1315EMK temperature package:

Semaphore name

Blocking condition

Name of source file where blocking Is done

Release condition

Name of source file where releasing is done BT_UART_ISR in BT_SDK_DIR \bluetooth\private\p latforms\arch\msp43 0\msp430_uart.c TIMER1_A0_ISR in BT_SDK_DIR \bluetooth\private\p latforms\spp\temp_ arch\msp430\user_t ask.c and PORT2_VECTOR_ISR in BT_SDK_DIR \bluetooth\export\te mp_appl\appl_menu _pl.c

xReadSemaphore

After processing the required number of received bytes

Bluetooth Platform Library

When expected number of bytes are received on BT UART

xUserSemaphore

After processing the events generated from Timer1_A3 and switch buttons.

TIMER1_A0_ISR in BT_SDK_DIR \bluetooth\private\p latforms\spp\temp_ arch\msp430\user_t ask.c

When any event are generated either from Timer1_A3 or switches buttons (SW1, SW2 and Joystick)

MindTree Limited

7 April 2011

Page 24 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The table below shows the semaphores that are exposed to the end user in the case of the EZ430-RF2560 accelerometer packageEZ430-RF2560

Semaphore name

Blocking condition

Name of source file where blocking Is done

Release condition

Name of source file where releasing is done BT_UART_ISR in BT_SDK_DIR bluetooth\private\pl atforms\arch\msp43 0 \msp430_uart.c TIMER1_A0_ISR and PORT2_VECTOR_ISR in BT_SDK_DIR \ bluetooth\export\ac cl_appl \user_task.c

xReadSemaphore

After processing the required number of received bytes

Bluetooth Platform Library

When expected number of bytes are received on BT UART When any event are generated either from Timer1_A3 or switches buttons (SW1, SW2 and Joystick)

xUserSemaphore

After processing the events generated from Timer1_A3 and switch buttons.

TIMER1_A0_ISR in BT_SDK_DIR \ bluetooth\export\ac cl_appl\user_task.c

MindTree Limited

7 April 2011

Page 25 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flow Diagrams
The read and write tasks are required for the Bluetooth application to work correctly. However, the user task is application dependent. The user task is not required for the end application and can be completely removed by the user. To reduce memory, this can also be totally eliminated and this functionality may be incorporated as part of the idle task. The read task and user task flow diagrams are explained below. Write task implementation is done completely inside the Bluetooth library.

Read task
Read task is initially in the blocked state using the xReadSemaphore. This semaphore is unblocked once the required number of bytes is obtained on the UART. The read task then processes the bytes received and then moves the xReadSemaphore back to the blocked state. This flow is indicated in the diagram below BT_UART_ISR

ReadTask

If expected number of bytes received from UART?

No

No

If required number of received bytes is processed?

Yes

Yes

Release Read Semaphore

Block Read Semaphore

Return from interrupt

MindTree Limited

7 April 2011

Page 26 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

User task
User task is initially in the blocked state using the xUserSemaphore. This semaphore is unblocked by either the Timer ISR or the Port2 ISR when a switch operation is performed. Once the user task processes the information produced by either of the ISRs, it moves the xUserSemaphore back to the blocked state. This flow is indicated in the diagram below

TIMER1_A0_ISR

PORT2_VECTOR_ISR

Have any menu related timeouts occurred?

No

Is any button pressed?

No

Yes

Yes

Release User Semaphore

Release User Semaphore

Return from interrupt

Return from interrupt

UserTask

Are menu related events pending?

Block User Semaphore

MindTree Limited

7 April 2011

Page 27 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Considerations to be taken while customizing the application


Users may want to customize the application according to their needs. This may involve creating additional tasks, semaphores, using other ISRs etc. Some considerations to be used while doing so are given below:

Creating additional tasks


New tasks can be created by calling the FreeRTOS APIs. The details of the new task to be created need to be entered in the file BT_task.h. This file BT_task.h will need to be modified to add the name, stack size and priority of the new task. For example, a new task can be created using the FreeRTOS API as follows: xTaskCreate((pdTASK_CODE) user_task_handler, (const signed portCHAR *)USER_TASK, USER_TASK_STACK_SIZE, (unsigned portLONG *)NULL, (unsigned portBASE_TYPE)USER_TASK_PRIORITY, (xTaskHandle *) NULL); user_task_handler function handler for the new task USER TASK Name of the new task USER_TASK_STACK_SIZE Stack size required for the new task USER_TASK_PRIORITY Priority of the new task The configTOTAL_HEAP_SIZE definition of FreeRTOSConfig.h needs to be increased accordingly based on the number of new tasks that are added. The switching between the tasks is interrupt driven and not based on software ticks since the EtherMind Bluetooth stack does not depend on the tick timer. However, if required, the tick timer may be added to the application. This sample implementation can be obtained by referring to examples on the FreeRTOS.org website.

Creating additional semaphores


New semaphores can be created by calling the FreeRTOS APIs. Accordingly, the configTOTAL_HEAP_SIZE definition has to be increased accordingly based on the type and number of semaphores that need to be added. For example, a new binary semaphore can be created using the FreeRTOS API as follows: vSemaphoreCreateBinary(xUserSemaphore);

Modifying configTOTAL_HEAP_SIZE
The configTOTAL_HEAP_SIZE definition is used by FreeRTOS for allocating memory and needs to be customized based on the various tasks, semaphores etc. used in the system. The unit of stack size is defined as 16-bits for MSP430F5438A in the file FreeRTOSConfig.h. FreeRTOS requires that the stack size be specified in terms of units of the stack size. So, if the stack size of a task needs to be 256 bytes, the configuration of the task stack size needs to be specified as 128. On creation of a new task, a data structure containing information about the task is created. This is referred to as the TCB. FreeRTOS uses a TCB of 64 bytes. In addition for every data structure that gets created, FreeRTOS uses an additional 10 bytes to store information about it. There also may be an extra byte needed to factor in alignment issue. This means that for new task that gets created with a stack size specified as 256 bytes, the configTOTAL_HEAP_SIZE will need to be increased by 256 + 64 + 10 + 1 = 331 Bytes.
MindTree Limited 7 April 2011 Page 28 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Creation of a new binary semaphore results in addition of a data structure that uses 58 bytes. In addition for every data structure that gets created, FreeRTOS uses an additional 10 bytes to store information about it. There may be an extra byte needed to factor in alignment issue. This means that for new binary semaphore that gets created, the configTOTAL_HEAP_SIZE will need to be increased by 58 + 10 + 1 = 69 Bytes.

Handling ISRs
The user application may have additional interrupts that may need to be handled. While handling these ISRs, the user will need to ensure that the Bluetooth UART does not overflow. Additional ISRs also mean that the read and write tasks can get interrupted by more sources. In these cases, if interrupts are being nested, the corresponding task stack sizes will also have be increased accordingly. The MSP430F5438 does not have hardware based flow control and also does not have any UART buffers. As part of the FreeRTOS modifications, care is taken to ensure that RTS is disabled as part of every context switch to ensure that the UART does not overflow. Controlling RTS correctly in the interrupts is vital to ensure that the UART does not overflow. As part of the temperature application, RTS is disabled as part of the ISRs. This is re-enabled back in the idle task. If a new ISR needs to be added, using a similar logic can ensure that the UART does not overflow. Disabling RTS is done using the macro UART_DISABLE_BT_UART_RTS() Enabling RTS is done using the macro UART_ENABLE_BT_UART_RTS()

Changing Task Priorities


The current application has four tasks namely Read, Write, User and Idle. The Bluetooth related Read and Write tasks have been given more priority as compared to the User task in the example application. However, the user application may want to create additional tasks with different priorities or reorder the priority of the existing tasks as per the specific application requirement. In such a scenario, care needs to be taken to maintain the relative priority of the Bluetooth Read and Write tasks with respect to the other tasks. The current design does not prevent the application tasks to have a higher priority over the Bluetooth Read and Write tasks. If the priority of the application tasks are increased over the Bluetooth Read and Write tasks, the application will need to ensure that the higher priority application tasks will need to block periodically to ensure that sufficient CPU bandwidth is also provided to the lowered priority Bluetooth read and write tasks.

Modifying the Bluetooth Initialization Sequence


The execution of the initialization sequence is partially done in the library and remaining in the application source. The application section of the init sequence is implemented with the function sdk_handle_init_sequence(), in the file BT_SDK_DIR/bluetooth/export/common_appl/sdk_common.c. which is a common file for all applications.

sdk_handle_init_sequence()
void sdk_handle_init_sequence(UINT16 opcode, UCHAR status)
void sdk_handle_init_sequence ( IN UINT16 opcode IN UCHAR status )

This function is called by the library to direct the command complete events for the commands, which are part of the application section of the initialization sequence. Parameters:
MindTree Limited 7 April 2011 Page 29 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

opcode: The event opcode which is being forwarded by the library status: Command completion status for the current command

Returns:
none The commands executed from the library are: 1. 2. 3. 4. 5. 6. 7. 8. 9. HCI_Reset HCI_Read_Local_Version_Information HCI_VS_Get_System_Status HCI_VS_Configure_ARMIO HCI_VS_Write_ARMIO_Port HCI_VS_Read_Modify_Write_Hardware_Register HCI_VS_Update_UART_HCI_Baudrate HCI_VS_Read_Modify_Write_Hardware_Register Vendor specific Init script for CC2560 corresponding to service-pack 2.38 with EHCILL commands embedded.

The commands executed from the application source code are: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. SDK_Bt_Rf_Set_Power_Vector (Level 1, 2, 3) (0xFD82) SDK_Bt_Rf_Set_Class_2_Single_Power(0xFD87) SDK_Bt_Rf_Enable_Calibration (0xFD80) HCI_Set_Event_Mask HCI_Write_Simple_Pairing_Mode HCI_Read_BD_ADDR HCI_Read_Buffer_Size HCI_Change_Local_Name HCI_Write_Page_Timeout HCI_Set_Host_Controller_To_Host_Flow_Control HCI_Host_Buffer_Size SDK_Config_Link_Policy_Settings HCI_Write_Inquiry_Scan_Type HCI_Write_Page _Scan type HCI_Write_Current_IAC_Lap HCI_Write_Class_of_Device

The application section of the init sequence should begin by handling the last event sent by the library, which is currently,the EHCILL command complete event : SDK_BT_RF_SET_SLEEP_MODE. After all the commands and their corresponding events of the application section of the init sequence are handled, the function hci_init_sequence_completed is called to indicate that the Bluetooth ON procedure is completed and the control can be transferred to the function sdk_bluetooth_on_complete() The following steps need to be followed if any command needs to be added to the application section of the init sequence: 1) Identify the commands between which the new command needs to be inserted. 2) The new command to be sent has to be sent while handling the event/case of the command after which we need to insert the new command. 3) Insert another case (preferably just below the modified case), for handling the command complete event for the new command.

MindTree Limited

7 April 2011

Page 30 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

4) Once the event handling for the new command is done, send the command which was the next in the unchanged sequence. If any command needs to be removed from the sequence, then the following steps need to be followed: 1) Identify the preceding and succeeding commands for the command which need to be removed from the sequence. 2) In the event handler/case of the preceding command, remove the statement which sends the command to be removed and instead send the next command which was in-line in the unchanged sequence. 3) Remove the event handler/case for the command to be removed.

Functions referred to by the SDK


The SDK is provided in an object format and some platform related functions are provided in source format. The application links to the SDK to incorporate the Bluetooth functionality. The SDK depends on the following functions being present as part of the application to provide the required Bluetooth functionality. Function Name appl_sm_service_cb appl_spp_connect appl_spp_disconnect appl_spp_l2cap_tx_queue_flow_cb appl_spp_notify_cb appl_spp_sdp_callback appl_spp_sdp_query appl_spp_write All functions in appl_bt_rf.c All functions in heap_bt.c BT_UART_ISR appl_bt_on_sdk_indication sdk_error_handler File Name appl_spp.c appl_spp.c appl_spp.c appl_spp.c appl_spp.c appl_spp.c appl_spp.c appl_spp.c appl_bt_rf.c heap_bt.c msp430_uart.c sdk_common.c sdk_pl.c

MindTree Limited

7 April 2011

Page 31 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

sdk_uart_error_handler sdk_bt_rf_port_config sdk_bluetooth_on sdk_bluetooth_off sdk_vs_get_local_name_addr sdk_vs_get_local_name_len_addr sdk_update_baudrate_handler sdk_set_config_local_name_suffix sdk_check_max_len_of_hci_local_device_name sdk_read_hci_local_device_name_from_config_file sdk_handle_init_sequence

sdk_common.c sdk_common.c sdk_pl.c sdk_pl.c sdk_common.c sdk_common.c sdk_pl.c sdk_common.c sdk_common.c sdk_common.c sdk_common.c

MindTree Limited

7 April 2011

Page 32 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Memory Management
FreeRTOS provides three sample RAM allocation schemes (heap1.c, heap2.c, heap3.c) as part of its source code. The application uses heap2.c for task and semaphore management. FreeRTOS API calls related to memory management are documented extensively at http://www.freertos.org/index.html?http://www.freertos.org/a00111.html In addition, EtherMind Bluetooth SDK uses a customized scheme for managing the buffers and the source code. This is given in source as heap_bt.c. The buffer management module is based on the multiple fixed size buffer pools. The buffer pools are configurable in the terms of size and number of buffers. The buffer pools are created from static heap_memory of heap_bt.c defined by OS_MAX_HEAP_MEMORY at the time of initialization and only managed henceforth. This is used exclusively for Bluetooth related functionality and is not expected to be changed by the user.

MindTree Limited

7 April 2011

Page 33 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Directory Structure
The high-level directory structure for MSP430 SPP package is provided below for reference, with notes against the main directories.

MSP-EXP430F5438+PAN1315EMK Directory Structure


+---bluetooth +---build | +---msp430 | +---spp | +---accl | | +---iar | | +---release | +---lib[EtherMind Stack, Profile and Platform Library] | | +---iar | +---simple | | +---iar | | +---release | +---temp | | +---iar | | +---release | +---workspace[IAR workspace files] | +---iar +---export | +---accl_appl[contains accelerometer application files] | +---common_appl[contains common application files] | +---FreeRTOS[contains FreeRTOS related files] | | +---Demo | | | +---msp430_IAR | | +---License | | +---Source | | +---include | | +---portable | | +---IAR | | | +---MSP430 | | +---MemMang[Memory management related files] | +---include[contains EtherMind Stack Header files BT_*_api.h] | +---msp430f5438_hal[HAL Files] | +---simple_appl[contains simple package application files] | +---temp_appl[contains temperature package application files] +---private +---platforms[contains platform abstraction source code] | +---arch | +---common | +---msp430 +---protocols +---sm[sm related header files]

MindTree Limited

7 April 2011

Page 34 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

EZ430-RF2560 Directory Structure


+---bluetooth +---build | +---msp430 | +---spp | +---ez430-accl | | +---iar | | +---release | +---lib[EtherMind Stack, Profile and Platform Library] | | +---iar | +---workspace [IAR workspace files] | +---iar +---export | +---accl_appl[contains accelerometer application files] | +---common_appl[contains common application files] | +---FreeRTOS[contains FreeRTOS related files] | | +---Demo | | | +---msp430_IAR | | +---License | | +---Source | | +---include | | +---portable | | +---IAR | | | +---MSP430 | | +---MemMang[Memory management related files] | +---include[contains EtherMind Stack Header files BT_*_api.h] | +---msp430f5438_hal[HAL Files] | +---accl_appl[contains accelerometer package application files] +---private +---platforms[contains platform abstraction source code] | +---arch[architecture files] | +---common | +---msp430 +---protocols +---sm[sm related header files]

MindTree Limited

7 April 2011

Page 35 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Building Bluetooth SDK Components for MSP430


MSP-EXP430F5438+PAN1315EMK
Follow the steps below to build the required binary components for the EtherMind Bluetooth SDK: 1. Configure parameters specific to the temperature application in BT_SDK_DIR \bluetooth\export\temp_appl\sdk_bluetooth_config.h 2. Configure common Bluetooth related parameters in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_bluetooth_common_config.h 3. Configure the pins related to Bluetooth operation in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_pin_config.h 4. Open the workspace placed in BT_SDK_DIR \bluetooth\build\msp430\spp\workspace\iar\SPP.eww

The workspace contains three projects accl, temp and simple as shown below

MindTree Limited

7 April 2011

Page 36 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

o o o

Choose the accl tab to build the accelerometer package Choose the temp tab to build the temperature package Choose the simple tab to build simple package

5. Right click on the project name that needs to be built and chose the Make option. This will build the required binary file that needs to be downloaded to the target. This is shown in the

picture below:

EZ430-RF2560
Follow the steps below to build the required binary components for the EtherMind Bluetooth SDK: 1. Configure the parameters specific to accelerometer application in BT_SDK_DIR \bluetooth\export\accl_appl\sdk_bluetooth_config.h

2. Configure configure common Bluetooth related parameters in BT_SDK_DIR \bluetooth\export\common_appl\sdk_bluetooth_common_config.h

MindTree Limited

7 April 2011

Page 37 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

3. Configure the pins related to Bluetooth operation in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_pin_config.h 4. To launch IAR MSP430 EW IDE, open the workspace placed in BT_SDK_DIR \bluetooth\build\msp430\spp\workspace\iar\ez430-accl.eww

5. Right click on the project ez430-accl and chose the Make option. This will build the required binary file that needs to be downloaded to the target. This is shown in the picture below:

MindTree Limited

7 April 2011

Page 38 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

7 April 2011

Page 39 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Installation of Bluetooth SDK Components


The EtherMind stack and libraries are provided in the locations given below:

EtherMind Stack API & Profile Libraries for MSP430 with IAR
Following EtherMind Stack & Profile API Libraries are located in BT_SDK_DIR /bluetooth/build/msp430/spp/lib/iar. Component libspp_core.r43 Remarks EtherMind Stack API Library for

EtherMind Initialization & Shutdown APIs EtherMind HCI APIs & Callback Management EtherMind SDP APIs & Callback Management, including SDP Database APIs EtherMind RFCOMM APIs & Callback Management EtherMind Serial Port Profile (SPP) Library

libspp_pl.r43 libs_TI_init_script.r43

Platform related Library Contains the TI initialization scripts for the Bluetooth controller

MindTree Limited

7 April 2011

Page 40 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuring EtherMind Stack API Library


MSP-EXP430F5438+PAN1315EMK
The EtherMind configuration file BT_SDK_DIR\bluetooth\export\temp_appl\sdk_bluetooth_config.h can be customized before building the temperature application using the EtherMind Stack API library. Similarly, the configuration file BT_SDK_DIR\bluetooth\export\accl_appl\sdk_bluetooth_config.h can be customized before building the accelerometer application using the EtherMind Stack API library. Similarly, the configuration file BT_SDK_DIR\bluetooth\export\simple_appl\sdk_bluetooth_config.h can be customized before building the simple application using the EtherMind Stack API library. The pin configuration related to Bluetooth functionality can be done using the configuration file BT_SDK_DIR\bluetooth\export\common_appl\sdk_pin_config.h The UART baud rate, System Clock and Low Power mode for MSP430 can be configured before building the temperature or accelerometer application using the configuration file BT_SDK_DIR\bluetooth\export\common_appl\sdk_bluetooth_common_config.h Once changes are done to the configuration files, the corresponding workspaces will need to be rebuilt to generate the new images.

EZ430-RF2560
The EtherMind configuration file BT_SDK_DIR\bluetooth\export\accl_appl\sdk_bluetooth_config.h can be customized before building the accelerometer application using the EtherMind Stack API library. The pin configuration related to Bluetooth functionality can be done using the configuration file BT_SDK_DIR\bluetooth\export\common_appl\sdk_pin_config.h The UART baud rate, System Clock and Low Power mode for EZ430 can be configured before building the temperature or accelerometer application using the configuration file BT_SDK_DIR\bluetooth\export\common_appl\sdk_bluetooth_common_config.h

Once changes are done to the configuration files, the corresponding workspaces will need to be rebuilt to generate the new images.

Configuration parameters for the Application and EtherMind Stack


The table below lists various parameters that can be configured as part of the Bluetooth solution.

MindTree Limited

7 April 2011

Page 41 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Application Configuration The color coding legend used is HW Configuration

Configuration SDK_CONFIG_DEVICE_NAME

Remarks Local Bluetooth device name Default: BlueMSP- Note: Any name for the local device can be set using this configuration parameter

SDK_REM_DEV_NAME_PREFIX

Prefix of the remote Bluetooth device name to which SPP connection is allowed from the local device Default: BlueMSP- Note: Any prefix of the remote Bluetooth device name can be set using this configuration parameter

SDK_REM_BT_DEV_NAME_MAX_LEN

Maximum length of remote device name which will be stored by the local device Default: 17 Characters Note: If remote device name length is expected to be 20 characters which needs to be stored by the local device then this parameter has to be set to 20

SDK_CONFIG_PIN

Pass key which is used during pairing procedure Default : 0000 Note: Using this configuration parameter PIN can be changed to say 1234

SDK_CONFIG_ACL_PKT_TYPE

This parameter specifies which packet types the Link Manager shall use for the ACL connection Default: LMP_ACL_DM1|LMP_ACL_DH1|LMP_ACL_DM3| LMP_ACL_DH3|LMP_ACL_DM5|LMP_ACL_DH5 Note: The Link Manager chooses which packet type to be used from this list of packet types

SDK_CONFIG_LINK_SUPERVISION_TIMEOUT

Bluetooth ACL Link Supervision Timeout value Default value: 0x1900 (4 secs) Example: If Link Supervision Timeout required is 5 secs then this macro has to be set to 0x1F40 which is ((5 * 10 ^ 3)/0.625)

SDK_CONFIG_LINK_POLICY_SETTINGS
MindTree Limited 7 April 2011

This parameter determines the behavior of the local


Page 42 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks link manager when it receives a request from a remote device or it determines itself to change the masterslave role or to enter park state, hold, or sniff mode Default: 0x0005 (Enable Role Switch and Enable Sniff Mode) Example: 0x0002 (To Enable Hold mode only)

SDK_INQUIRY_LAP

This is the LAP from which the inquiry access code is derived when the inquiry procedure is made Default: BT_LIAC (Limited Inquiry Access Code : 0x9e8b00) Example: To perform Inquiry using General Inquiry Access Code,this parameter has to be set to BT_GIAC (0x9e8b33)

SDK_INQUIRY_LEN

This parameter determines maximum amount of time before the Inquiry is halted Default: 0x0C (15 secs) Example: If Inquiry has to be performed for say 9 seconds then this parameter has to be set to 0x07 which is (7 * 1.28 ~ 9 secs)

SDK_NUM_RESPONSES

This parameter determines maximum number of responses from the Inquiry before the Inquiry is halted Default: 0x00 (Unlimited number of responses) Example: If number of responses has to be set to 5 then this parameter has to be set to 0x05

SDK_INQUIRY_SCAN_LAP

This parameter determines the LAP(s) used to create the Inquiry Access Codes (IAC) that the local Bluetooth device is simultaneously scanning for during Inquiry Scans. Default: BT_GIAC, BT_LIAC (Implies local device uses both General and Limited inquiry scan access codes) Example: If local Bluetooth device has to use only General Inquiry Access code then this parameter has to be set to BT_GIAC only.

SDK_INQ_MAX_DEVICES

Maximum number of remote devices (discovered during Inquiry procedure) information stored by the local device Default:0x07 (Seven remote devices information)

SDK_CONFIG_COD

The Class_of_Device parameter is used to indicate the capabilities of the local device to other devices Default: BT_MSC_LIM_DISC_MODE|BT_MDC_TOY|BT_TMC_GAME

MindTree Limited

7 April 2011

Page 43 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks (Indicated device is discoverable by limited inquiry procedure, major device class is Toy and minor device class is Game) Example: If class of device needs to indicate thermometer capability then this parameter has to be set to BT_MDC_HEALTH|BT_HMC_THERMOMETER

SDK_IO_CAPABILITY

Local Device Input Output capability. Default: SM_IO_CAPABILITY_DISPLAY_YES_NO (Implies Local Device has the ability to display or communicate a 6 digit decimal number and has at least two buttons that are mapped easily to 'yes' and 'no') Example: If local device doesnt have any input and output capability then this parameter has to be set to SM_IO_CAPABILITY_NO_INPUT_NO_OUTPUT

SDK_ENABLE_SNIFF_MODE

Enables the sniff mode procedures Default: Enabled

SDK_CONFIG_SNIFF_MIN_INTERVAL

Minimum period in the sniff mode Default value : 0x0640 (1 second) Example: If minimum sniff period required is 1 second then this macro has to be set to 0x0800 which is ((1 * 10 ^ 3)/0.625)

SDK_CONFIG_SNIFF_MAX_INTERVAL

Maximum period in the sniff mode Default value : 0x0800 (1.2 seconds) Example: If maximum sniff period required is 1 second then this macro has to be set to 0x0640 which is ((1 * 10 ^ 3)/0.625)

SDK_CONFIG_SNIFF_ATTEMPT

Number of Baseband receive slots for sniff attempt Default value: 2 Note: Using this configuration parameter sniff attempt can be changed to say 10 baseband receive slots

SDK_CONFIG_SNIFF_TIMEOUT

Number of Baseband receive slots for sniff timeout Default value: 1 Note: Using this configuration parameter sniff timeout

MindTree Limited

7 April 2011

Page 44 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks can be changed to say 3 baseband receive slots

SDK_CONFIG_SPP_PEER_SERVER_CHANNEL

Port address of peer SPP de-vice, to be used only if the application needs to initiate connection with a fixed SPP de-vice on this fixed port. It is not necessary that if SDK_CONFIG_SPP_PEER_BD_ADDR is defined then this configuration parameter is also defined. Default : 0x01 Example: If the peer server channel number needed is 0x01, then 0x01 has to be set.

SDK_CONFIG_SPP_AUTHENTICATION_LEVEL

This

parameter

determines

the

SPP

Service

Authentication requirements. Default: SM_SERVICE_SECURITY_LEVEL_3 (Which implies strong MITM protection desired, Encryption desired and User interaction acceptable) Example: If security level 2 which implies MITM protection not necessary and Encryption desired is required then this parameter has to be set to SM_SERVICE_SECURITY_LEVEL_2 SDK_CONFIG_SPP_AUTHORIZATION_REQ This parameter determines the SPP Service Authorization requirements. Default: service) Example: parameter If Authorization needs to is required be then set this to SM_SERVICE_AUTHORIZATION_NONE (Which

implies no authorization is needed for accessing SPP

SM_SERVICE_AUTHORIZATION_REQUIRED SDK_CONFIG_SPP_BONDING_REQ This parameter determines the SPP Service Bonding requirements. Default: 0x00 (Implies No Bonding) Example: If Bonding is required then this parameter has to be set to 0x01. SDK_SPP_ATTRIB_DATA_LEN This parameter determines the SDP query buffer length for SPP. Default: 48 bytes

MindTree Limited

7 April 2011

Page 45 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks

SDK_MAX_OUTPUT_POWER_LEVEL

This parameter determines the maximum output power level. Default: defined vendor_specific_init.h. Example: If the maximum output level required is 10db, then OP_POWER_10_0 has to be used OP_POWER_6_0 in (Enumerated values are

BT_SDK_DIR/

bluetooth/private/platforms/arch/common/

BT_UART_CONFIG_BAUDRATE

UART baud rate to be used for the communication between MSP430 and CC2560 Default: BAUDRATE_115200 Example: Once the firmware up gradation of CC2560 is complete, UART baud rate of CC2560 will be changed to the value defined.

BT_UART_PORT_SEL

UART tx and rx port selection register Default : P9SEL Example : If Pin8.4 and Pin8.5 are used for HCI_TX and HCI_RX signals on MSP430 then BT_UART_PORT_SEL should be set to P8SEL

BT_UART_PORT_DIR

UART tx and rx port direction register Default: P9DIR Example: If Pin8.4 and Pin8.5 are used for HCI_TX and HCI_RX signals on MSP430 Then BT_UART_PORT_DIR should be set to P8DIR

BT_UART_PORT_OUT

Select the UART Tx and Rx PortOUT register Default : P9OUT

BT_UART_TX_PIN

UART tx pin Default: BIT4 Example: if Pin 7.6 is used for HCI_TX signal then the value should be set to BIT6

BT_UART_RX_PIN
MindTree Limited 7 April 2011

UART rx pin
Page 46 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks Default:BIT5 Example: if Pin 7.7 is used for HCI_RX signal then the value should be set to BIT7

BT_UART_RTS_PORT_DIR

UART RTS port direction selection register Default:P1DIR Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2DIR

BT_UART_CTS_PORT_DIR

UART CTS port direction selection register Default:P1DIR Example: If pin3.2 are used as HCI_RTS signal for MSP430 then the value should be set to P3DIR

BT_UART_CTS_PIN

UART CTS pin Default:BIT5 Example: If Pin 2.6 is used as HCI_CTS signal for MSP430 then the value should be set to BIT6

BT_UART_RTS_PIN

UART RTS pin Default:BIT2 Example: If pin1.3 are used as HCI_RTS signal for MSP430 then the value should be set to BIT3

BT_UART_CTS_PORT_IES

UART CTS Port IES Default : P1IES Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2IES

BT_UART_CTS_PORT_IFG

UART CTS PORT IFG Default : P1IFG Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2IFG

BT_UART_CTS_PORT_IE

UART CTS PORT IE Default : P1IE Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2IE

MindTree Limited

7 April 2011

Page 47 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration BT_UART_CTS_PORT_SEL

Remarks UART CTS PORT SELECT Default : P1SEL Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2SEL

BT_UART_RTS_PORT_SEL

UART RTS PORT SELECT Default : P1SEL Example: If Pin 2.5 is used as HCI_RTS signal for MSP430 then the value should be set to P2SEL

BT_UART_RTS_PORT_OUT

UART RTS port output register Default: P1OUT Example: If pin3.2 are used as HCI_RTS signal for MSP430 then the value should be set to P3OUT

BT_UART_CTS_PORT_OUT

UART CTS port output register Default: P1OUT Example: If Pin 2.5 is used as HCI_CTS signal for MSP430 then the value should be set to P2OUT

BT_UART_CTS_PORT_IN

UART CTS port input register Default: P1IN Example: If Pin 3.5 is used as HCI_CTS signal for MSP430 then the value should be set to P3IN

BT_UART_CTS_PORT_REN

This parameter is used to define CTS Port Register pull up enable Default : P1REN Example: If Pin 3.5 is used as HCI_CTS signal for MSP430 then the value should be set to P3REN

BT_UART_REG_UCAXCTL0

UART control register 0 Default: UCA2CTL0 Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2CTL0

MindTree Limited

7 April 2011

Page 48 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration BT_UART_REG_UCAXCTL1

Remarks UART control register 1 Default: UCA2CTL1 Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2CTL1

BT_UART_REG_UCAXBR0

UART baud rate selection register 0 Default: UCA2BR0 Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2BR0

BT_UART_REG_UCAXBR1

UART baudrate selection register 1 Default: UCA2BR1 Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2BR1

BT_UART_REG_UCAXIV

UART Interrupt vector register Default: UCA2IV Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2IV

BT_UART_REG_UCAXSTAT

UART output status register Default: UCA2STAT Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2STAT

BT_UART_REG_UCAXTXBUF

UART Tx buffer register Default: UCA2TXBUF

MindTree Limited

7 April 2011

Page 49 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2TXBUF

BT_UART_REG_UCAXRXBUF

UART Rx buffer register Default: UCA2RXBUF Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2RXBUF

BT_UART_REG_UCAXMCTL

UART modulation control register Default: UCA2MCTL Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2MCTL

BT_UART_REG_UCAXIE

UART interrupt enable register Default: UCA2IE Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller, then the value should be set as UCA2IE

BT_UART_REG_UCAXIFG

UART interrupt flag register Default: UCA2IFG Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and CC2560 controller,then the value should be set as UCA2IFG

BT_UART_VECTOR

This parameter defines UART interrupt vector register Default : USCI_A2_VECTOR Example : Example: If USCI_A2 module on MSP430 is used for UART transport between MSP430 and

MindTree Limited

7 April 2011

Page 50 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks CC2560 controller,then the value should be set as USCI_A2_VECTOR

BT_UART_CTS_REG_PXIV

This parameter defines the Interrupt vector value generated for CTS pin interrupt Default : P1IV_P1IFG3 Example: If Pin 1.4 is used as HCI_CTS signal for MSP430 then the value should be set to P1IV_P1IFG4

BT_CTS_PIN_VECTOR

This parameter defines the interrupt vector for the CTS pin when it needs to wake from eHCILL deep sleep mode Default : PORT1_VECTOR Example: If CTS pin is configured on Port1, then it is defined as PORT1_VECTOR. If CTS pin is configured on Port2, it needs to be defined as PORT2_VECTOR.

BT_BRF_CLK_PORT_SEL

BRF Clock Port Select Default: P11SEL Example: If Pin 11.0 is used as ACLK for MSP430 then the value should be set to P11SEL

BT_BRF_CLK_PORT_PIN

BRF Clock Port Pin Default: BIT0 Example: If Pin 11.0 is used as ACLK for MSP430 then the value should be set to BIT0

BT_BRF_NSHUTDOWN_PORT_DIR

BRF nShutdown Port Direction Default: P1DIR Example: If Pin 1.6 is used as nSHUTDOWN for CC2560 then the value should be set to P1DIR

BT_BRF_NSHUTDOWN_PORT_PIN

BRF nShutdown Port Pin Default: BIT6 Example: If Pin 1.6 is used as nSHUTDOWN for CC2560 then the value should be set to BIT6

BT_BRF_NSHUTDOWN_PORT_OUT

BRF nShutdown Port Out

MindTree Limited

7 April 2011

Page 51 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Configuration

Remarks Default: P1OUT Example: If Pin 1.6 is used as nSHUTDOWN for CC2560 then the value should be set to P1OUT

SYSTEM_CLK

set the system clock hal_board.h Default: SYSCLK_18MHZ Example : to

to any value defined in

configure

the

system

clock

of

MSP430BT5190 processor to 12Mhz set the value to SYSCLK_12MHZ The configuration values are defined in hal_board.h INACTIVITY_TIMEOUT This parameter defines the inactivity timeout for MSP430 to enter LPM Default : 30 seconds Example: If MSP430 needs to enter LPM after 15 seconds of inactivity, then it should be set to 15 seconds. MSP430_LPM_ENABLE This parameter enables Low Power Mode feature of MSP430 Default : Enabled Example : To disable, comment the parameter SDK_MSP430_LPM Define the low power mode for MSP430

Default: MSP430_LPM_3 Example: If you want to set LPM0 as Low power mode for MSP430 then set the value to MSP430_LPM_0

MindTree Limited

7 April 2011

Page 52 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Setup details
MSP-EXP430F5438+PAN1315EMK -Temperature application
The setup uses three MSP-EXP430F5438 connected with the PAN1315ETU. The MSP430BT5190 runs the MindTree EtherMind stack. It is used to send the temperature data on the boards to each other over SPP. The temperature data is displayed on the LCD on the MSP-EXP430F5438. Each of the MSP430BT5190 acts simultaneously as initiator(Device that initiates the SPP connection) and acceptor(Device that accepts the Connection).

Device 2 running EtherMind stack

SPP Data

SPP Data

SPP Data

Device 1 running EtherMind stack

Device 3 running EtherMind stack

MindTree Limited

7 April 2011

Page 53 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Steps to set up: 1. 2. 3. 4. Connect the PAN1315ETU module to MSP-EXP430F5438 as described in the Requirements section. Make sure you have connected the RF PWR jumper (JP3) and LED2 (red LED )on the PAN1315ETU is ON Load the SPP binary image onto the MSP-EXP430F5438 using the FET as described in the Appendix Power on the MSP430 board using Battery or USB. To power on using battery, place the switch POWER SELECTOR (SW1) at BATT position. To power on using USB, place the switch SW1 at USB position Once powered on the following display will appear on the LCD MAINMENU BLUETOOTH SETTINGS INFO

5.

6. 7.

By default Backlight of the LCD will be OFF Refer Controlling the backlight of LCD section for controlling backlight of LCD The LCD is used for both as a menu selector and Status indicator. User has three options: BLUETOOTH, SETTINGS and INFO. Against each option, the following sub menus and their current status are shown. BLUETOOTHMENU BLUETOOTH:OFF VISIBLE:NO STARTINQUIRY CONNECT:0 DATASEND:0 DISCONNECT TEMPERATURE DIAGNOSTICS SETTINGSMENU SETFREQUENCY SETBAUDRATE

MindTree Limited

7 April 2011

Page 54 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

INFOMENU VERSION5.16 FREQUENCY18MHz BAUDRATE115200 DEVTYPEBT5190 VOLTAGE3.3V IAR5.20.2

User can select the option using Joystick to do opposite of the current status For Example: BLUETOOTH: ON means the Bluetooth is powered ON and to power off Bluetooth user has to select this option using joystick. Please refer the section Usage of Menu options, LED Status indications and LCD Status indications. 8. Select the BLUETOOTH ON option on LCD using the details given in usage of menu options section 9. LED1 (RED LED) on the MSP430 board starts blinking and after a few seconds becomes stable. The LCD should indicate the status against BLUETOOTH : as ON If LED stops blinking and the LCD status against BLUETOOTH : is OFF, then switching on Bluetooth was unsuccessful. In that case, reset the board and repeat step 9 10. Make the device discoverable by selecting the VISIBLE: option on LCD. 11. In the status area, the status against VISIBLE: changes to YES. BLUETOOTHMENU BLUETOOTH:ON VISIBLE:YES STARTINQUIRY CONNECT:0 DATASEND:0 DISCONNECT TEMPERATURE DIAGNOSTICS 12. Select start inquiry which searches for the Bluetooth devices and the list gets populated with the BD address and BT device name toggling for 3 sec. 13. After the inquiry is completed, in the Inquiry Menu screen, the status changes to COMPLETED . 14. Select BLUETOOTH MENU -> SPP CONNECT -> CONNECT DEVICE option. Here, the inquired device with the name starting from BlueMSP gets displayed. Choose a device to get connected. CONNECTPEER BlueMSP5C2F BlueMSP5CA3

MindTree Limited

7 April 2011

Page 55 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

NOTE: After its connected, the device will no longer be there in the connected device list. It moves to the disconnected device list. 15. LED2 turns ON and the status against SPP CONNECT changes to 1 indicating that one device is connected. BLUETOOTHMENU BLUETOOTH:ON VISIBLE:YES STARTINQUIRY CONNECT:1 DATASEND:0 DISCONNECT TEMPERATURE DIAGNOSTICS 16. To disconnect the connected device, Select BLUETOOTH MENU -> SPP CONNECT -> DISCONNECT DEVICE and the device to disconnect. On doing this, LED2 turns OFF and the status of SPP CONNECT changes to NO. 17. For SPP data transfer, select BLUETOOTH MENU -> DATSEND option on the board. It lists down the connected devices. Select the device to which the SPP temperature data has to be sent. 18. LED 2 on MSP430board starts blinking and the status against DATASEND changes to 1 indicating that the SPP data is being sent to one peer device. BLUETOOTHMENU BLUETOOTH:ON VISIBLE:YES STARTINQUIRY CONNECT:1 DATASEND:1 DISCONNECT TEMPERATURE DIAGNOSTICS

19. In DeviceB, Select BLUETOOTH MENU -> TEMPERATURE to view its own boards temperature and temperature sent by the peer1(DeviceA). 20. Select BLUETOOTH MENU -> DIAGNOSTICS to view the local device name, BD Address, Controller Version, Peer1 menu and Peer2 menu. DIAGNOSTICS BlueMSP9324 ADR9324DAD42300 CTRLVER0x0F06 SNIFFENABLED LPMENABLED PEER1MENU PEER2MENU

MindTree Limited

7 April 2011

Page 56 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

If the controller used is PG 3.10 (2.0.310x2isthemajornumberand0x1Fistheminornumber), then the CTRLVER will be displayed as PG 3.10 21. If the user wants to send SPP data to Peer2 as well, then repeat the steps from step9. Accordingly the status change should happen.

EZ430-RF2560 - Accelerometer application


The setup uses two EZ430-RF2560 target boards, one is connected to the PC/laptop via the emulator board, and the other is connected to the battery pack. The EZ430 target boards run the MindTree EtherMind stack, which is used to create an SPP connection between them. Once the SPP connection has been established, the boards begin sending the locally sampled accelerometer data to the peer. The target board connected to the PC/laptop, forwards the the accelerometer data received over the SPP connection, onto the USB port. The acclerometer data so received is mapped into keypresses and is written into the keyboard events buffer by the PC application. Now, if we are running a PC game such as PPRacer, the direction inputs to the game can be given from the remote bluetooth device. The setup is shown in the below picture:

SPP link with accelerometer data

EZ430-RF2560 target board + emulator board (Forwards the accelerometer data onto the PC/Laptop)

EZ430-RF2560 target board powered by the battery pack (Acting as remote control)

MindTree Limited

7 April 2011

Page 57 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Steps to set up: 1. 2. 3. Load the SPP binary image onto two EZ430-RF2560 modules usingtheemulatorboard.

ConnectoneofthemodulestothePC/laptopandtheothertothebatterypackandpoweriton.
Once powered on, the LED1 on both the modules will start toggling, indicating the Bluetooth ON procedure. Once the Bluetooth ON is completed, LED1 will stop toggling and will stabilize to the power-on state. At the same time LED2 will begin blinking slowly, indicating that the device is in a discoverable state. Once both the modules have been so initialized, press the S1 button on any one of the boards to trigger a Bluetooth connection. Now, we see that the initiator devices LED2 starts blinking faster, which indicates that this device has begun discovering its neighboring devices to connect to. Within a short time, the initiator should be able to see the discoverable device and connect to it. If an SPP connection has been successfully established between the two devices, it is indicated by LED2 on both devices going to a solid ON state. As soon as the SPP connection has been established, both the devices start exchanging the local accelerometer data over the SPP link. The accelerometer data being transmitted to the peer can be stopped/started using the S2 button. Open the keyboard events generator application, and select an appropriate COM port by following instructions on the console. This application maps the accelerometer data into keypresses and is writes it into the keyboard events buffer.This data is also printed on the console and should change when the EZ430 device connected to the battery pack is moved. Now, start the PPRacer game. You should be able to control the game using the EZ430 device connected to the battery pack as a remote control.

4.

5.

6.

7.

8.

9.

Simple application
Simple application is the basic application, which switches on the Bluetooth and set the device visibility ON. It has the provision of establishing the SPP connection, if the connection is initiated from the peer device only. The set up contains one MSP-EXP430F5438 connected with the PAN1315ETU and other peer Bluetooth Device. Peer device name has to be configured as BlueMSP-Appl for establishing successful SPP connection. Once the SPP connection is successfully established, then the simple application starts sending the data over SPP connection.

MindTree Limited

7 April 2011

Page 58 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

LCD Menu navigation with MSP-EXP430F5438+PAN1315EMKTemperature application


The joystick is used to select the various options on the menu displayed on the LCD. The joystick is be mapped to UP, DOWN, LEFT, RIGHT and CENTER keys. This is explained below: Moving the joystick DOWN navigates to the next item Moving the joystick UP navigates to the previous menu item Moving the joystick LEFT navigates to the previous screen. If there is no previous screen, no further action is performed. Moving the joystick RIGHT does not cause any action to take place. Pressing the joystick CENTER button selects an option. This is done only on items that have been highlighted.

Examples of Menu Navigation


BLUETOOTH MENU
SelecttheBLUETOOTH option on the top level menu to perform Bluetooth related operations.
Select BLUETOOTH option to toggle the ON/OFF status of Bluetooth. Select VISIBLE: option to toggle the visibility the Bluetooth device. This automatically turns to OFF once two devices have been connected. The application sets the device in limited inquiry mode. Select START INQUIRY to discover other visible bluetooth devices. This populates the list of peer devices that the device can connect to in the CONNECT menu. Once inquiry is complete, a pop-up message shows Inquiry Completed. Limited inquiry option is used instead of the General inquiry. This means that only other devices in the limited inquiry mode are made visible to it. Select CONNECT to establish the SPP connection to the peer device. The connection to the peer device is restricted based on the remote device name starting with BlueMSP- Select DATA SEND to start or stop sending SPP data to the peer device. Select DISCONNECT to disconnect the SPP connection with any connected peer devices. Select TEMPERATURE to display its own and peer device temperature readings. Select DIAGNOSTICS to display the Local BD-address and connected peers Tx power and RSSI

MindTree Limited

7 April 2011

Page 59 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SETTINGS MENU
Select the SETTINGS option on the top level menu to change the frequency and baud rate operation. SET FREQUENCY to set the frequency SET BAUDRATE to set the baudrate

Currently, only the following combinations are supported: 1. 8 MHz at 115.2 Kbps 2. 12 MHz at 115.2 Kbps 3. 18 MHz at 115.2 Kbps 4. 25 MHz at 115.2 Kbps 5. 25 MHz at 921.6 Kbps Note that the 25 MHz is supported only for the BT5190 and the MSP430F5438A devices.

INFO MENU
Select the INFO option on the top level menu to view the following information: 1. Software version 2. Frequency of board operation 3. Baud rate used 4. Device type a. For MSP430F5438 device, F5438 is displayed b. For MSP430F5438A device, F5438A is displayed c. For BT5190 device, BT5190 is displayed. NOTE: The MSP430F5438 and MSP430F5438A devices run in the evaluation mode and have a timeout associated with the Bluetooth operations. 5. Power supply voltage 6. Toolchain name and version

MindTree Limited

7 April 2011

Page 60 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

LCD status indications for MSP-EXP430F5438+PAN1315EMK Temperature application


Line on status area BLUETOOTH: Indication against it ON OFF VISIBLE: YES Meaning Bluetooth powered ON Bluetooth Powered OFF The device will respond to the inquiry by peer device The device will not respond to the inquiry by peer device Number of active SPP connections. No of devices to which data is getting transmitted

NO

CONNECT: DATA SEND:

0 or 1 or 2 0 or 1 or 2

LCD backlight control for MSP-EXP430F5438+PAN1315EMK Temperature application


By default, the backlight of LCD will be OFF. The LCD backlight of the LCD can be toggled by pressing the switch S1. Note that the backlight is automatically switched off when MSP430 enters LPM mode.

MindTree Limited

7 April 2011

Page 61 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

LED STATUS INDICATIONS


MSP-EXP430F5438+PAN1315EMK
There are two LEDs on the MSP-EXP430F5438. LED1 is red & LED2 is yellow. This section describes the various states of the LEDs for different applications.

Temperature Application
LED1 (Red)
OFF OFF OFF ON ON ON BLINKING BLINKING BLINKING

LED2 (Yellow)
OFF ON BLINKING OFF ON BLINKING BLINKING OFF ON

Description
Bluetooth powered off Error condition Error condition Bluetooth powered ON. No active SPP connections. SPP connection established to peer device SPP data is being transferred. Error condition Bluetooth powering on in progress Error condition

Accelerometer Application
LED1 (Red)
OFF OFF OFF ON ON ON

LED2 (Yellow)
OFF ON BLINKING OFF ON SLOW BLINKING FAST BLINKING

Description
Bluetooth powered off Error condition Error condition Bluetooth powered ON. No active SPP connections. SPP data is being transferred Device is in inquiry scan mode Device is in inquiry mode. If it finds another BlueMSP430-Demo device, it will connect automatically and data transfer will begin.

MindTree Limited

7 April 2011

Page 62 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BLINKING BLINKING BLINKING

BLINKING OFF ON

Error condition Bluetooth powering on in progress Error condition

Simple Application
LED1 (Red)
OFF OFF OFF ON ON BLINKING BLINKING BLINKING

LED2 (Yellow)
OFF ON BLINKING OFF ON BLINKING OFF ON

Description
Bluetooth powered off Error condition Error condition Bluetooth powered ON. No active SPP connections. SPP data is being transferred Error condition Bluetooth powering on in progress Error condition

EZ430-RF2560
There are two LEDs on the EZ430-RF2560. LED1 is Red & LED2 is Blue. The table below describes shows the various states of the LEDs for the accelerometer application

LED1 (Red)
OFF OFF OFF ON ON ON

LED2 (Blue)
OFF ON BLINKING OFF ON SLOW BLINKING FAST BLINKING

Description
Bluetooth powered off Error condition Error condition Bluetooth powered ON. No active SPP connections. SPP data is being transferred Device is in inquiry scan mode Device is in inquiry mode. If it finds another BlueMSP430-Demo device, it will connect automatically and data transfer will begin.

MindTree Limited

7 April 2011

Page 63 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BLINKING BLINKING BLINKING

BLINKING OFF ON

Error condition Bluetooth powering on in progress Error condition

MindTree Limited

7 April 2011

Page 64 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Low power mode configurations


MSP430 family is designed for ultralow-power applications and uses different Low power modes to achieve low power consumption. To know more about the different Low power modes and on important factors while using the LPM in application refer to sections Operating Modes -1.4 and Principles for LowPower Applications -1.5 of MSP430x5xx Family User's Guide

LPM implementation in sample SPP application


MSP-EXP430F5438+PAN1315EMK-Temperature application
The SPP application puts the MSP430 into low power mode when there is no activity. The default setting for the low power mode is LPM3. To set the low power mode for MSP430, change #define SDK_MSP430_LPM in BT_SDK_DIR/bluetooth/export/common_appl/sdk_bluetooth_common_config.h to any value given in table depending on the low power mode chosen:

Low Power Mode


LPM 0 LPM1 LPM2 LPM3

Definition
MSP430_LPM_0 MSP430_LPM_1 MSP430_LPM_2 MSP430_LPM_3

Note: LPM4 is not a valid low power mode for the Bluetooth application since it shutdowns the slow clock. The slow clock is required in sleep mode for valid Bluetooth operation.

MSP430enterslowpowermodeif:
1. There is no activity for 30 seconds a. No data was transferred for the last 30 seconds b. No joy stick or push button movements were done for the last 30 seconds NOTE: Entry to low power mode is indicated by turning off the LCD display and the LCD backlight (if it was ON earlier). MSP430 exits from low power mode if: 1. Joystick movement is detected on the MSP430 board 2. Data is received from the peer device

MindTree Limited

7 April 2011

Page 65 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

EZ430-RF2560-Accelerometer application
The SPP application puts the EZ430 into low power mode when there is no activity. The default setting for the low power mode is LPM3. To set the low power mode in EZ430, change #define SDK_MSP430_LPM in BT_SDK_DIR/bluetooth/export/common_appl/sdk_bluetooth_common_config.h to any value given in table depending on the low power mode chosen:

Low Power Mode


LPM 0 LPM1 LPM2 LPM3

Definition
MSP430_LPM_0 MSP430_LPM_1 MSP430_LPM_2 MSP430_LPM_3

Note: LPM4 is not a valid low power mode for the Bluetooth application since it shutdowns the slow clock. The slow clock is required in sleep mode for valid Bluetooth operation.

EZ430 enterslowpowermodeif: 2. There is no activity for 30 seconds a. No data was transferred for the last 30 seconds b. No joy stick or push button movements were done for the last 30 seconds NOTE: Entry to low power mode is indicated by turning off the LEDs (if they were ON earlier). EZ430 exits from low power mode if: 3. Joystick movement is detected on the EZ430 board Data is received from the peer device

LPM and Bluetooth Stack considerations


AsrecommendedinprinciplesofLPMapplications,peripheralslikeLEDsandLCD,temperatureSensor, timersandUARTneedtobeturnedOFF.Theseperipheralsarerestoredtonormalfunctionalitywhile exitingLPM. MSP430exitsLPMbyUARTinterruptwhendataisreceivedonUART.So,ifeHCILLisdisabledinthe application,theUARTshouldnotbeturnedOFF.IfeHCILLisenabled,UARTcanbeturnedOFFasUARTis reconfiguredinCTSpininterrupthandlerduringwakeupfromCTSmechanism.Toknowmoreaboutthe eHCILLprotocolrefertothesectionPowerSavingModeseHCILLMode
MindTree Limited 7 April 2011 Page 66 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Maximum output power configurations for CC2560 Bluetooth Controller


sdk_set_max_output_power API present in BT_SDK_DIR/Bluetooth/private/platforms/arch/common/vendor_specific_init.h is provided to set the maximum output power at the CC2560 chip port. API Description is given below:

sdk_set_max_output_power ()
API_RESULT sdk_set_max_output_power ( OUTPUT_POWER_LEVEL max_power )

Parameters:
max_power: Maximum output power in dBm. Valid values are defined in BT_SDK_DIR/ Bluetooth/private/platforms/arch/common/ vendor_specific_init.h header file. The valid values range from 4dBm to 12dBm in steps of 0.5dBm.

Returns:
API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h The default maximum output power configured by TI initscript is 12dBm BR and 10dBm EDR-2/EDR-3.

Change config local name suffix


sdk_set_config_local_name_suffix API present in BT_SDK_DIR/bluetooth/export/common_appl/sdk_common.c is provided to change the config local name suffix. API Description is given below: void sdk_set_config_local_name_suffix()
void sdk_set_config_local_name_suffix ( UINT32 * name_length_ptr )

Description: Function to set the suffix of the config local name. In our application, last 2 bytes of BD addr is appended at the end of the local name. The function can be customized to change the suffix of the local name based on the requirement. It should be noted that the length of the local name after adding suffix should not exceed BT_LOCAL_NAME_SIZE. If the length exceeds BT_LOCAL_NAME_SIZE, sdk error handler with error code SDK_ERROR_IN_HCI_LOCAL_NAME_LEN is invoked. Parameters:
Name_length_ptr: Pointer to the local name

Returns:
void

MindTree Limited

7 April 2011

Page 67 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flight Mode for CC2560 Bluetooth controller


Flight modes will shutdown the CC2560. API's "sdk_enter_flight_mode" and "sdk_exit_flight_mode" are provided to enter and exit flight mode respectively.

MindTree Limited

7 April 2011

Page 68 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Power Saving Modes


eHCILL mode
eHCILL provides baseband controller and the Bluetooth host with a deterministic way to independently to in to respective standby modes. eHCILL mode is configured after Bluetooth is turned ON. During inactivity, controller sends deep sleep indication based on the configured inactivity timeout value and host acknowledges it by sending deep sleep acknowledgement. If host has any data to send and eHCILL state is sleep then it sends wake up indication to the controller and awaits wake up acknowledgment before sending actual data. On the other hand if controller has any data to send to host and eHCILL state is sleep then controller sends wake up indication to the host and awaits wake up acknowledgement before sending the actual data to the host. To know more refer to the TI document SWRA288 - eHCILL 4 Wire Power Managment Protocol.pdf. eHCILL is provided in source code format as part of the file BT_SDK_DIR\bluetooth\export\common_appl\appl_bt_rf.c. However, it is not recommended to change the eHCILL implementation or eHCILL configuration without extensive knowledge of the eHCILL protocol. The following table lists the eHCILL related APIs: Function name sdk_deep_sleep_config sdk_deep_sleep_enable sdk_deep_sleep_disable ehcill_rx_handler ehcill_tx_handler uart_enable_cts_interrupt uart_disable_cts_interrupt BT_CTS_PIN_VECTOR_ISR Description Configures deep sleep mode Enables deep sleep mode Disables deep sleep mode Handles ehcill related data reception Handles ehcill related data transmission Function used to set CTS pin of UART in interrupt mode Function used to set CTS pin as normal GPIO The ISR is used for the eHCILL wake up from CTS functionality. According to eHCILL implementation, before going to sleep CTS pin of the host is configured as interrupt pin. The controller issues a pulse on the CTS signal to wake up the host. In the current setup, CTS is connected to PORT 1 pin, the pulse is detected as PORT 1 interrupt. However CTS can be configured to PORT2. In this case, the mapping to PORT2 needs to be done as part of the configuration parameters.

MindTree Limited

7 April 2011

Page 69 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

LPS
All BT devices support inquiry and page scanning as required by the BT specification in order to be discovered by and connected to other BT devices. The specification requires default inquiry scans (if enabled) to be performed every 2.56s and page scans (if enabled) to be performed every 1.28s. Default scan window for both inquiry and page scans is 9 frames (= 11.25 mS). Low power scan (LPS) is a mechanism to reduce the current consumed by the page/inquiry scan sequences. It does so by measuring signal energy in the air in the BT band and in particular detecting the presence of ID packets in order to decide whether to initiate a standard page/inquiry scan. The LPS consumes less energy because it does this in less time than a regular scan and does not activate the whole RX path for the process. LPS is transparent to the host and does not require host intervention, other than initial activation.To know more refer to the TI document SWRA360 - Bluetooth Low-Power Scan.pdf. LPS is configured as part of Bluetooth initialization sequence.

MindTree Limited

7 April 2011

Page 70 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Sniff mode
Sequence chart for Sniff Mechanism

Local Device Application BT Stack Peer Device

BT_hci_sniff_mode(SNIFF_MAX_INTERVAL SNIFF_MIN_INTERVAL, SNIFF_ATTEMPT, SNIFF_TIMEOUT ) HCI_COMMAND_STATUS_EVENT


(HCI_SNIFF_MODE_OPCODE)

Connection Establishment

Enable Sniff

HCI_MODE_CHANGE_EVENT
(SNIFF_MODE , SNIFF_INTERVAL)

Sniff Mode

BT_hci_exit_sniff_mode ( ) HCI_COMMAND_STATUS_EVENT
(HCI_EXIT_SNIFF_MODE_OPCODE) Disable Sniff

HCI_MODE_CHANGE_EVENT
(ACTIVE_MODE ) Active Mode / Send Data

BT_hci_sniff_mode(SNIFF_MAX_INTERVAL
SNIFF_MIN_INTERVAL, SNIFF_ATTEMPT, SNIFF_TIMEOUT )

Optional

HCI_COMMAND_STATUS_EVENT
(HCI_SNIFF_MODE_OPCODE) Enable Sniff

HCI_MODE_CHANGE_EVENT
(SNIFF_MODE , SNIFF_INTERVAL)

Sniff Mode

BT_hci_exit_sniff_mode ( ) HCI_COMMAND_STATUS_EVENT
(HCI_EXIT_SNIFF_MODE_OPCODE) Disable Sniff

HCI_MODE_CHANGE_EVENT
(ACTIVE_MODE) Disconnection

APIs
1) To enter Sniff mode: BT_hci_sniff_mode();

Note: Sniff mode shall be enabled after SPP connection (local BT_spp_connect() or from peer). Example in the appl_spp.c file under the appl_spp_notify_cb() [this callback is registered in the BT_spp_init()] sniff mode is enabled under the events SPP_CONNECT_CNF or SPP_CONNECT_IND. Parameters for this API are configurable in sdk_bluetooth_config.h file.

MindTree Limited

7 April 2011

Page 71 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Events associated with sniff mode enable API: 1) HCI_COMMAND_STATUS_EVENT Important event parameters: Status - 0x00(Success) or 0x01-0xFF (Command Failed) Opcode - HCI_SNIFF_MODE_OPCODE Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function]. 2) HCI_MODE_CHANGE_EVENT Important event parameters: Status - 0x00(Success) or 0x01-0xFF (Command Failed) Current Mode - SNIFF_MODE (0x02) Interval - SNIFF_INTERVAL Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function].

2) To Exit Sniff mode: BT_hci_exit_sniff_mode();

Note: Sniff mode shall be disabled before disconnecting SPP connection (local BT_spp_disconnect()) Example in the appl_sdk.c file under the sdk_bluetooth_menu_handler(), in case OP_PEER_DISCONNECT sniff mode is disabled before initiating SPP Disconnection. Events associated with sniff mode enable API: 1) HCI_COMMAND_STATUS_EVENT Important event parameters: Status - 0x00(Success) or 0x01-0xFF (Command Failed) Opcode - HCI_EXIT_SNIFF_MODE_OPCODE Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function].

MindTree Limited

7 April 2011

Page 72 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

2) HCI_MODE_CHANGE_EVENT Important event parameters: Status - 0x00(Success) or 0x01-0xFF (Command Failed) Current Mode - ACTIVE_MODE (0x00) Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function].

APIs for controlling the SPP application


General Stack APIs
API Brief Description

BT_ethermind_init BT_bluetooth_on BT_bluetooth_off

This API initializes the EtherMind Bluetooth stack. This API Starts the Bluetooth functionality of the device. This API Stops the Bluetooth functionality of the device.

The detailed description of the General Stack APIs is given below.

EtherMind Stack Initialization


Name Synopsis Description BT_ethermind_init(): To initialize the EtherMind Bluetooth stack #include BT_common.h void BT_ethermind_init (void); This is the first routine that the applications/profiles should call to initialize the entire stack, including all its modules. During this initialization, various modules create and initialize their respective synchronization and conditional variables and allocate any static memory (if required). All modules perform platform level initialization during this process. The Bluetooth level initialization is not performed here. Internally, BT_ethermind_init() calls the initialization routine of each module, one after the other. It follows a bottom-up approach that is, the lower layers are initialized before the higher layers. The Debug, Timer Libraries, and Transport modules are initialized before others. The EtherMind tasks are created during this time and they are moved to a dormant state. Internal protocol modules provide an EtherMind INIT initialization handler, which is invoked from BT_ethermind_init(). The naming convention for this initialization handler is as follows (unless otherwise specified): void <module_name>_init ( void );

IN

None

MindTree Limited

7 April 2011

Page 73 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Parameters OUT Parameters Function Return Notes None None Application initialization routines will not be invoked by BT_ethermind_init() API. This API only performs initialization of EtherMind Stack modules.

Switching Bluetooth On
Name Synopsis BT_bluetooth_on(): Start the Bluetooth functionality of the device. #include BT common.h API_RESULT BT_bluetooth_on ( API_RESULT (* hci_event_ind_cb) (UCHAR, UCHAR *, UCHAR), API_RESULT (* bt_on_complete_cb) (void), CHAR * local_name ); This API brings the stack alive and performs the Bluetooth level initialization whereby each EtherMind Stack module is initialized for their internal data structures and variables. Once this initialization is complete (successfully), the Stack is ready for use for Bluetooth related functionalities. The EtherMind Read, Write and optional Timer tasks, which were created during BT_ethermind_init() API, are signaled to wake up from their dormant state to start servicing their respective queues. The BT_bluetooth_on() is particularly important for the HCI module. This is the time when the HCI-Transport interface (UART/USB/BCSP/SDIO etc) is opened and HCI sends a number of commands, one after the other, to the Host Controller (Baseband & LMP) hardware such as, HCI Reset, HCI Read BD_ADDR, HCI Read Buffer Size etc. which are fundamental for the operation of the stack. The HCI Reset Command, specifically, resets the Host Controller hardware to bring it up in initial/default state. All EtherMind Stack protocol modules provide a Bluetooth ON initialization handler, which is invoked from BT_bluetooth_on(). The naming convention for this initialization handler is as follows (unless otherwise specified): void <module_name>_bt_init (void); If this API returns with API_SUCCESS, it only means that Bluetooth-ON procedures are started, but not completed. Completion of the same will be indicated to the application by invoking the supplied bt_on_complete_cb function. IN Parameters hci_event_ind_cb Application registered HCI Event Indication Callback function. This callback function is optional, and application may choose to pass NULL, if HCI Event Indications are not required. Bt_on_complete_cb Application registered Callback function that is called on completion of the Bluetooth-ON procedures. This callback function is mandatory.

Description

MindTree Limited

7 April 2011

Page 74 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Local_name This parameter is a pointer to a CHAR array, containing the name to be set in the local Bluetooth device (Host Controller Hardware). The name string must be null terminated. OUT Parameters Function Return Notes None API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. Application and Profile Initialization functions will not be called from this API. The profiles should be initialized from the Application above only after the BT_bluetooth_on() API succeeds. The HCI Callback event indication callback function can be registered later also by calling an HCI API BT_hci_register_event_indication_callback(). Following HCI Commands are transmitted to Host Controller hardware, during the execution of this API: HCI Reset HCI Read BD_ADDR HCI Read Buffer Size HCI Write Page Timeout HCI Change/Write Local Name

Switching Bluetooth Off


Name Synopsis Description BT_bluetooth_off(): Stops the Bluetooth functionality on the device. #include BT_common.h API_RESULT BT_bluetooth_off ( void ); This routine shuts down the stack, and re-initializes data structures, states and variables of various stack modules. The EtherMind Read, Write and optional Timer tasks return to their dormant state. The HCI-Transport interface is closed, and it is not possible to communicate to the Bluetooth device (Host Controller hardware). For all practical purpose, on return of this API, the EtherMind stack returns to pre Bluetooth-ON state. After this call has succeeded, another Bluetooth-ON can be performed, using the BT_bluetooth_on() API, to revive the stack (and its modules). Internal protocol modules provide a Bluetooth OFF shutdown handler, which is invoked from BT_bluetooth_off(). The naming convention for this shutdown handler is as follows (unless otherwise specified): void <module_name>_bt_shutdown (void); IN Parameters OUT Parameters None None

MindTree Limited

7 April 2011

Page 75 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Function Return Notes

API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. Application, as well as all currently active EtherMind Profiles, should be shut down prior to calling BT_Bluetooth_off() API. Failure to do so may result in unspecified behavior by the stack modules.

SPP APIs
The Serial Port Profile (SPP) APIs are listed in the table below.
API Brief Description

BT_spp_init

This API registers application callback function with the Serial Port profile and initializes Serial Port Profile on the device. This API starts the profile by preparing the SPP device to accept connections from peer device This API establishes the profile level connection between Dev A and Dev B. This API disconnects the existing profile level connection between Dev A and Dev B. This API allows user to send data to the peer SPP device. This API switches OFF the SPP service on the local device.

BT_spp_start

BT_spp_connect BT_spp_disconnect

BT_spp_send BT_spp_stop

The detailed description of the SPP APIs is given below.

BT_spp_init ()
#include BT_spp_api.h
API_RESULT BT_spp_init ( IN SPP_APPL_EVENT_NOTIFY_CB notify_cb )

This API registers the application callback function with the SPP and initializes the Serial Port Profile. Parameters:
notify_cb: Application callback function pointer.

Returns:
API_RESULT: API_SUCCESS: Indicates Serial Port profile initialized successfully SPP_ERR_NULL_PARAMETER: Indicates application is trying to register NULL as callback. SPP_ERR_MUTEX_INIT_FAILED: Indicates initialization failed due to failure to initialize mutex.

Note:
No event is indicated through the application callback on completion of this procedure.
7 April 2011 Page 76 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

This API should be called only once after device Power ON. This is the first API to be called for SPP module. The callback function is used by SPP to report asynchronous events and to confirm completion of API requests from application. Refer Application Callback for details on callback function.

Events:
None

BT_spp_start ()
#include BT_spp_api.h
API_RESULT BT_spp_start ( IN UCHAR server_channel )

This API starts the SPP instance. , SPP implementation starts listening on the RFCOMM Channel specified. It enables the application to use the service of the Serial Port profile. Parameters:
server_channel: The RFCOMM server channel in which the SPP device will be listening for peer initiated connection.

Returns:
API_RESULT: Result of the API. API_SUCCESS: Indicates SPP started successfully SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong HS State. SPP_ERR_NO_FREE_ENTITY: Cannot Start. Free entity not available to allow incoming connections.

Note:
No event is indicated through the application callback on completion of this procedure. Application should activate service discovery database of SPP before calling this API. Application should get the server channel to listen for connection from service discovery database.

Events:
None

BT_spp_connect ()
#include BT_spp_api.h
API_RESULT BT_spp_connect ( IN UCHAR* bd_addr, IN UCHAR server_channel )

This API establishes service level connection between SPP Dev A and SPP Dev B Parameters:
bd_addr : Bluetooth Device address of the remote SPP Device with which connection needs to be established. server_channel : The server channel in which connection has to be initiated.

Returns:
API_RESULT: Result of the API.
MindTree Limited 7 April 2011 Page 77 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

API_SUCCESS: Indicates connection procedure initiated successfully SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong SPP State. SPP_ERR_MAX_CONNECT_LIMIT_REACHED: SPP already connected to maximum number of peers. Cannot initiate the SPP connection.

Note:
Result of the connection setup procedure completion will be indicated through application callback. The server channel to initiate connection has to be got by the doing service discovery of the remote SPP Device.

Events:
SPP_CONNECT_CNF event is indicated in the callback.

BT_spp_disconnect ()
#include BT_spp_api.h
API_RESULT BT_spp_disconnect ( IN SPP_HANDLE handle )

This API disconnects existing service level connection with the peer SPP device. Parameters:
handle : Handle identifies a SPP connection.

Returns:
API_RESULT: Result of the API. API_SUCCESS: Indicates disconnection procedure initiated successfully SPP_ERR_INVALID_HANDLE: Invalid handle. SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong HS State.

Note:
Result of the disconnection procedure completion will be indicated through application callback

Events:
SPP_DISCONNECT_CNF event is indicated in the callback. Note: This function is called as part of appl_spp_disconnect()

BT_spp_send()
#include BT_spp_api.h
API_RESULT BT_spp_send ( IN SPP_HANDLE spp_handle, IN UCHAR *data, IN UINT16 data_len )

This API sends the data to remote SPP device. Parameters:


spp_handle: Handle associates a SPP connection to a remote SPP device. data: Data to be sent to peer over SPP channel. Data_len: Length of data to be sent to peer over SPP channel.

Returns:

MindTree Limited

7 April 2011

Page 78 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

API_RESULT: Result of the API. API_SUCCESS: Indicates successful operation. SPP_ERR_INVALID_HANDLE: Invalid handle SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong SPP State.

Note:
None

Events:
SPP_SEND_CNF event is indicated in the callback

BT_spp_stop()
#include BT_spp_api.h
API_RESULT BT_spp_stop(void)

This API stops the SPP service function on the local device. Existing active SPP connection if any will be released. Parameters:
None

Returns:
API_RESULT: Result of the API. API_SUCCESS: Indicates SPP switched off SPP_ERR_STOP_PENDING: In the process of releasing active connections, wait until event is indicated in the callback.

Note:
No event is indicated through application callback for this procedure when there is no active SPP connection i.e. API returns API_SUCCESS immediately when there is no active SPP connection. SPP_ERR_STOP_PENDING is returned when SPP device has some active SPP connection that need to be released. Application should wait until SPP_STOP_CNF is indicated in the callback. Application is responsible for de-activating the service discovery database for SPP device.

Events:
SPP_STOP_CNF is indicated in callback after releasing the active SPP connection.

Changing Bluetooth HCI UART baud rate of SDK


The CC2560 ignores the host flow control indication (MSP430_RTS) when processing HCI_VS_Update_UART_HCI_Baudrate command. This results in the HCI UART getting out-of-sync when changing the baud rate . The workaround is to block sending command complete event by CC2560 when processing HCI_VS_Update_UART_HCI_Baudrate command. The events are disabled by routing CC2560_UART_TX to a different pin. Update_UART_HCI_Baudrate command is then sent to the CC2560 controller. CC2560 deasserts MSP430_CTS pin to High state, indicating processing of the command. After successful baud rate change, the MSP430_CTS is asserted to Low state. The command complete events are re-enabled by routing CC2560_UART_TX back to HCI_TX. The sequence of commands sent as part of Update_UART_HCI_Baudrate processing is as shown below:

MindTree Limited

7 April 2011

Page 79 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Command HCI_VS_Configure_ARMIO HCI_VS_Write_ARMIO_Port HCI_VS_Read_Modify_Write_Hardware_Register

Parameters Port number : 12 Port direction :0x0 Port number :12 Value :1 Register address :0x001AF612 Register value :0x0010 Register mask :0x00F0

Description Configure ARMIO 12 as output Set ARMIO 12 to High Mux TX HCI on ARMIO 12

HCI_VS_Update_UART_HCI_Baudrate HCI_VS_Read_Modify_Write_Hardware_Register

UART HCI baud rate value Register address :0x001AF612 Register value :0x0000 Register mask :0x00F0

Set the UART HCI baud rate Routing BL6450_UART_TX back to HCI_TX

The above sequence of commands are implemented using the API function sdk_set_controller_uart_baudrate().

sdk_set_controller_uart_baudrate()
#include hci_uart.h void sdk_set_controller_uart_baudrate(UINT32 baudrate)
void sdk_set_controller_uart_baudrate ( IN UINT32 baudrate )

This API sets the controllers baudrate to the specified value Parameters:
baudrate: The value of the new baudrate that the controller has to use

Returns:
none Once this is executed, the event handler sdk_update_baudrate_handler() is called. This may be customized as required by the user.

Application Callback
Application should register a callback through the API BT_spp_init. SPP will call the registered application callback after Processing the APIs called by application. Receiving data from the remote SPP device.
7 April 2011 Page 80 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

Receiving connect and disconnect events initiated from the remote device. Stopping profile if it was connected when the stop API call was made.

In the callback, events of type SPP_EVENTS will be indicated along with the parameters.

Callback Prototype
typedef API_RESULT (*SPP_APPL_EVENT_NOTIFY_CB) ( IN SPP_HANDLE spp_handle, OUT SPP_EVENTS spp_event, OUT API_RESULT status, OUT void* data, OUT UINT16 data_length )

Parameters:
spp_handle : spp_event : status : data: data_length: Handle associates a SPP connection to a remote SPP device Event indicated to application by Serial Port profile The status of the event. Pointer to the array containing the parameters associated with the event Length of the parameters associated with the event

Possible Events Received (Possible Values for parameter SPP_EVENTS)


SPP_EVENTS SPP_CONNECT_CNF SPP_CONNECT_IND SPP_DISCONNECT_CNF SPP_DISCONNECT_IND SPP_SEND_CNF SPP_RECVD_DATA_IND SPP_STOP_CNF Description Application initiated connection to remote side has completed. SPP connection setup by remote side. SPP connection released upon application request. SPP connection released by remote side. Data is sent to the remote side upon application request. Data received from remote side SPP service stopped on local device and active SPP connections are released.

Interpretation of parameters of application callback


Value of SPP_EVENTS Value of status Interpretation *)data (UCHAR*)data Array of type "unsigned char" containing the MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide of (void Value of data_length (UINT16)

SPP_CONNECT_CNF

API_SUCCESS or RFCOMM Error code

Length of BD_ADDR - 6

MindTree Limited

7 April 2011

Page 81 of 224

values for BD_ADDR of the peer SPP device. Contains integer. SPP_CONNECT_IND Not Applicable the value as

(UCHAR*)data data - Array of type "unsigned char" containing the values for BD_ADDR of the peer SPP device. Contains integer. the value as

Length of BD_ADDR - 6

SPP_SEND_CNF

API_SUCCESS RFCOMM Error code: Data sending failed with the relevant RFCOMM error code.

(UCHAR*)data data Pointer to the data buffer given as parameter to the API call BT_spp_send_data(). (UCHAR*)data data Pointer to the buffer containing the data received.

Number written.

of

bytes

SPP_RECVD_DATA_IND

Not Applicable

Number received.

of

bytes

SPP_DISCONNECT_CNF

API_SUCCESS

(UCHAR*)data data - Array of type "unsigned char" containing the BD_ADDR of the SPP device.

Length of BD_ADDR - 6

Contains the value as integer.


SPP_DISCONNECT_IND Not Applicable (UCHAR*)data data - Array of type "unsigned char" containing the BD_ADDR of the SPP device.

Length of BD_ADDR ( 6)

Contains the value as integer.


SPP_STOP_CNF API_SUCCESS NULL 0

MindTree Limited

7 April 2011

Page 82 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

HCI Event Indication Callback


This callback mechanism is provided to notify the Application of incoming HCI Event packets, as they are received from the local Bluetooth device, or, the Host Controller hardware. This HCI Callback must be registered by the Application, using BT_bluetooth_on() API. Code snippet for registering sdk_hci_event_indication_callback as HCI Event indication callback retval = BT_bluetooth_on(sdk_hci_event_indication_callback, sdk_bluetooth_on_complete, (CHAR *) SDK_CONFIG_DEVICE_NAME);

Name Synopsis

HCI Event Indication Callback API_RESULT (* hci_event_indication_cb) ( UCHAR event_type, UCHAR * event_data, UCHAR event_datalen ); event_type The HCI Event Code, as received from the local Bluetooth device.

IN Parameters

Event_data The pointer to an UCHAR buffer containing the parameters of the HCI Event being delivered to the application using this callback function. For description of the parameters of the above-mentioned HCI Events, refer to the Specification of the Bluetooth System, v1.2, Vol. 2, Part E Host Controller Interface Functional Specification, Section 7.7. event_datalen OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. In the callback, each event is handled independently depending on the event_type. The code snippet is as follows: The length of the buffer containing the event_data.

API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data,


MindTree Limited 7 April 2011 Page 83 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_CONNECTION_COMPLETE_EVENT: hci_connection_complete_event_handler(event_data); break; The events handled in default application are:
HCI_EVENTS HCI_CONNECTION_COMPLETE_EVENT Description

New connection has been established. A connection is terminated. Used by the Controller for most commands to transmit return status of a command and the other event parameters that are specified for the issued HCI command

HCI_DISCONNECTION_COMPLETE_EVENT HCI_COMMAND_COMPLETE_EVENT

HCI_COMMAND_STATUS_EVENT

Command described by the Command Opcode parameter has been received, and that the Controller is currently performing the task for this command

HCI_ROLE_CHANGE_EVENT

Current Bluetooth role related to the particular connection has changed

HCI_MODE_CHANGE_EVENT

The device associated with the Connection Handle changes between Active mode, Hold mode, and Sniff mode, and Park state

HCI_LINK_KEY_NOTIFICATION_EVENT

New Link Key has been created for the connection with the device specified in BD_ADDR

HCI_INQUIRY_COMPLETE_EVENT HCI_INQUIRY_RESULT_EVENT

Inquiry is finished. Bluetooth device or multiple Bluetooth devices have responded so far during the current Inquiry process Remote name request has been completed.

HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT

HCI_VENDOR_SPECIFIC_DEBUG_EVENT

The event code 0xFF is reserved for the event code used for vendor-specific debug events

MindTree Limited

7 April 2011

Page 84 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Additional events can be handled by adding appropriate case statements to the switch(event_type) in sdk_hci_event_indication_callback()

MindTree Limited

7 April 2011

Page 85 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Bluetooth Connection Establishment & Management

MindTree Limited

7 April 2011

Page 86 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MSP430+BT
Application BT Stack

Remote BT Device

SDP Service Search

BT_sdp_open BT_sdp_servicesearchattributerequest BT_sdp_get_channel_number BT_sdp_close


Establish SPP Connection

BT_spp_init BT_spp_start BT_spp_connect


SPP_CONNECT_CNF

Exchange Data over SPP Link

BT_spp_send

SPP_SEND_CNF

SPP_RECVD_DATA_IND

MindTree Limited

7 April 2011

Page 87 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MSP430+BT
Application BT Stack

Remote BT Device

Close SPP Connection

BT_spp_disconnect
SPP_DISCONNECT_CNF

BT_spp_stop
SPP_STOP_CNF

Close BT Connection

BT_hci_disconnect
HCI_DISCONNECTION_ COMPLETE_EVENT

Shut Down CC2560

sdk_bluetooth_off

BT_RF_NSHUTDOWN_PIN_LOW
BT Stack and CC2560 Initialization

BT_RF_NSHUTDOWN_PIN_HIGH sdk_bluetooth_on BT_bluetooth_on

MindTree Limited

7 April 2011

Page 88 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SPP Scenarios Message Sequence Chart (MSC)


Below is the message sequence chart for some sample SPP scenarios. The MSCs describe the SPP APIs involved and corresponding events indicated in the application callback. This section does not cover all the usage scenarios. Applications can use the enclosed MSCs as a sample to model other usage scenarios with the SPP and EtherMind HCI and SDP APIs. Note: SPP_appl_callback(<spp_handle>, SPP_SEND_CNF,API_SUCCESS,data,data_len) abbreviated to SPP_SEND_CNF event in the MSCs. has been

LEGEND The arrow conventions followed are shown below.


EtherMind Bluetooth Stack API Call / Events EtherMind Bluetooth Profile API Call / Events Messages / Data sent to Peer Device Events indicated by EtherMind Stack to Profiles

MindTree Limited

7 April 2011

Page 89 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Initialization
APP
BT_ethermind_init() BT_Bluetooth_on(appl_bluetooth_on_callback, appl_hci_callback,device_name_string) appl_bluetooth_on_callback()

Local SPP

Bluetooth Stack

Remote SPP

Stack Ready
BT_spp_init(spp_appl_callback) 1. Get RFCOMM server channel from SDDB for SPP Device to listen for SPP connection. 2. Activate SPP service discovery database. BT_spp_start(server_channel) Indicate ready to accept connections from RFCOMM incoming

SPP Device Ready

MindTree Limited

7 April 2011

Page 90 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SPP Connection Establishment


Local SPP Remote SPP

APP

Bluetooth Stack

BT_hci_create_connection(REMOTE _BD_ADDR,packet_type, page_scan_repetition_mode, page_scan_mode, allow_role_switch,clock_offset, connection_handle)

appl_hci_callback(HCI_CONNECTION_COMPLETE_EVENT for ACL)

SDP Connection and Service discovery

BT_spp_connect(REMOTE_BD_ ADDR, server_channel)

Create Profile Connection

spp_appl_callback(handle, SPP_CONNECT_CNF, API_SUCCESS, REMOTE_BD_ADDR, 6)

RFCOMM Connection

MindTree Limited

7 April 2011

Page 91 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SPP Data Transfer

APP

Local SPP

Bluetooth Stack

Remote SPP

Profile Level Connection Established

BT_spp_send_data(handle,*data, datalength)

Send Data

spp_appl_callback(handle, SPP_SEND_CNF,API_SUCCESS, *data, datalen)

spp_appl_callback(handle, SPP_RECVD_DATA_IND,API_SUCCESS , *data, datalen)

MindTree Limited

7 April 2011

Page 92 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SPP Connection Release


Local SPP
Bluetooth Stack

APP

Remote SPP

Profile Level Connection Established

BT_spp_disconnect (handle) Close RFCOMM Connection spp_appl_callback(handle, SPP_DISCONNECT_CNF, API_SUCCESS,REMOTE_BD_ADDR,6)

Release Connection

Profile

MindTree Limited

7 April 2011

Page 93 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SPP Shutdown with active connection


APP Local SPP
Bluetooth Stack

Remote SPP

Profile Level Connection Established

BT_spp_stop() SPP_ERR_STOP_PENDING Close RFCOMM Connection spp_appl_callback( handle = invalid, SPP_STOP_CNF, API_SUCCESS,NULL,0)

Release Connection

Profile

NOTE Application can do a STOP through BT_spp_stop() if the application wants to stop using SPP Service. Any time after STOP, to use SPP service, application should first call BT_spp_start() before making any connection to remote device.

SDP APIs
These APIs form the basic APIs that are required to make the necessary SDP requests to discover the services provided by other Bluetooth devices in the vicinity.
API Brief Description

BT_sdp_open

This API establishes the SDP connection with a remote Bluetooth device. This API closes the SDP connection with a remote Bluetooth device This API is used to determine if a remote Bluetooth Device provides chosen services, and, if so, the characteristics of the services.

BT_sdp_close

BT_sdp_servicesearchattributerequest

The detailed description of the SPP APIs is given below.

MindTree Limited

7 April 2011

Page 94 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_sdp_open
Name Synopsis BT_sdp_open(): Establishes a SDP connection with a Bluetooth device. #include BT sdp api.h API_RESULT BT_sdp_open ( SDP_HANDLE ); Description

* handle

This API establishes the SDP connection with a remote Bluetooth device, identified by its Bluetooth Device Address (BD_ADDR) as specified in the supplied SDP Handle. The L2CAP channel configuration is done automatically, once the connection is established. The application is expected to establish the ACL connection with the remote Bluetooth device prior to calling this API. handle None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. The Application can use SDP_SET_HANDLE() to populate the SDP Handle prior to calling this API. The SDP Response Callback is called on connection establishment or error with type set to SDP_Open. The SDP Handle for the SDP connection.

IN Parameters OUT Parameters Function Return Notes

BT_sdp_close
Name Synopsis BT_sdp_close(): To close the SDP connection with a Bluetooth device. #include BT sdp api.h API_RESULT BT_sdp_close ( SDP_HANDLE ); Description IN Parameters OUT Parameters Function Return

* handle

This API closes the SDP connection with a remote Bluetooth device, as identified by the supplied SDP Handle. handle None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. The SDP Handle for the SDP connection.

MindTree Limited

7 April 2011

Page 95 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Notes

The SDP Response Callback is called on connection establishment or error with type set to SDP_Close.

BT_sdp_servicesearchattributerequest
Name BT_sdp_servicesearchattributerequest(): To perform a SDP Service Search Attribute Request to find the services available and the characteristics of the available service. #include BT sdp api.h API_RESULT BT_sdp_servicesearchattributerequest ( SDP_HANDLE * handle, S_UUID * uuids, UINT16 num_uuids, UINT16 * attribute_ids, UINT16 num_attribute_ids, UINT32 * attribute_id_range, UINT16 num_attribute_id_range, UCHAR * attribute_data, UINT16 * len_attribute_data ); Description This API is used to determine if a remote Bluetooth Device provides chosen services, and, if so, the characteristics of the services, as identified by the Attribute IDs specified. This API returns the Service Attributes and the size of the same. The format and content of the Service Attributes is service dependent, and typically specified in the associated Bluetooth Profile specification. The SDP Utility APIs can be used to extract the relevant service parameter values from the Service Attribute. IN Parameters handle The SDP Handle for the SDP connection.

Synopsis

uuids The set of UUIDs to be used to limit the search for services offered by the remote Bluetooth device. This parameter must be an array of S_UUID variable, of size num_uuids, containing the UUIDs. num_uuids Number of UUIDs present in the uuids parameter.

attribute_ids The set of Attribute IDs to be used to limit the query for Service Attributes for a service (as identified by Service Record Handle) offered by the remote Bluetooth device. This parameter must be an array of UINT16 variable, of size num_attribute_ids, containing the Attribute IDs. num_attribute_ids parameter. Number of Attribute IDs present in the attribute_ids

attribute_id_range The set of Attribute ID Ranges to be used to limit the query for Service Attributes for a service (as identified by Service Record Handle) offered by the remote Bluetooth device. This parameter must be an array of UINT32 variable, of size num_attribute_id_range, containing the Attribute ID Ranges. num_attribute_id_range Number of Attribute ID Ranges present in the attribute_id_range parameter.

MindTree Limited

7 April 2011

Page 96 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

len_attribute_data This parameter specifies the maximum number of octets containing the service attribute data that the remote Bluetooth device is required to return when sending its response for the Service Attribute Request. attribute_data Buffer, of size len_attribute_data, allocated by the application to store the attribute data received in the response for the Service Attribute Request. OUT Parameters Function Return Notes See Notes. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. Overlapping the values of attribute_ids with attribute_id_range disables that corresponding attribute_ids. Attribute Ranges are used to extract one or more attribute values which are in sequence. For example, the attribute_id_range value of 0x0000FFFF, which means Attribute IDs from 0x0000 to 0xFFFF) extracts all available Attribute values. The buffer for Attribute values, for the Attribute IDs and Ranges as specified by the application, must be allocated and passed as attribute_data parameter. The allocated buffer must be resident, and the application must not free the buffer before SDP Response Callback is called indicating completion of the Service Attribute Request. The SDP Response Callback uses the same buffer as response parameter to indicate the received record handles. It is recommended to use this API instead of using the APIs for the Service Search Request and the Service Attribute Request, if the number of records for a requested service is expected to be few, so as to reduce the number of SDP transactions and thereby reducing Bluetooth bandwidth usage and time taken to perform the search.

SDP Structures/Data Types


SDP Handle
Data type definition #include BT_sdp_api.h typedef struct { UCHAR bd_addr[6]; UCHAR id; SDP_CB fn_ptr; } SDP_HANDLE; Parameter Description bd_addr The Bluetooth Device Address for the remote SDP connection Entity.

id Connection Identifier for the SDP connection. This is assigned by SDP, and should not be modified by applications.

MindTree Limited

7 April 2011

Page 97 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

fn_ptr

The SDP Response Callback function pointer, to be specified by the application.

SDP Callback
SDP calls a callback function to inform the application of the response of certain action or SDP requests. The application must register the callback along with the SDP Handle before calling any SDP Request API. The SDP exports the SDP_SET_HANDLE() macro to initialize a SDP Handle with the Callback function information. There are two prototypes of SDP Callback and both are described in the section below.

SDP Response Callback


Name Synopsis SDP_CB: SDP Response callback #include BT sdp api.h API_RESULT (* SDP_CB) ( UCHAR UCHAR UINT16 UINT16 ); DESCRIPTION IN Parameters

type, * response, length, status

This callback is called by RFCOMM to report various events that occur for a Server Channel, which must be reported to the higher layer profile or applications. type This indicates the type of response. Response type are defined as one of the following: SDP_Open SDP_Close SDP_ServiceSearchResponse SDP_ServiceAttributeResponse SDP_ServiceSearchAttributeResponse SDP_ErrorResponse

response This parameter represents the SDP response byte stream received from the remote Bluetooth device in response to the request API called earlier by the application. This parameter is set to NULL, if the type is SDP_Open , SDP_Close and SDP_ErrorResponse. For the SDP_ServiceSearchResponse, this parameter is set to a buffer containing the record_handles, which was previously provided as a parameter in the BT_sdp_servicesearchrequest() API.

MindTree Limited

7 April 2011

Page 98 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse, this parameter is set to a buffer containing the attribute_data, which was previously provided as a parameter in the BT_sdp_serviceattributerequest() and BT_sdpserviceserachattributerequest() respectively. length This parameter represents the size of SDP response byte stream. For the SDP_ServiceSearchResponse, this value indicates the number of handles in the response. For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse, this value indicates the number of attribute bytes in the response. status This parameter indicates the result of the transaction. This value is API_SUCCESS or an error code indicating the reason for failure. OUT Parameters Function Return Notes None API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. The Application must allocate memory for the response byte stream (SDP_Open and SDP_Close does not require any memory) and pass the same to the corresponding request API (rec_handles parameter for BT_sdp_servicesearchrequest() and attribute_data parameter for the other attribute request APIs). The application should not free this memory before completion of the transaction.

If the compilation flag SDP_HAVE_HANDLE_WITH_CB is enabled following SDP Callback prototype will be defined. In situation where the SDP application needs to perform several simultaneous SDP queries, this SDP Callback Prototype should be used. It returns one additional parameter SDP_HANDLE to uniquely identify the corresponding SDP request.

SDP Utility APIs


API Brief Description

BT_sdp_get_channel_number

This API can be used to extract the RFCOMM Server Channel attribute value from the attribute data (Protocol Descriptor List This macro can be used to populate the required elements of a SDP Handle, such as, the Bluetooth Device Address

SDP_SET_HANDLE

MindTree Limited

7 April 2011

Page 99 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_sdp_get_channel_number
Synopsis #include BT sdp spi.h API_RESULT BT_sdp_get_channel_number ( UCHAR * attribute_data, UCHAR * channel_number ); Description This API can be used to extract the RFCOMM Server Channel attribute value from the attribute data (Protocol Descriptor List) returned by the SDP Service Attribute Request and/or SDP Service Search Attribute Request APIs. attribute_data Application allocated UCHAR buffer containing the Service Attribute data, as received as a result of the SDP Service Attribute Request and/or SDP Service Search Attribute Request APIs. channel_number Pointer to a caller allocated UCHAR variable, which will contain the RFCOMM Server Channel attribute value on return. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. None.

IN Parameters OUT Parameters Function Return Notes

SDP_SET_HANDLE
Name Synopsis SDP_SET_HANDLE(): To populate the SDP Handle. #include BT sdp api.h #define SDP_SET_HANDLE(sdp_handle, bd_addr, callback) Description IN Parameters This macro can be used to populate the required elements of a SDP Handle, such as, the Bluetooth Device Address and the SDP Response Callback. sdp_handle bd_addr The SDP Handle that needs to be populated.

The remote Bluetooth Device Address this SDP Handle corresponds to.

callback The SDP Response Callback which will be called to notify completion of an SDP Request. The application must provide this callback. OUT Parameters Function Return Notes None None. None.

MindTree Limited

7 April 2011

Page 100 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

GAP APIs
The Generic Access Profile APIs are: 1) Device Setup APIs
API Brief Description

BT_hci_reset

This API resets the local Bluetooth device.

2) Controller Information APIs


API Brief Description

BT_hci_read_local_version_information

This API reads the Version information of the local Bluetooth device. This API retrieves the Bluetooth Device Address (BD_ADDR) of the local Bluetooth device, as stored in the HCI module.

BT_hci_get_local_bd_addr

3) Controller Configuration APIs


API Brief Description

BT_hci_change_local_name BT_hci_write_class_of_device

This API configures the name of the local Bluetooth device. This API writes the Class of Device configuration parameter to the local Bluetooth device. This API reads the currently configured values for the Inquiry Access Code LAP(s). This API writes the current values for the Inquiry Access Code LAP(s), to be used by the local Bluetooth device. This API writes the value of Scan Enable configuration parameter in the local Bluetooth device.

BT_hci_read_current_iac_lap

BT_hci_write_current_iac_lap

BT_hci_write_scan_enable

4) Device Discovery APIs


API Brief Description

BT_hci_inquiry

This API initiates/performs the Bluetooth Device Inquiry/Discovery for the specified Inquiry Length and Number

MindTree Limited

7 April 2011

Page 101 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

of Responses, and with the specified LAP (Lower Address Part). BT_hci_inquiry_cancel This API cancels an ongoing Bluetooth Device Inquiry/Discovery procedure. This API writes the current value for Inquiry Scan Type configuration parameter to be stored in the local Bluetooth device.

BT_hci_write_inquiry_scan_type

5) Connection Setup APIs


API Brief Description

BT_hci_create_connection

This API is used to create an ACL connection to the specified remote Bluetooth device. This API initiates disconnection of an existing ACL with a remote Bluetooth device. This API writes the value of the Page Timeout configuration parameter to the local Bluetooth device. This API writes the current value for Page Scan Type configuration parameter to be stored in the local Bluetooth device.

BT_hci_disconnect

BT_hci_write_page_timeout

BT_hci_write_page_scan_type

6) Connection State APIs


API Brief Description

BT_hci_write_link_policy_settings

This API writes the Link Policy Setting configuration parameter to the local Bluetooth device. This API can be used to place an ACL connection between the local and remote Bluetooth device into Sniff mode This API can be used to end the Sniff mode for an ACL Connection, which is currently in the Sniff mode. This API writes the parameters for the sniff subrating for the ACL link as specified by the connection handle.

BT_hci_sniff_mode

BT_hci_exit_sniff_mode

BT_hci_sniff_subrating

7) LINK INFORMATION APIs


API Brief Description

MindTree Limited

7 April 2011

Page 102 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_hci_read_transmit_power_level

This API reads the value for Transmit Power Level for the specified Connection Handle. This API reads the value for the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range. This API writes the value of the Link Supervision Timeout configuration parameter in the local Bluetooth device.

BT_hci_read_rssi

BT_hci_write_link_supervision_timeout

8) REMOTE INFORMATION APIs


API Brief Description

BT_hci_remote_name_request

This API is used to get the Name of a remote Bluetooth device, as identified by the supplied Bluetooth Device Address.

9) Testing and Vendor Specific APIs


API Brief Description

BT_hci_enable_device_under_test_mode

This API enables the local Bluetooth device to enter Device Under Test (DUT) mode via the LMP test Commands. This API can be used to send vendor specific HCI commands to the local Bluetooth device.

BT_hci_vendor_specific_command

10) AUTHENTICATION AND ENCRYPTION APIs


BT_sm_connection_request_reply This API enables applications to accept/reject an incoming link-level connection from a Untrusted remote Bluetooth device. This API enables applications to furnish Bluetooth PIN for authentication procedure on outgoing link-level connection to a device. This API enables application to retrieve Link Key for a remote Bluetooth device, which is be used by the Security Manager for authentication procedure during link-level or service-level connection to the specified remote device. This API enables applications to furnish the Link Key for authentication procedure on the link-level connection to a device. This API enables applications to accept/reject User Confirmation request, during link authentication using Secure
Page 103 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_sm_pin_code_request_reply

BT_sm_get_device_link_key

BT_sm_link_key_request_reply

BT_sm_user_conf_request_reply

MindTree Limited

7 April 2011

Simple Pairing procedure (Numeric Comparison association model).

The detailed description of the GAP APIs is given below.

1) Device Setup APIs BT_hci_reset


Name Synopsis BT_hci_reset(): To reset the local Bluetooth device. #include BT hci api.h API_RESULT BT_hci_reset ( void ); Description IN Parameters OUT Parameters Function Return Notes This API resets the local Bluetooth device. None. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. If the Application decides to reset the local Bluetooth device, the EtherMind stack should be re-initialized. Re-initialization of the EtherMind Stack can be performed by switching it off first using BT_Bluetooth_off() API, and then by switching on using BT_bluetooth_on().

2) Controller Information APIs BT_hci_read_local_version_information


Name Synopsis BT_hci_read_local_version_information(): To read Version information of the local Bluetooth device #include BT hci api.h API_RESULT BT_hci_read_local_version_information ( void ); Description This API reads the Version information of the local Bluetooth device. The version information consists of two parameters: the version and revision parameters.

MindTree Limited

7 April 2011

Page 104 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The HCI Version parameter defines the major hardware version of the Bluetooth hardware. The version parameter only changes when new versions of the Bluetooth hardware are produced for new Bluetooth SIG specifications. The version parameter is controlled by the Bluetooth SIG. The HCI Revision parameter should be controlled by the manufacturer and should be changed as needed. The Manufacturer Name parameter indicates the manufacturer of the local Bluetooth module as specified by the Bluetooth SIG. The subversion parameter should be controlled by the manufacturer and should be changed as needed. The subversion parameter defines the various revisions that each version of the Bluetooth hardware will go through as design processes change and errors are fixed. This allows the software to determine what Bluetooth hardware is being used, and to work around various bugs in the hardware if necessary. IN Parameters OUT Parameters Function Return Notes None. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None

BT_hci_get_local_bd_addr
Name Synopsis BT_hci_get_local_bd_addr(): To retrieve the BD_ADDR of the local Bluetooth device, as stored in the HCI module. #include BT hci api.h API_RESULT BT_hci_get_local_bd_addr ( UCHAR * bd_addr ); Description This API retrieves the Bluetooth Device Address (BD_ADDR) of the local Bluetooth device, as stored in the HCI module. HCI obtains and stores this BD_ADDR using the BT_hci_read_bd_addr() API from the Bluetooth hardware during its Bluetooth-ON initialization. The difference between this API and the BT_hci_read_bd_addr() is that an Command Complete Event is not generated for this API. This API reads the BD_ADDR from the HCI module itself, whereas the BT_hci_read_bd_addr() reads the BD_ADDR from the Bluetooth hardware. IN Parameters OUT Parameters None. bd_addr Caller allocated UCHAR array of 6-octets which will be used to copy the BD_ADDR from the HCI module.

MindTree Limited

7 April 2011

Page 105 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Function Return Notes

API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

3) Controller Configuration APIs BT_hci_change_local_name


Name Synopsis BT_hci_change_local_name(): To set the local name of the device. #include BT hci api.h API_RESULT BT_hci_change_local_name ( UCHAR * name, UINT16 name_length ); Description IN Parameters This API configures the name of the local Bluetooth device. name Caller allocated CHAR array of size 248 bytes, which will be used to copy the name of the remote Bluetooth device. Name_length bytes. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. On embedded version of the EtherMind stack, the size of the name is limited to 12 due to memory constraints. Length of the Name to be set. This must be less than or equal to 248

BT_hci_write_class_of_device
Name Synopsis BT_hci_write_class_of_device(): To set the Class of Device in the local Bluetooth device #include BT hci api.h API_RESULT BT_hci_write_class_of_device ( UINT32 class_of_device ); Description This API writes the Class of Device configuration parameter to the local Bluetooth device. The Class of Device is used to indicate the capabilities of the local Bluetooth device to the other remote Bluetooth devices when at the time of their inquiry processes. IN class_of_device
7 April 2011

Value of the Class of Device for the local device. Though


Page 106 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

Parameters

represented in 4-byte UINT32 type, Class of Device is a 3 Byte value. Population of Class of Device should be according to Bluetooth Assigned Numbers document http://www.bluetooth.org/assigned-numbers/. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

OUT Parameters Function Return Notes

BT_hci_read_current_iac_lap
Name Synopsis BT_hci_read_current_iac_lap(): To read the current Inquiry Access Code LAP(s) stored in the local Bluetooth device #include BT hci api.h API_RESULT BT_hci_read_current_iac_lap ( void ); Description This API reads the currently configured values for the Inquiry Access Code LAP(s) the local Bluetooth device can simultaneous listen for during an Inquiry Scan performed by other Bluetooth devices. All Bluetooth devices should support at least one IAC, the General Inquiry Access Code (GIAC- 0x9E8B33). IN Parameters OUT Parameters Function Return Notes None. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None

BT_hci_write_current_iac_lap
Name Synopsis BT_hci_write_current_iac_lap(): To write the current Inquiry Access Code LAP(s) in the local Bluetooth device #include BT hci api.h API_RESULT BT_hci_write_current_iac_lap ( UCHAR num_current_iac, UINT32 * iac_lap );

MindTree Limited

7 April 2011

Page 107 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Description

This API writes the current values for the Inquiry Access Code LAP(s), to be used by the local Bluetooth device to simultaneous listen for during an Inquiry Scan performed by other Bluetooth devices. All Bluetooth devices should support at least one IAC, the General Inquiry Access Code (GIAC 0x9E8B33).

IN Parameters

num_current_iac This parameter specifies the number of IACs, which are currently to be used by the local Baseband Controller to simultaneously listen for during an Inquiry Scan. Range: 0x01-0x40. The value specified must not be greater than the number of IACs that the local Bluetooth device is capable of supporting, as returned by the BT_hci_read_number_of_supported_iac() API. Iac_lap Pointer to a caller allocated UINT32 array of size num_current_iac, which holds the values of each LAP to be set. Each IAC LAP is actually a 3-byte value represented in a 4-byte UINT32 variable.

OUT Parameters Function Return Notes

None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None

BT_hci_write_scan_enable
Name Synopsis BT_hci_write_scan_enable(): To write the Scan Mode settings in the local Bluetooth device. #include BT hci api.h API_RESULT BT_hci_write_scan_enable ( UCHAR scan_enable ); Description This API writes the value of Scan Enable configuration parameter in the local Bluetooth device. The Scan Enable defines whether the local Bluetooth device will periodically scan for responding to Paging attempts and/or Inquiry attempts from other remote Bluetooth devices or not. IN Parameters scan_enable Value of the Scan Enable parameter to be set in the local Bluetooth device. The valid values and their meanings are shown below: 0x00: No Scans enabled (Default). 0x01: Inquiry Scan enabled, Page Scan disabled. 0x02: Inquiry Scan disabled, Page Scan enabled. 0x03: Inquiry Scan enabled, Page Scan enabled.

MindTree Limited

7 April 2011

Page 108 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

OUT Parameters Function Return Notes

None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

4) Device Discovery APIs BT_hci_inquiry


Name Synopsis BT_hci_inquiry(): To initiate/perform Bluetooth Device Inquiry/Discovery. #include BT hci api.h API_RESULT BT_hci_inquiry ( UINT32 lap, UCHAR inquiry_length, UCHAR num_responses ); Description This API initiates/performs the Bluetooth Device Inquiry/Discovery for the specified Inquiry Length and Number of Responses, and with the specified LAP (Lower Address Part) from which the local Bluetooth device derives the Inquiry Access Code (IAC). The local Bluetooth device starts the Bluetooth Inquiry on reception of the HCI Inquiry Command, and sends a Command Status Event to the HCI. At the end of the Inquiry process, the Inquiry Complete Event is received. Between these two events, none, one or more Inquiry Results Event may be received, when one or more remote Bluetooth devices respond to the Inquiry process initiated by the local Bluetooth device. The application is notified of the Inquiry Results in two ways: i. IN Parameters Inquiry Result Event via the HCI Event Indication Callback

lap This is the Lower Address Part from which the Bluetooth Hardware should derive Inquiry Access Code when the Inquiry procedure is made. Few of the commonly used values are: BT_GIAC The General Inquiry Access Code (0x9E8B33) BT_LIAC The Limited Inquiry Access Code (0x9E8B30)

inquiry_length Maximum amount of time specified before the Inquiry is halted. Value Range: 0x01 to 0x30. Inquiry Time = inquiry_length * 1.28 Sec. Num_responses Maximum number of responses from the Inquiry before the Inquiry is halted. Range: 0x00 0xFF. A value 0f 0x00 means unlimited number of responses. OUT Parameters None.

MindTree Limited

7 April 2011

Page 109 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Function Return Notes

API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h This API must not be called if the local Bluetooth device is in the process of establishing a connection with another Bluetooth device. A remote Bluetooth device will respond to Inquiry procedure only if it has its Inquiry Scan enabled.

BT_hci_inquiry_cancel
Name Synopsis BT_hci_inquiry_cancel(): Cancels an ongoing Bluetooth Device Inquiry/Discovery procedure. #include BT hci api.h API_RESULT BT_hci_inquiry_cancel ( void ); Description IN Parameters OUT Parameters Function Return Notes This API cancels an ongoing Bluetooth Device Inquiry/Discovery procedure. None None API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. This API can be called only if BT_hci_inquiry() API call was made before, and the application has not yet received the HCI Inquiry Complete Event for the Inquiry process.

BT_hci_write_inquiry_scan_type
Name Synopsis BT_hci_write_inquiry_scan_type(): To write the Inquiry Scan Type configuration parameter #include BT hci api.h API_RESULT BT_hci_write_inquiry_scan_type ( UCHAR inquiry_scan_type ); Description This API writes the current value for Inquiry Scan Type configuration parameter to be stored in the local Bluetooth device. The Inquiry Scan Type configuration parameter controls whether the local Bluetooth device performs Standard Scan or Interlaces Scan (faster) during inquiry. inquiry_scan_type The Inquiry Scan Type to be set. The valid values are: 0x00 Standard Scan

IN Parameters

MindTree Limited

7 April 2011

Page 110 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

OUT Parameters Function Return Notes None.

0x01 Interlaced Scan

API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None

5) Connection Setup APIs BT_hci_create_connection


Name Synopsis BT_hci_create_connection(): To create an ACL connection to a specified remote Bluetooth device. #include BT hci api.h API_RESULT BT_hci_create_connection ( UCHAR * bd_addr, UINT16 packet_type, UCHAR page_scan_repetition_mode, UCHAR page_scan_mode, UINT16 clock_offset, UCHAR allow_role_switch ); Description This API is used to create an ACL connection to the specified remote Bluetooth device. The local Bluetooth device starts the Bluetooth Paging process to create an ACL link on reception of the HCI Create Connection Command, and sends a Command Status Event to the HCI. At the end of the Paging process, the Connection Complete Event is received. Before receiving the Connection Complete Event, Bluetooth Security related events (Link Key Request Event and/or PIN Code Request Event) might be received, depending on the security settings on the local and/or remote Bluetooth device. For details on the Bluetooth ACL link establishment, with or without link-level authentication procedure, refer to the Specification of the Bluetooth System, v1.2, Vol. 2, Part F Message Sequence Charts. IN Parameters bd_addr This is the Bluetooth Device Address for the remote device to which an attempt will be made to create an ACL connection. Packet_type This is the ACL Packet Types to be used by the Baseband Controller for this new ACL connection. One or more DHx/DMx packet types can be combined together. Page_scan_repetition_mode page_scan_mode These two parameters specify the Page Scan modes supported by the remote Bluetooth device this information must have been acquired during the Bluetooth Inquiry procedure. Clock_offset The clock offset between the local Baseband Controller and the remote one this information must have been acquired during Bluetooth Inquiry
MindTree Limited 7 April 2011 Page 111 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

procedure. Allow_role_switch This parameter specified whether the local Baseband Controller would accept or reject the request of a Master-Slave role switch during the ACL connection establishment phase. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h There can only be one ACL connection between a pair of Bluetooth devices. Establishment of ACL link depends to the Page Scan mode of the remote Bluetooth device.

BT_hci_disconnect
Name Synopsis BT_hci_disconnect(): To disconnect an ACL link. #include BT hci api.h API_RESULT BT_hci_disconnect ( UINT16 connection_handle, UCHAR reason ); Description This API initiates disconnection of an existing ACL, SCO or eSCO link with a remote Bluetooth device, as identified by the supplied Connection Handle. The local Bluetooth device starts the Link Manager procedure to disconnect the link on reception of the HCI Disconnect Command, and sends a Command Status Event to the HCI. At the end of the link disconnection process, the Disconnection Complete Event is received. For details on the Bluetooth link disconnection, refer to the Specification of the Bluetooth System, v1.2, Vol. 2, Part F Message Sequence Charts. If the Connection Handle supplied with this API refers to the ACL link with a remote Bluetooth device, then all the SCO & eSCO links that may be currently active with the same remote device will also be disconnected, and Disconnection Complete Events for each of this link will be received. IN Parameters connection_handle Connection Handle for the existing ACL, SCO or eSCO connection to be disconnected. Reason This specifies the reason for disconnection.

The reason parameter is delivered along with the Disconnection Complete Event. OUT Parameters Function None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h.

MindTree Limited

7 April 2011

Page 112 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Return Notes None.

BT_hci_write_page_timeout
Name Synopsis BT_hci_write_page_timeout(): To set the Page Timeout configuration parameter value in the local Bluetooth device. #include BT hci api.h API_RESULT BT_hci_write_page_timeout ( UINT16 page_timeout ); Description This API writes the value of the Page Timeout configuration parameter to the local Bluetooth device. The Page Timeout configuration parameter defines the maximum amount of time the local Bluetooth device will wait for a response from a remote Bluetooth device for a locally initiated connection. IN Parameters OUT Parameters Function Return Notes page_timeout The value of Page Timeout to be set. The actual timeout is calculated as follows: Time = page_timeout * 0.625 msec; Value Range: 0x0001 0xFFFF. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

BT_hci_write_page_scan_type
Name Synopsis BT_hci_write_page_scan_type(): To write the Page Scan Type configuration parameter #include BT hci api.h API_RESULT BT_hci_write_page_scan_type ( UCHAR page_scan_type ); Description This API writes the current value for Page Scan Type configuration parameter to be stored in the local Bluetooth device. The Page Scan Type configuration parameter controls whether the local Bluetooth device performs Standard Scan or Interlaces Scan (faster)

MindTree Limited

7 April 2011

Page 113 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

during paging. IN Parameters page_scan_type The Page Scan Type to be set. The valid values are: OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None 0x00 Standard Scan 0x01 Interlaced Scan

6) Connection State APIs BT_hci_write_link_policy_settings


Name Synopsis BT_hci_write_link_policy_settings(): To write the Link Policy Settings configuration parameter to the local Bluetooth device . #include BT hci api.h API_RESULT BT_hci_write_link_policy_settings ( UINT16 connection_handle, UINT16 link_policy_settings ); Description This API writes the Link Policy Setting configuration parameter to the local Bluetooth device for a specified ACL Connection Handle. The Link Policy Settings parameter determines the behavior of the local Bluetooth device when it receives a request from a remote Bluetooth device to change the Master-Slave role or to enter the Hold, Sniff, or Park mode. The local Bluetooth device will automatically accept or reject such a request from the remote device based on the value of the Link Policy Settings parameter for the corresponding Connection Handle. IN Parameters connection_handle The Connection Handle of the ACL connection with a remote Bluetooth device, for which the Link Policy Settings to be written. Link_policy_settings The Link Policy Settings to be set.

Value 0x0000: Disable all LM modes. (Default) Value 0x0001: Enable Master-Slave switch. Value 0x0002: Enable Hold Mode. Value 0x0004: Enable Sniff Mode. Value 0x0008: Enable Park Mode.

MindTree Limited

7 April 2011

Page 114 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

OUT Parameters Function Return Notes

None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

BT_hci_sniff_mode
Name Synopsis BT_hci_sniff_mode():To place an ACL Connection with a remote Bluetooth device to Sniff mode. #include BT hci api.h API_RESULT BT_hci_sniff_mode ( UINT16 connection_handle, UINT16 sniff_mode_max_interval, UINT16 sniff_mode_min_interval, UINT16 sniff_attempt, UINT16 sniff_timeout ); Description This API can be used to place an ACL connection between the local and remote Bluetooth device (identified by the ACL Connection Handle) into Sniff mode. The local Bluetooth device starts the Sniff mode process on reception of the HCI Sniff Mode Command, and sends a Command Status Event to the HCI. At the end of this process, the Mode Change Event is received. IN Parameters connection_handle The Connection Handle of the ACL connection with a remote Bluetooth device that needs to be placed into Sniff mode. Sniff_mode_max_interval This parameter specifies the maximum acceptable number of Baseband time slots to wait in Sniff mode. Value Range = 0x0002 to 0xFFFE. Only even values are valid Sniff time = sniff_mode_max_interval * 0.625 msec Time Range = 1.25 msec to 40.9 sec sniff_mode_min_interval This parameter specifies the maximum acceptable number of Baseband time slots to wait in Sniff mode. Value Range = 0x0002 to 0xFFFE. Only even values are valid Sniff time = sniff_mode_min_interval * 0.625 msec Time Range = 1.25 msec to 40.9 sec Note: sniff_mode_max_interval > sniff_mode_min_interval sniff_attempt This parameter specifies the number of Baseband receive slots for

MindTree Limited

7 April 2011

Page 115 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Sniff attempt. Value Range = 0x0001 to 0x7FFF. Time = (2 * sniff_attempt - 1) * 0.625 msec Time Range = 0.625 msec to 40.9 sec sniff_timeout Sniff timeout. This parameter specifies the number of Baseband receive slots for

Value Range = 0x0000 to 0x7FFF. If sniff_timeout > 0, Time = (2 * sniff_timeout Otherwise, Time = 0. Time Range = 0 msec to 40.9 sec OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None. - 1) * 0.625 msec.

BT_hci_exit_sniff_mode
Name Synopsis BT_hci_exit_sniff_mode(): To end/cancel the Sniff mode. #include BT hci api.h API_RESULT BT_hci_exit_sniff_mode ( UINT16 connection_handle ); Description This API can be used to end the Sniff mode for an ACL Connection, which is currently in the Sniff mode. The local Bluetooth device starts the exit from the Sniff mode process on reception of the HCI Exit Sniff Mode Command, and sends a Command Status Event to the HCI. At the end of this process, the Mode Change Event is received. IN Parameters OUT Parameters Function Return Notes connection_handle The Connection Handle of the ACL connection with a remote Bluetooth device, for which the Sniff mode needs to be cancelled. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

MindTree Limited

7 April 2011

Page 116 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

BT_hci_sniff_subrating (Bluetooth v2.1+EDR)


Name Synopsis BT_hci_sniff_subrating(): To specify the parameters for sniff subrating for a given link. #include BT hci api.h API_RESULT BT_hci_sniff_subrating ( UINT16 connection_handle, UINT16 maximum_latency, UINT16 minimum_remote_timeout, UINT16 minimum_local_timeout ); Description This API writes the parameters for the sniff subrating for the ACL link as specified by the connection handle. The interval shall be determined from the sniff interval and the maximum subrate latency parameters from the command. The link may have smaller subrates and therefore lower latencies and longer timeouts than those specified. If this command is used on a link in sniff mode this shall cause sniff subrating to be negotiated at the Link Manager, otherwise sniff subrating shall be negotiated only after the device has entered the sniff mode. The Connection Handle shall be the primary Connection Handle between the two devices. The Maximum Latency parameter shall define the maximum allowed sniff subrate of the remote device. If the Host does not write the sniff subrating parameters prior to sniff subrating being initiated by the Link Manager the default values shall be used. Setting both subrate values to zero is equivalent to sniff mode without subrating enabled. IN Parameters connection_handle Bluetooth device. The Connection Handle of the ACL connection with a remote

maximum_latency The Maximum Latency parameter shall be used to calculate the maximum sniff subrate that the remote device may use. The valid values and their meanings are shown below: Value Range = 0x0000 to 0xFFFE. Only even values are valid. Default = 0x0000 Latency = maximum_latency * 0.625 msec Time Range = 0 sec to 40.9 sec minimum_remote_timeout The minimum base sniff subrate timeout that the remote device may use. The valid values and their meanings are shown below: Value Range = 0x0000 to 0xFFFE. Only even values are valid.

MindTree Limited

7 April 2011

Page 117 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Default = 0x0000 Latency = maximum_latency * 0.625 msec Time Range = 0 sec to 40.9 sec minimum_local_timeout The minimum base sniff subrate timeout that the local device may use. The valid values and their meanings are shown below: Value Range = 0x0000 to 0xFFFE. Only even values are valid. Default = 0x0000 Latency = maximum_latency * 0.625 msec Time Range = 0 sec to 40.9 sec OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

7) LINK INFORMATION APIs BT_hci_read_transmit_power_level


Name Synopsis BT_hci_read_transmit_power_level(): To read the value of Transmit Power Level. #include BT hci api.h API_RESULT BT_hci_read_transmit_power_level ( UINT16 connection_handle, UCHAR power_type ); Description IN Parameters This API reads the value for Transmit Power Level for the specified Connection Handle for the ACL connection to a remote Bluetooth device. connection_handle The Connection Handle corresponding to the ACL connection with the remote Bluetooth device, for which the transmit power level to be read. Power_type This parameter specifies whether the current or maximum power level to read. The valid values are: Value 0x00: Read current Transmit Power Level. Value 0x01: Read maximum Transmit Power Level. OUT Parameters None.

MindTree Limited

7 April 2011

Page 118 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Function Return Notes

API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

BT_hci_read_rssi
Name Synopsis BT_hci_read_rssi(): To retrieve the RSSI value for an ACL connection. #include BT hci api.h API_RESULT BT_hci_read_rssi ( UINT16 connection_handle ); Description This API reads the value for the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range for a specified ACL Connection Handle to another Bluetooth device. Any positive RSSI value returned by the local Bluetooth device indicates how many dB the RSSI is above the upper limit, any negative value indicates how many dB the RSSI is below the lower limit. The value zero indicates that the RSSI is inside the Golden Receive Power Range. IN Parameters OUT Parameters Function Return Notes connection_handle reading the RSSI. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. The RSSI measurement compares the received signal power with two threshold levels, which define the Golden Receive Power Range. The lower threshold level corresponds to a received power between -56 dBm and 6 dB above the actual sensitivity of the receiver. The upper threshold level is 20 dB above the lower threshold level to accuracy of +/- 6 dB. The Connection Handle to be used to identify the connection for

BT_hci_write_link_supervision_timeout
Name Synopsis BT_hci_write_link_supervision_timeout(): To write the value of the Link Supervision Timeout configuration parameter in the local Bluetooth device. #include BT hci api.h API_RESULT BT_hci_write_link_supervision_timeout ( UINT16 connection_handle, UINT16 link_supervision_timeout ); Description This API writes the value of the Link Supervision Timeout configuration parameter in the local Bluetooth device. The Master or Slave Bluetooth device uses the Link Supervision Timeout configuration
MindTree Limited 7 April 2011 Page 119 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

parameter to monitor link loss. If, for any reason, no Baseband packets are received from a Connection Handle for duration longer than the Link Supervision Timeout, the connection is disconnected. The same timeout value is used for both Synchronous (SCO/eSCO) and ACL connections for the device specified by the Connection Handle. IN Parameters connection_handle The ACL Connection Handle for the connection with the remote Bluetooth device for which the link supervision timeout to be set. Link_supervision_timeout The value of Link Supervision Timeout parameter to be set. Value Range = 0x0001 0x07FF. A value of 0x0000 means No Link Supervision Timeout at all. Actual Time = link_supervision_timeout * 0.625 msec. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. Setting the Link Supervision Timeout to 0x0000 will disable the Link Supervision Timeout check for the specified Connection Handle. This makes it unnecessary for the Bluetooth Master of the Piconet to unpark and then park each Bluetooth Device every ~40 seconds. By using a value of 0x0000 for the Link Supervision Timeout setting, the scalability of the Park state is not limited.

8) REMOTE INFORMATION APIs BT_hci_remote_name_request


Name Synopsis BT_hci_remote_name_request(): To retrieve the Name of the remote Bluetooth device. #include BT hci api.h API_RESULT BT_hci_remote_name_request ( UCHAR * bd_addr, UCHAR page_scan_repetition_mode, UCHAR page_scan_mode, UINT16 clock_offset ); Description This API is used to get the Name of a remote Bluetooth device, as identified by the supplied Bluetooth Device Address. The local Bluetooth device starts the name retrieval process on reception of the HCI Remote Name Request Command, and sends a Command Status Event to the HCI. At the end this process, the Remote Name Request Complete Event is received. IN Parameters bd_addr Bluetooth Device Address of the remote Bluetooth device.

Page_scan_repetition_mode page_scan_mode clock_offset The Page Scan Modes and the Clock Offset for the remote Bluetooth device. These parameters are returned by BT_hci_inquiry) API.

MindTree Limited

7 April 2011

Page 120 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

OUT Parameters Function Return Notes

None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. To retrieve the name, an ACL connection is required between the devices. A temporary ACL connection is made if it does not exist. Hence this API can fail, if the remote device does not have Page Scan enabled.

9) Testing and Vendor Specific APIs BT_hci_enable_device_under_test_mode


Name Synopsis BT_hci_enable_device_under_test_mode(): To allow local Bluetooth device to enter DUT mode. #include BT hci api.h API_RESULT BT_hci_enable_device_under_test_mode ( void );

Description

This API enables the local Bluetooth device to enter Device Under Test (DUT) mode via the LMP test Commands. For details on the Device Under Test Mode, please refer to the Specification of the Bluetooth System, v1.2, Vol. 2, Part E Host Controller Interface Functional Specification, Section 7.6.3.

IN Parameters OUT Parameters Function Return Notes

None. None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. This API is available only if HCI_TESTING_COMMANDS compilation flag is enabled during compilation.

BT_hci_vendor_specific_command
Name Synopsis BT_hci_vendor_specific_command(): To send a vendor specific HCI command to the local Bluetooth device. #include BT hci api.h API_RESULT BT_hci_vendor_specific_command ( UINT16 ocf, UCHAR * params, UCHAR params_length );

MindTree Limited

7 April 2011

Page 121 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Description

This API can be used to send vendor specific HCI commands to the local Bluetooth device. The HCI Opcode and parameters are specific to the vendor specific command. Refer to the documentation of the Bluetooth device to find out the details of available vendor specific commands. ocf Opcode Command Field for the vendor specific Opcode.

IN Parameters

Params Parameters to be framed for the vendor specific HCI command Params_length Total length of the parameters passed. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None.

10) AUTHENTICATION AND ENCRYPTION APIs BT_sm_connection_request_reply


Name Synopsis BT_sm_connection_request_reply(): To reply to the SM Connection Request Event #include BT sm api.h API_RESULT BT_sm_connection_request_reply ( UCHAR * bd_addr, UCHAR accept, UCHAR reason ); Description This API enables applications to accept/reject an incoming link-level connection from a Untrusted remote Bluetooth device. This API must be used to reply when Security Manager calls the registered UI Notification Callback with SM_CONNECTION_REQUEST_NTF as the event identifier. IN Parameters bd_addr The Bluetooth Device Address of the remote Untrusted Bluetooth device.

accept This parameter specifies whether the incoming link-level (ACL) connection from the specified remote Bluetooth device needs to be accepted or rejected. The valid values are: 0x00 reject the incoming link-level (ACL) connection. 0x01 accept the incoming link-level (ACL) connection. reason This parameter specifies the reason for rejecting a connection. This parameter must be set to one of the Host Controller Error Codes as described in the Specification of the Bluetooth System, v1.2, Vol. 2, Part D Error Codes. OUT None.

MindTree Limited

7 April 2011

Page 122 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Parameters Function Return Notes API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. None.

BT_sm_pin_code_request_reply
Name Synopsis BT_sm_pin_code_request_reply(): To reply to the SM PIN Code Request Event #include BT sm api.h API_RESULT BT_sm_pin_code_request_reply ( UCHAR * bd_addr, UCHAR * pin_code, UCHAR pin_length ); Description This API enables applications to furnish Bluetooth PIN for authentication procedure on outgoing link-level connection to a device. This API must be used to reply when Security Manager calls the registered UI Notification Callback with SM_PIN_CODE_REQUEST_NTF as the event identifier. The application can send either a positive or a negative reply to a PIN Code request from the local Bluetooth device (controller). IN Parameters bd_addr The Bluetooth Device Address of the remote device.

pin This parameter holds the Bluetooth PIN, and it must be a pointer to an UCHAR buffer. Application can pass NULL only if the pin_length is Zero. pin_length This parameter specifies the length of the PIN Code size of the UCHAR buffer as specified in the parameter pin. The length of PIN Code can be Zero, but must not be more than 16 octets. To send a PIN Code Negative Reply, the application must call this API with pin_length as 0. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. None.

BT_sm_get_device_link_key
Name Synopsis BT_sm_get_device_link_key(): To get Bluetooth Link Key for a remote Bluetooth device. #include BT sm api.h API_RESULT BT_sm_get_device_link_key ( UCHAR * bd_addr,
MindTree Limited 7 April 2011 Page 123 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

UCHAR ); Description

* link key

This API enables application to retrieve Link Key for a remote Bluetooth device, which is be used by the Security Manager for authentication procedure during link-level or servicelevel connection to the specified remote device. bd_addr The Bluetooth Device Address of the remote device for which Bluetooth Link Key to be get. link_key Caller allocated UCHAR array of 16 octets onto which the devices Link Key will be copied. NULL is not an acceptable parameter. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. None.

IN Parameters OUT Parameters Function Return Notes

BT_sm_link_key_request_reply
Name Synopsis BT_sm_link_key_request_reply(): To reply to the SM Link Key Request Event #include BT sm api.h API_RESULT BT_sm_link_key_request_reply ( UCHAR * bd_addr, UCHAR * link_key, UCHAR link_key_present ); Description This API enables applications to furnish the Link Key for authentication procedure on the link-level connection to a device. This API must be used to reply when Security Manager calls the registered UI Notification Callback with SM_LINK_KEY_REQUEST_NTF as the event identifier. The application can send either a positive or a negative reply to a Link Key request from the local Bluetooth device (controller). IN Parameters bd_addr The Bluetooth Device Address of the remote (un-trusted) device.

link_key This parameter holds the Bluetooth Link Key. It must be a pointer to an UCHAR buffer of size 16 octets. NULL is an acceptable value, only if the link_key_present is 0. link_key_present The application can set this flag to 0, if the Bluetooth Link Key, for the specified remote Bluetooth device, is not available, to generate the Link Key Request Negative Reply message to the local Bluetooth device. If link key is available, this flag must be set to 1. OUT Parameters Function Return None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h.

MindTree Limited

7 April 2011

Page 124 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Notes

None.

BT_sm_user_conf_request_reply
Name Synopsis BT_sm_user_conf_request_reply(): To reply to the SM User Confirmation Request Event #include BT sm api.h API_RESULT BT_sm_user_conf_request_reply ( UCHAR * bd_addr, UCHAR accept ); Description This API enables applications to accept/reject User Confirmation request, during link authentication using Secure Simple Pairing procedure (Numeric Comparison association model). This API must be used to reply when Security Manager calls the registered UI Notification Callback with SM_USER_CONF_REQUEST_NTF as the event identifier. The application can send either accept or reject to a User Conf request from the local Bluetooth device (controller). IN Parameters bd_addr The Bluetooth Device Address of the remote device.

accept This parameter specifies whether the User Confirmation request for the specified remote Bluetooth device needs to be accepted or rejected. The valid values are: 0x00 reject the User Confirmation request. 0x01 accept the User Confirmation request. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. None.

Security Manager Callbacks


SM User Interface Notification Callback
This callback mechanism is provided by the Security Manager Module to notify the application (or profile) that a certain event has occurred like link key notification or for events that needs manual user intervention such as providing Bluetooth PIN, authorizing a device for service-level connection etc. Name Synopsis SM UI Notification Callback #include BT_sm_api.h
7 April 2011 Page 125 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

API_RESULT (* sm_ui_notify_cb) ( UCHAR event_id, UCHAR * bd_addr, void * data ); typedef API_RESULT (* SM_UI_NOTIFY_CB) ( UCHAR event_id, UCHAR * bd_addr, void * data ); IN Parameters event_id This parameter specifies the event that has occurred in the Security Manager module that needs manual user interaction. The defined event types are given in SM UI Notification Callback Event Identifiers. bd_addr Bluetooth Device Address of the remote device for which this event notification is being raised. data This parameter contains information specific to the event_id being notified. Detailed description of this parameter is given below. OUT Parameters Function Return Notes None. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error.h. No blocking operations, such as calling functions that can block for indefinite period, or, takes considerable amount of time, must be performed in the callback function. This SM Callback is usually called from the context of EtherMind Read or Write Task, and hence any blocking operation in the handling of the callback may seriously hamper the stacks performance. Possible SM_EVENTS received are shown in the table below:
SM_EVENTS SM_ACL_CONNECT_REQUEST_NTF Description The incoming link-level (ACL) Connection Request received from a remote Bluetooth device Incoming service-level connection request received from a remote Bluetooth device, as identified by its Bluetooth Device Address (BD_ADDR) and Service Identifier Reception of Link Key Request for a remote Bluetooth device, from the local Bluetooth controller, as identified by remote Bluetooth Device Address (BD_ADDR) Reception of PIN Code Request for a remote Bluetooth device, from the local Bluetooth controller, as identified by remote Bluetooth Page 126 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SM_AUTHORIZATION_REQUEST_NTF

SM_LINK_KEY_REQUEST_NTF

SM_PIN_CODE_REQUEST_NTF

MindTree Limited

7 April 2011

Device Address (BD_ADDR) SM_AUTHORIZATION_REQUEST_NTF_MODE_1_3 Incoming service-level connection request received from a remote Bluetooth device, while the Security Mode of the SM is either 1 or 3, as identified by its Bluetooth Device Address (BD_ADDR) and Service Identifier User confirmation of a numeric value is required, when Numeric Comparison association model is being used during Secure Simple Pairing (SSP). A passkey is required, when Passkey Entry association model is being used as part of a Simple Pairing process Used to provide a passkey for the Host to display to the user, when Passkey Entry association model is being used as part of a Simple Pairing

SM_USER_CONF_REQUEST_NTF

SM_USER_PASSKEY_REQUEST_NTF

SM_USER_PASSKEY_NTF

In the default application SM callback is registered in sdk_bluetooth_on_complete. This code snippet is shown below: API_RESULT sdk_bluetooth_on_complete(void) { API_RESULT retval; SDK_DEBUG_PRINT_STRING("Bluetooth turned ON\n",20); /* Register SM callback handler */ sdk_display(SDK_MSG_AREA, (const UCHAR *)"Registering UI Notification Callback ... ", 0); retval = BT_sm_register_user_interface(sdk_sm_ui_notify_cb);

SM UI Notification Callback Event Identifiers


Event Identifier SM_ACL_CONNECT_REQUEST_NTF SM_AUTHORIZATION_REQUEST_NTF SM_PIN_CODE_REQUEST_NTF SM_LINK_KEY_REQUEST_NTF SM_AUTHORIZATION_REQUEST_NTF_MODE_1_3 SM_USER_CONF_REQUEST_NTF SM_USER_PASSKEY_REQUEST_NTF SM_USER_PASSKEY_NTF Value 0x01 0x02 0x03 0x0 0x05 0x06 0x07 0x08 Description Connection Request Authorization Request (Security Mode 2) PIN Code Request Link Key Request Authorization Request (Security Mode 1 or 3) User Confirmation Request (Security Mode 4) User Passkey Request (Security Mode 4) User Passkey Notification (Security Mode 4)

MindTree Limited

7 April 2011

Page 127 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Porting Security Manager Persistent Storage


The EtherMind Security Manager (SM) provides a feature to store various SM configuration settings onto persistent storage media (such as, EEPROM or equivalent). Interface functions to open and close the persistent storage are defined as sm_ps_open() and sm_ps_close(). The Security Manager invokes the sm_storage_read() function during Bluetooth ON [BT_bluetooth_on()] procedure. The sm_storage_read() is responsible for reading various Security Manager configuration parameters from the persistent storage media. The Security Manager invokes the sm_storage_write() function during Bluetooth OFF [BT_bluetooth_off()] procedure. The sm_storage_write() is responsible for writing various Security Manager configuration parameters to the persistent storage media. The SM adds a signature to the start of the persistent storage location. This signature is 4 bytes in length and is set to 0xCAFEBEDA. The sm_storage_read() and sm_storage_write() functions BT_SDK_DIR\bluetooth\export\common_appl\sm_storage_pl.c. are present as part of

The functions listed below need to customized by the end user. These functions are present as part of BT_SDK_DIR\bluetooth\export\common_appl\sm_storage_pl.c 1. void sm_ps_open(SDK_SM_PS_OPEN_MODES mode) Description: Function to initialize the persistent storage for reading or writing IN parameters: mode - mode of operation (read - PS_READ or write - PS_WRITE) OUT parameters: None 2. void sm_ps_close(void) Description: Function to close the operations on persistent storage IN parameters: None OUT parameters: None 3. void sm_ps_write(UCHAR * p, UINT16 nb) Description: Function to write to the persistent storage IN parameters: p - Address of buffer OUT parameters: nb - Number of bytes to be written to persistent storage 4. void sm_ps_read(UCHAR * p, UINT16 nb) Description: Function to read from the persistent storage IN parameters: p - Address of buffer OUT parameters: nb - Number of bytes to be read from persistent storage

MindTree Limited

7 April 2011

Page 128 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The sm_storage_open(), sm_storage_close(), sm_storage_read() and sm_storage_write() are used by the EtherMind library to implement the persistent storage. The Security Manager Device Database can be accessed by referencing the sm_devices global variable, which is an array of SM_DEVICE_ENTITY. This structure is defined in sm_internal.h. The structure to store the security manager details is as listed below: /** The Security Manager Device Database */ typedef struct { /** Platform specific Device Attributes */ SM_DEVICE_ATTR_PL device_attr_pl; /** ACL Connection Handle for the Device */ UINT16 acl_handle; /** Newly Allocated / Existing / Unallocated ? */ UCHAR valid; /** * Device Attributes of this Device Database entry: * Bit 0: Trusted or Untrusted. * Bit 1-2: whether Authentication is performed for this device * * * * 00 - Not Authenticated 01 - Authenticated 10 - Authentication in progress 11 - Unused

* Bit 3-4: whether Encryption is performed for this device * * * * 00 - Not Encrypted 01 - Pt-to-Pt Encrypted 10 - Pt-to-Pt & Broadcast Encrypted (Unused) 11 - Encryption in progress

* Bit 5: whether Link Key is available or not

MindTree Limited

7 April 2011

Page 129 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

* Bit 6: whether ACL connection is locally or remotely originated * Bit 7: whether ACL connection initiated and completion is awaited */ UCHAR device_attr;

/** Length of Device's Name */ UCHAR name_length; /** Length of Device's PIN Code */ UCHAR pin_length; /** Type of Link Key */ UCHAR link_key_type; #ifdef BT_SSP /** Last received IO Capability of Remote Device */ SM_IO_CAPS remote_io_cap; #endif /* BT_SSP */ /** Link Key for the Device */ UCHAR link_key [BT_LINK_KEY_SIZE]; /** Name of the Device */ UCHAR name [SM_DEVICE_NAME_SIZE]; /** PIN Code for the Device */ UCHAR pin_code [BT_PIN_CODE_SIZE]; /** BD_ADDR of the Device */ UCHAR bd_addr [BT_BD_ADDR_SIZE]; } SM_DEVICE_ENTITY; Device Name, PIN Code and respective lengths field updation in sm_devices structure: The Security Manager Device Database can be accessed by referencing the sm_devices global variable, which is an array of SM_DEVICE_ENTITY. Device Name, PIN Code and their respective lengths in the sm_devices structure are not mandatory fields. Normally they are not populated.

MindTree Limited

7 April 2011

Page 130 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

- The PIN code field (and corresponding length) is to address the advanced use case of having 'different PIN code per device' only if it is required. Typically there is no requirement for keeping different PIN code per device (almost in all the cases single PIN code for all devices is sufficient. The single common PIN code used for all the devices is maintained separately and not as part of the sm_devices structure). - The name field is not mandatory, as not all the devices have capability to display (or tell - using Text to Speech etc.) the name of the remote device. Apart from that applications many times wants to save Name of a peer device, along with may be Class Of Device, the services peer device support etc. in different structures. Moreover, for the security manager functionality, only the Bluetooth Device Address BD_ADDR, can be used to identify the peer device and not the name of the device. In case the application wants to set/access these PIN and name related fields of the sm_devices structure, EtherMind stack also provides following related interfaces: a. /** To set name for a remote Bluetooth device */

API_RESULT BT_sm_set_device_name(UCHAR * bd_addr, UCHAR * name, UCHAR name_length);

b.

/** To get name for a remote Bluetooth device */

API_RESULT BT_sm_get_device_name(UCHAR * bd_addr, UCHAR * name, UCHAR * name_length);

c.

/** To set Bluetooth PIN (Passkey) for a remote Bluetooth device */

API_RESULT BT_sm_set_device_pin_code(UCHAR * bd_addr, UCHAR * pin, UCHAR pin_length);

d.

/** To get Bluetooth PIN (Passkey) for a remote Bluetooth device */

API_RESULT BT_sm_get_device_pin_code(UCHAR * bd_addr, UCHAR * pin, UCHAR * pin_length);

The Security Manager Configuration parameters accessed from the persistent storage are described in the table below:

MindTree Limited

7 April 2011

Page 131 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SM Configuration Parameter SM Default PIN Code

Porting Guide This parameter configures the default PIN Code of the local Bluetooth device. In sm_storage_write(), the current value of sm_default_pin_length and sm_default_pin are written in the persistent storage. In sm_storage_read(), previously configured values are read from the persistent storage and the sm_default_pin_length and sm_default_pin are populated accordingly. The sm_default_pin_length is a SM Global variable (UCHAR), as defined in sm_extern.h. The sm_default_pin is a SM Global variable (UCHAR Array of size BT_PIN_CODE_SIZE), as defined in sm_extern.h under bluetooth\private\protocols\sm sub-directory. It is important to write/read the sm_default_pin_length to/from the persistent storage media before writing/reading the sm_default_pin. Bluetooth PIN Code can have a maximum of 16 octets. When the BT_PIN_CODE_SIZE is configured (in BT_limits.h) to be less than 16, it is advisable to write always 16 octets for the sm_default_pin, and pad the remaining octets, if any, with 0x00. Similarly, when reading, 16 octets should be read from the persistent storage, however, only BT_PIN_CODE_SIZE (or, sm_default_pin_length, whichever is less) number of octets should be copied to sm_default_pin.

MindTree Limited

7 April 2011

Page 132 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

SM Configuration Parameter SM Trusted Device List

Porting Guide Devices that are marked to be Trusted in the Security Manager Device Database can be stored in the persistent storage media at the time of Bluetooth OFF, and/or, shutdown of the system. The Trusted Devices will be remembered and re-configured in the SM Device Database next time when Bluetooth ON is called. As of now, the Security Manager does not provide a mechanism to count number of devices that are marked to be trusted. Hence, SM Device Database needs to be scanned to find this information. The Security Manager Device Database can be accessed by referencing the sm_devices global variable, which is an array of SM_DEVICE_ENTITY (defined in sm_internal.h under bluetooth\private\protocols\sm subdirectory) of size SM_MAX_DEVICES (defined in BT_limits.h). The sm_devices is defined in sm_extern.h. Procedure for writing/reading trusted device information is described below: (1) Write/read the number of trusted devices, from sm_devices (2) For each trusted device, write/read the following information: a. Devices BD_ADDR UCHAR array of 6 octets b. Devices Link Key UCHAR array of 16 octets c. Devices Link Key Type UCHAR d. Devices Trust UCHAR e. Devices Name Length UCHAR f. Devices Name - UCHAR array of SM_DEVICE_NAME_SIZE octets g. Devices PIN Code Length UCHAR h. Devices PIN Code UCHAR array of BT_PIN_CODE_SIZE octets i. Devices Rank - UCHAR Bluetooth PIN Code can have a maximum of 16 octets. When the BT_PIN_CODE_SIZE is configured (in BT_limits.h) to be less than 16, it is advisable to write always 16 octets for the devices PIN Code, and pad the remaining octets, if any, with 0x00. Similarly, when reading, 16 octets should be read from the persistent storage, however, only BT_PIN_CODE_SIZE (or, devices PIN Code length, whichever is less) number of octets should be copied to devices PIN Code. SM Device Name is an array of size SM_DEVICE_NAME_SIZE (defined in BT_limits.h)

The library utilizes the sm_ps_open(), sm_ps_close(), sm_ps_read() and sm_ps_write() functions to save the required information to the flash. This can be customized by the user as needed.

MindTree Limited

7 April 2011

Page 133 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Writing to the MSP430F5438A flash is fully documented as part of the 5xx users guide available at http://www.ti.com/litv/pdf/slau208f and several code examples to show how it is done are available at http://www.ti.com/lit/zip/slac375

MindTree Limited

7 April 2011

Page 134 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Updating SDP Database


The EtherMind SDP Database (SDDB) is implemented in the provided BT_SDK_DIR\bluetooth\export\db_gen.c and BT_SDK_DIR\bluetooth\export\db_gen.h files. The provided db_gen.c file contains the definition of the SPP SDP Service Database Record, as defined in the Bluetooth SPP specification. Important variables and data structures of the SDP database are described below

Variable/Data Structure
dbase[DB_MAX_RECORDS]

Description
The main data structure definition of the SDP database. Each entry corresponds to an SDP Service Record. By default, it defines the SDP server and SPP database records Default definition is shown below: /** * Record 00 : SDP Record * Record 01 : SPP */ Total number of records in the database. There are two records, one for SDP Server itself and other one for SPP All the UUIDs used in the SDP database are defined in this array. All are 128-bit UUID. Default definition is shown below: /** List of all required UUIDs */ const UCHAR uuid_128_arr[DB_MAX_UUIDS][16] = { /** * UUID Index 00 : * ( 0x0003 ) -> RFCOMM */ {0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 01 : * ( 0x0100 ) -> L2CAP */ {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 02 : * ( 0x1000 ) -> ServiceDiscoveryServerServiceClassID */ {0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34,

num_records uuid_128_arr[DB_MAX_UUIDS][16]

MindTree Limited

7 April 2011

Page 135 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

0xFB}, /** * UUID Index 03 : * ( 0x1002 ) -> PublicBrowseGroup */ {0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 04 : * ( 0x1101 ) -> SerialPort */ {0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB} num_128_ids }; Total number of UUIDS used in the entire database. By default, there are 5 UUIDs. The UUIDs are defined in uuid_128_arr[DB_MAX_UUIDS][16] array. All the defined UUIDs are associated with one or more SDP database record. This array maps the UUIDs defined in the uuid_128_arr[DB_MAX_UUIDS][16] array to SDP records defined in dbase[]. Default definition const UCHAR uuid_indices_arr[] = { /** Service Record 0 */ 2, /** Service Record 1 */ 0, 1, 3, 4 }; UUID Index 2, is associated with SDP Server Record (Record Index 0) Rest of the UUID Indices 0, 1, 3, 4 are associated with SPP Service Record (Record Index 1) Contains the attribute value corresponding to all the attributes defined in the SDP record Default definition /* Attribute value array */ const UCHAR value_arr[] = { /** Service Record 0 */ /* ServiceRecordHandle */ 0x0A, 0x00, 0x00, 0x00, 0x00, /* ServiceClassIDList */ 0x35, 0x03, 0x19, 0x10, 0x00, /* VersionNumberList */ 0x35, 0x03, 0x09, 0x01, 0x00, /** Service Record 1 */ /* ServiceRecordHandle */ 0x0A, 0x00, 0x09, 0x00, 0x01, /* ServiceClassIDList */ 0x35, 0x03, 0x19, 0x11, 0x01, /* ProtocolDescriptorList */ 0x35, 0x0C, 0x35, 0x03, 0x19, 0x01, 0x00, 0x35,
MindTree Limited 7 April 2011 Page 136 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

uuid_indices_arr[]

value_arr[]

0x05, 0x19, 0x00, 0x03, 0x08, 0x01, /* BrowseGroupList */ 0x35, 0x03, 0x19, 0x10, 0x02, /* LanguageBaseAttributeIDList */ 0x35, 0x09, 0x09, 0x65, 0x6E, 0x09, 0x00, 0x6A, 0x09, 0x01, 0x00, /* ServiceName */ 0x25, 0x0B, 0x42, 0x6C, 0x75, 0x65, 0x4D, 0x53, 0x50, 0x34, 0x33, 0x30, 0x00 }; Along with the attribute values, the attribute names are mentioned in comments. Starts of each SDP records are also marked. Maps the attribute values, with the corresponding attribute identifiers. Default definition /* Attribute structure array */ const struct attr attr_arr[] = { /** Service Record 0 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x0000}, /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0005}, /* VersionNumberList */ {0x0200, 0x0005, value_arr + 0x000A}, /** Service Record 1 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x000F}, /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0014}, /* ProtocolDescriptorList */ {0x0004, 0x000E, value_arr + 0x0019}, /* BrowseGroupList */ {0x0005, 0x0005, value_arr + 0x0027}, /* LanguageBaseAttributeIDList */ {0x0006, 0x000B, value_arr + 0x002C}, /* ServiceName */ {0x0100, 0x000D, value_arr + 0x0037} }; To give an example, let us see the following attribute of the SPP Record /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0014}
MindTree Limited 7 April 2011 Page 137 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

attr_arr[]

The first element 0x0001 represents ServiceClassIDList Attribute. The second element 0x0005 represents the attribute value length. The third element value_arr + 0x0014 points to the location where the corresponding attribute value is stored. value_arr[] as explained above stores all the attribute values and the 0x0014, is the start index of ServiceClassIDList attribute value in value_arr[]. For each SDP service record, attribute ids are listed in ascending order.

How do I change the SPP Server Channel?


SPP Server channel is part of the ProtocolDescriptorList attribute In the value_arr[],ProtocolDescriptorList attribute value is defined as follows /* ProtocolDescriptorList */ 0x35, 0x0C, 0x35, 0x03, 0x19, 0x01, 0x00, 0x35, 0x05, 0x19, 0x00, 0x03, 0x08, 0x01, By default, 0x01 is the SPP server channel. To change the server channel value to 0x05, replace 0x01 with 0x05. After the change the ProtocolDescriptorList attribute value in value_arr[] will become /* ProtocolDescriptorList */ 0x35, 0x0C, 0x35, 0x03, 0x19, 0x01, 0x00, 0x35, 0x05, 0x19, 0x00, 0x03, 0x08, 0x05,

How do I change the ServiceName attribute of SPP record?


Currently the ServiceName of the SPP Record is defined in value_arr[] as follows /* ServiceName */ 0x25, 0x0B, 0x42, 0x6C, 0x75, 0x65, 0x4D, 0x53, 0x50, 0x34, 0x33, 0x30, 0x00 Interpretation of the attribute value 0x25 -> Represents Text String whose data size is contained in the additional 8-bits. These are interpreted as an unsigned integer. 0x0B -> Text String Length 0x0B (i.e. 11 in decimal) 0x42, 0x6C, 0x75, 0x65, 0x4D, 0x53, 0x50, 0x34, 0x33, 0x30, 0x00 -> Text String BlueMSP430 Corresponding, entry in the attr_arr[] is /* ServiceName */ {0x0100, 0x000D, value_arr + 0x0037} 0x000D is the length of the corresponding attribute value [which includes the Text String type (0x25) and the text string length (0x0B), along with the actual text string of length 0x0B] To change the ServiceName attribute value to say, MyService Change the length from 0x0B to 0x0A The modified ServiceName attribute value in value_arr[] will be as follows /* ServiceName */ 0x25, 0x0A, 0x4D, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x00

MindTree Limited

7 April 2011

Page 138 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Corresponding, entry in the attr_arr[] also should be changed to update the length from 0x000D to 0x000C, as the text string length has reduced from x0B to 0x0A. /* ServiceName */ {0x0100, 0x000C, value_arr + 0x0037}

How do I add a new custom UUID in the existing record?


Assume you want to add following custom 128-bit UUID to the ServiceClassIDList of SPP record 0x00112233445566778899AABBCCDDEEFF Steps: Add the UUID in the uuid_128_arr[][], as shown below /** List of all required UUIDs */ const UCHAR uuid_128_arr[DB_MAX_UUIDS][16] = { /** * UUID Index 00 : * ( 0x0003 ) -> RFCOMM */ {0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 01 : * ( 0x0100 ) -> L2CAP */ {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 02 : * ( 0x1000 ) -> ServiceDiscoveryServerServiceClassID */ {0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 03 : * ( 0x1002 ) -> PublicBrowseGroup */ {0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 04 : * ( 0x1101 ) -> SerialPort */ {0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}, /** * UUID Index 05 : * ( 0x00112233445566778899AABBCCDDEEFF ) -> Custom 128-bit UUID */ {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}
MindTree Limited 7 April 2011 Page 139 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

}; Update the number of UUIDs for SPP Service record from 4 to 5

Default value /* * SDP Record * Of * SPP Profile */ dbase[1].rec_handle = 0x00090001; dbase[1].active = DB_RECORD_INACTIVE; dbase[1].num_uuids = 4; dbase[1].num_attrs = 6; dbase[1].attr_offset = 3; Modified definition /* * SDP Record * Of * SPP Profile */ dbase[1].rec_handle = 0x00090001; dbase[1].active = DB_RECORD_INACTIVE; dbase[1].num_uuids = 5; dbase[1].num_attrs = 6; dbase[1].attr_offset = 3; Update the value of num_128_ids from 5 to 6 num_128_ids = 6;

Change the definition of DB_MAX_UUIDS from 5 to 6 in db_gen.h file #define DB_MAX_UUIDS 6

Associate the index of the new UUID (i.e. 5) to the SPP Record /* UUID indices array */ const UCHAR uuid_indices_arr[] = { /** Service Record 0 */ 2, /** Service Record 1 */ 0, 1, 3, 4, 5

MindTree Limited

7 April 2011

Page 140 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

}; Currently the ServiceClassIDList of the SPP Record is defined in value_arr[] as follows /* ServiceClassIDList */ 0x35, 0x03, 0x19, 0x11, 0x01,

Interpretation of the attribute value 0x35 -> Represents SDP Data Element Sequence data structure whose data size is contained in the additional 8 bits, which are interpreted as an unsigned integer. 0x03 -> Length 0x03 (i.e. 3 in decimal) of the attribute value 0x19 -> 16-bit UUID 0x11 0x01 -> SPP 16-bit UUID (0x1101), as defined in the Assigned Number

Corresponding, entry in the attr_arr[] is /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0014},

0x0005 is the length of the corresponding attribute value [which includes the Data Element Sequence type (0x35) and the length (0x03), along with the UUID (0x1101).

To include the custom UUID 0x00112233445566778899AABBCCDDEEFF in the ServiceClassIDList update the ServiceClassIDList of the SPP Record in value_arr[] as follows /* ServiceClassIDList */ 0x35, 0x14, 0x19, 0x11, 0x01, 0x1C, 0x00, 0x11, 0x22, 033, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF Interpretation of the attribute value 0x35 -> Represents SDP Data Element Sequence data structure whose data size is contained in the additional 8 bits, which are interpreted as an unsigned integer. 0x14 -> Length 0x14 (i.e. 20 in decimal) of the attribute value 0x19 -> 16-bit UUID 0x11 0x01 -> SPP 16-bit UUID (0x1101), as defined in the Assigned Number 0x1C -> 128-bit UUID
MindTree Limited 7 April 2011 Page 141 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

0x00 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF-> Custom 128-bit UUID

Corresponding, entry in the attr_arr[] also should be changed to update the length from 0x0005 to 0x0016, as a new 128-bit UUID is added. /* ServiceClassIDList */ {0x0001, 0x0016, value_arr + 0x0014},

With this change there is addition of 17 bytes, in the ServiceClassIDList attribute value. This additional 17 bytes offset has to be added in all sub-sequent attributes in the attr_arr[]. Current default definition /* Attribute structure array */ const struct attr attr_arr[] = { /** Service Record 0 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x0000}, /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0005}, /* VersionNumberList */ {0x0200, 0x0005, value_arr + 0x000A}, /** Service Record 1 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x000F}, /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0014}, /* ProtocolDescriptorList */ {0x0004, 0x000E, value_arr + 0x0019}, /* BrowseGroupList */ {0x0005, 0x0005, value_arr + 0x0027}, /* LanguageBaseAttributeIDList */ {0x0006, 0x000B, value_arr + 0x002C}, /* ServiceName */ {0x0100, 0x000D, value_arr + 0x0037} }; Shall be changed as follows Default definition /* Attribute structure array */ const struct attr attr_arr[] = {
MindTree Limited 7 April 2011 Page 142 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

/** Service Record 0 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x0000}, /* ServiceClassIDList */ {0x0001, 0x0005, value_arr + 0x0005}, /* VersionNumberList */ {0x0200, 0x0005, value_arr + 0x000A}, /** Service Record 1 */ /* ServiceRecordHandle */ {0x0000, 0x0005, value_arr + 0x000F}, /* ServiceClassIDList */ {0x0001, 0x0016, value_arr + 0x0014}, /* ProtocolDescriptorList */ {0x0004, 0x000E, value_arr + 0x0019 + 17}, /* BrowseGroupList */ {0x0005, 0x0005, value_arr + 0x0027 + 17}, /* LanguageBaseAttributeIDList */ {0x0006, 0x000B, value_arr + 0x002C + 17}, /* ServiceName */ {0x0100, 0x000D, value_arr + 0x0037 + 17} };

MindTree Limited

7 April 2011

Page 143 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MSP430 resources used by the Sample SPP applications


Mandatory Resources
The EtherMind Bluetooth SDK needs only the following MSP430 resources to work - UART2 for interfacing with the CC2560controller

Optional Resources
The other resources used by the sample applications are optional. These resources are - Timer1_A3 To implement LPM - UART1 - To send the accelerometer data to the PC over the USB interface In case of the MSP-EXP430F5438+PAN1315EMK, the ADC is used to read the data from the accelerometer or temperature sensor. In case of the EZ430-RF2560, the I2C interface is used to read the data from the accelerometer. The software is completely interrupt driven and does not rely on software ticks. In case software ticks are required, this may be introduced by adding an extra timer. The steps to do this are documented at http://FreeRTOS.org

Explanation of the Sample Temperature Application


The following are the important steps involved in sending temperature data over SPP Connection: 1. Bluetooth is turned ON by invoking the function BT_bluetooth_on. The snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on(); if (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS; } 2. Once the BT ON is notified on the registered call back (sdk_bluetooth_on_complete ) inquiry scan type is changed to interlaced scanning. The code segment for setting the inquiry scan type is as follows: /* Write Inquiry Scan mode (Interlaced scanning = 0x01) */ retval = BT_hci_write_inquiry_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA, (const UCHAR *)"Failed to set inquiry scan type\n", 0); } 3. Once the inquiry scan is completed, change write page scan mode to interlaced scanning. The code segment for setting the page scan type is as follows:

MindTree Limited

7 April 2011

Page 144 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

/* Change write Page Scan mode (Interlaced scanning = 0x01)*/ retval = BT_hci_write_page_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA,(const UCHAR *)"Failed to set type\n", 0); }

page

scan

4. Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned ON. The code segment for turning on the visibility of the device is as follows:

/* Make local device discoverable (Inquiry Scan & Page Scan enabled = 0x03)*/
retval = BT_hci_write_scan_enable(scan_type); if (API_SUCCESS == retval) { sdk_bt_visible = SDK_DISC_ON; }

5. Inquiry is initiated to discover the peer Bluetooth devices.Thecodesegmentforperforming inquiryprocessisasshownbelow: retval = BT_hci_inquiry(SDK_INQUIRY_LAP, SDK_INQUIRY_LEN, SDK_NUM_RESPONSES); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA, (const UCHAR *) "Failed to initiate Inquiry\n", 0); sdk_print_message((const UCHAR *) "Error:Failed to initiate Inquiry\0"); } else { sdk_display(SDK_MSG_AREA, (const UCHAR *) "Inquiry Started...Wait for Completion\n", 0); }
6. In the hci event callback note the peer Bluetooth device address, page scan repetition mode and clock offset of each device that is indicated with HCI_INQUIRY_RESULT_EVENT event. The code segment for handling HCI inquiry result event handler is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_RESULT_EVENT: hci_inquiry_result_event_handler(event_data); break; } return API_SUCCESS; }

MindTree Limited

7 April 2011

Page 145 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

7. After Inquiry is completed, HCI_INQUIRY_COMPLETE_EVENT event is received in the hci event indication callback. The code segment for handling HCI inquiry complete event is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_COMPLETE_EVENT: hci_inquiry_complete_event_handler (event_data); break; } return API_SUCCESS; }

8. HCI remote name request is issued with the peer Bluetooth Device address, page scan repetition
mode and clock offset The code segment for issuing HCI remote name request is as shown below: retval = BT_hci_remote_name_request(bd_addr, page_scan_rep_mode, page_scan_mode, clock_offset); if (retval != API_SUCCESS) { printf("Remote Name Request FAILED !! Error Code = 0x%04x\n", retval); } 9. Remote Bluetooth device name is indicated in with hci event indication callback with HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT event . The code segment for handling HCI remote name request complete event is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT: hci_remote_name_request_complete_event_handler(event_data, event_datalen); break; } return API_SUCCESS; }

10. Once the required peer Bluetooth device is found during inquiry, ACL Connection to this device is
initiated with its bluetooth address, page scan repetition mode and clock offset. The code segment for initiating ACL connection is as shown below: ret_val = BT_hci_create_connection(&bd_addr, packet_type,
MindTree Limited 7 April 2011 Page 146 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

page_scan_repetition_mode, page_scan_mode, clock_offset, allow_role_switch);

11. Successful ACL connection is handled as part of appl_acl_connection_complete_event (). The


code segment for opening SDP channel and performing SDP service search request as shown below: ret_val = BT_sdp_open (&sdp_handle);

ret_val = BT_sdp_servicesearchattributerequest (&handle, &uuids, num_uuids, &attribute_ids, num_attribute_ids, &attribute_id_range, num_attribute_id_range, &attribute_data, &len_attribute_data); 12. Remote Server Channel Number is obtained in the SDP Callback registered during SDP Open. The code segment for obtaining the remote server channel number in SDP is as shown below: void appl_spp_sdp_callback(UINT8 command, UINT8 * data, UINT16 length, UINT16 status) { switch (command) { case SDP_ServiceSearchAttributeResponse: printf("Received Response for SDP SSA Request for SPP.\n"); printf("Getting SPP Server Channel ... "); fflush(stdout); retval = BT_sdp_get_channel_number(data, &server_ch); } }

13. SPP Connection is initiated using the remote server channel number and peer Bluetooth Device address. The code segment for initiating SPP connection is as shown below: retval = BT_spp_connect(&bd_addr, server_ch);
14. In the SPP callback registered during SPP Initialization, SPP_CONNECT_CNF event is received. The code segment for handling SPP_CONNECT_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_CNF: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle; }
MindTree Limited 7 April 2011 Page 147 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

15. On the peer device, in the SPP call back, SPP_CONNECT_IND is received. The code segment for handling SPP_CONNECT_IND is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle; } }

16. SPP data read from the temperature sensor is sent on the created SPP channel. The code segment for sending the thermometer data over SPP is as shown below: appl_send_spp_data(dev_index);

17. In the SPP callback registered during SPP Initialization, SPP_SEND_CNF event is received on transmitting a data packet. The code segment for handling SPP_SEND_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_SEND_CNF: printf("SPP_SEND_CNF -> Sent successfully\n"); } }

18. On the peer device, in the SPP callback registered during SPP initialization, SPP_RECVD_DATA_IND is received. The code segment for handling SPP_RECVD_DATA_IND is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_RECVD_DATA_IND: printf("SPP_RECVD_DATA_IND -> Data received successfully\n"); } }

19. When the SPP is disconnected, SPP_DISCONNECT_CNF is received in the SPP callback registered during SPP initialization. The code segment for handling SPP_DISCONNECT_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result,
MindTree Limited 7 April 2011 Page 148 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_CNF: printf("SPP_DISCONNECT_CNF -> Disconnection Successful\n"); } }

20. On the peer device, SPP_DISCONNECT_IND is received on SPP disconnect. The code segment for handling SPP_DISCONNECT_IND is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"); } }

MindTree Limited

7 April 2011

Page 149 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Explanation of the Sample Accelerometer Application


(Common for both MSP-EXP430F5438+PAN1315EMK and EZ430-RF2560)
Important steps involved in sending accelerometer data over SPP Connection: 1. Bluetooth is turned ON by invoking the function BT_bluetooth_on,the snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on(); if (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS; } 2. Once the BT ON is notified on the registered call back (sdk_bluetooth_on_complete) inquiry scan type is changed to interlaced scanning. The code segment for setting the inquiry scan type is as follows: /* Write Inquiry Scan mode (Interlaced scanning = 0x01) */ retval = BT_hci_write_inquiry_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA, (const UCHAR *)"Failed to set inquiry scan type\n", 0); } 3. Once the inquiry scan is completed, change write page scan mode to interlaced scanning. The code segment for setting the page scan type is as follows: /* Change write Page Scan mode (Interlaced scanning = 0x01)*/ retval = BT_hci_write_page_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA,(const UCHAR *)"Failed to set page scan type\n", 0); } 4. Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned ON. The code segment for turning on the visibility of the device is as follows: /* Make local device discoverable (Inquiry Scan & Page Scan enabled = 0x03)*/ retval = BT_hci_write_scan_enable(scan_type); if (API_SUCCESS == retval) { sdk_bt_visible = SDK_DISC_ON; } 5. Inquiry is initiated to discover the peer Bluetooth devices. The code segment for performing inquiry process is as shown below: retval = BT_hci_inquiry(SDK_INQUIRY_LAP, SDK_INQUIRY_LEN, SDK_NUM_RESPONSES); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA, (const UCHAR *) "Failed to initiate Inquiry\n", 0);
MindTree Limited 7 April 2011 Page 150 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

sdk_print_message((const UCHAR *) "Error:Failed to initiate Inquiry\0"); } else { sdk_display(SDK_MSG_AREA, (const UCHAR *) "Inquiry Started...Wait for Completion\n", 0); } 6. In the hci event callback note the peer Bluetooth device address, page scan repetition mode and clock offset of each device that is indicated with HCI_INQUIRY_RESULT_EVENT event. The code segment for handling HCI inquiry result event handler is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_RESULT_EVENT: hci_inquiry_result_event_handler(event_data); break; } return API_SUCCESS; }

7. After Inquiry is completed, HCI_INQUIRY_COMPLETE_EVENT event is received in the hci event


indication callback. The code segment for handling HCI inquiry complete event is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_COMPLETE_EVENT: hci_inquiry_complete_event_handler (event_data); break; } return API_SUCCESS; } 8. HCI remote name request is issued with the peer Bluetooth Device address, page scan repetition mode and clock offset The code segment for issuing HCI remote name request is as shown below: retval = BT_hci_remote_name_request(bd_addr, page_scan_rep_mode, page_scan_mode, clock_offset); if (retval != API_SUCCESS) { printf("Remote Name Request FAILED !! Error Code = 0x%04x\n", retval); }

9. Remote Bluetooth device name is indicated in with hci event indication callback with HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT event . The code segment for handling HCI remote name request complete event is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type, UCHAR * event_data, UCHAR event_datalen)
MindTree Limited 7 April 2011 Page 151 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

{ /* Switch on the Event Code */ switch (event_type) { case HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT: hci_remote_name_request_complete_event_handler(event_data, event_datalen); break; } return API_SUCCESS; }

10. Once the required peer Bluetooth device is found during inquiry, ACL Connection to this device is initiated with its bluetooth address, page scan repetition mode and clock offset. The code segment for initiating ACL connection is as shown below: ret_val = BT_hci_create_connection(&bd_addr, packet_type, page_scan_repetition_mode, page_scan_mode, clock_offset, allow_role_switch);

11. Successful ACL connection is handled as part of appl_acl_connection_complete_event (). The


code segment for opening SDP channel and performing SDP service search request as shown below: ret_val = BT_sdp_open (&sdp_handle);

ret_val = BT_sdp_servicesearchattributerequest (&handle, &uuids, num_uuids, &attribute_ids, num_attribute_ids, &attribute_id_range, num_attribute_id_range, &attribute_data, &len_attribute_data); 12. Remote Server Channel Number is obtained in the SDP Callback registered during SDP Open. The code segment for obtaining the remote server channel number in SDP is as shown below: void appl_spp_sdp_callback(UINT8 command, UINT8 * data, UINT16 length, UINT16 status) { switch (command) { case SDP_ServiceSearchAttributeResponse: printf("Received Response for SDP SSA Request for SPP.\n"); printf("Getting SPP Server Channel ... "); fflush(stdout); retval = BT_sdp_get_channel_number(data, &server_ch); } } 13. SPP Connection is initiated using the remote server channel number and peer Bluetooth Device address. The code segment for initiating SPP connection is as shown below:

retval = BT_spp_connect(&bd_addr, server_ch);


MindTree Limited 7 April 2011 Page 152 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

14. In the SPP callback registered during SPP Initialization, SPP_CONNECT_CNF event is received. The code segment for handling SPP_CONNECT_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_CNF: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle; } }

15. On the peer device, in the SPP call back, SPP_CONNECT_IND is received. The code segment for handling SPP_CONNECT_IND is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle; } }

16. SPP data read from the accelerometer sensor is send on the created SPP channel. The code segment for sending the accelerometer data over SPP is as shown below: appl_send_spp_data(dev_index);

17. In the SPP callback registered during SPP Initialization, SPP_SEND_CNF event is received on
transmitting a data packet. The code segment for handling SPP_SEND_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_SEND_CNF: printf("SPP_SEND_CNF -> Sent successfully\n"); } }

18. On the peer device, in the SPP callback registered during SPP initialization, SPP_RECVD_DATA_IND is received. The code segment for handling SPP_RECVD_DATA_IND is as shown below:
API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) {
MindTree Limited 7 April 2011 Page 153 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

case SPP_RECVD_DATA_IND: printf("SPP_RECVD_DATA_IND -> Data received successfully\n"); } }

19. When the SPP is disconnected, SPP_DISCONNECT_CNF is received in the SPP callback registered
during SPP initialization. The code segment for handling SPP_DISCONNECT_CNF is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_CNF: printf("SPP_DISCONNECT_CNF -> Disconnection Successful\n"); } }

20. On the peer device, SPP_DISCONNECT_IND is received on SPP disconnect. The code segment for handling SPP_DISCONNECT_IND is as shown below:
API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"); } }

MindTree Limited

7 April 2011

Page 154 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Explanation of the Simple Application


Important steps involved in sending data over SPP Connection: 1. Bluetooth is turned ON by invoking the function BT_bluetooth_on,the snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on(); if (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS; } 2. Once the BT ON is notified on the registered call back (sdk_bluetooth_on_complete) inquiry scan type is changed to interlaced scanning. The code segment for setting the inquiry scan type is as follows: /* Write Inquiry Scan mode (Interlaced scanning = 0x01) */ retval = BT_hci_write_inquiry_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA, (const UCHAR *)"Failed to set inquiry scan type\n", 0); } 3. Once the inquiry scan is completed, change write page scan mode to interlaced scanning. The code segment for setting the page scan type is as follows: /* Change write Page Scan mode (Interlaced scanning = 0x01)*/ retval = BT_hci_write_page_scan_type(scan_type); if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA,(const UCHAR *)"Failed to set page scan type\n", 0); } 4. Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned ON. The code segment for turning on the visibility of the device is as follows: /* Make local device discoverable (Inquiry Scan & Page Scan enabled = 0x03)*/ retval = BT_hci_write_scan_enable(scan_type); if (API_SUCCESS == retval) { sdk_bt_visible = SDK_DISC_ON; } 5. Once the peer Bluetooth device initiates the SPP connection, ACL Connection complete event handler is triggered bluetooth address, status and connection handle. The code segment for handling ACL connection complete event is shown below: appl_acl_connection_complete_event(bd_addr, status, connection_handle); 6. In the SPP call back, SPP_CONNECT_IND is received. The code segment for handling SPP_CONNECT_IND is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) {
MindTree Limited 7 April 2011 Page 155 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle; } } 7. SPP data is sent on the created SPP channel. The code segment for sending the data over SPP is as shown below: appl_send_spp_data(dev_index);

8. If the peer device initiates SPP disconnection, SPP_DISCONNECT_IND is received on SPP disconnect. The code segment for handling SPP_DISCONNECT_IND is as shown below:
API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS event_type, IN API_RESULT result, IN void *data, IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"); } }

MindTree Limited

7 April 2011

Page 156 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flow Diagram for Establishing SPP connection

MindTree Limited

7 April 2011

Page 157 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

7 April 2011

Page 158 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

7 April 2011

Page 159 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flow Diagram for SPP Disconnection

MindTree Limited

7 April 2011

Page 160 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flow Diagram for sending SPP Data

Note: Optional steps are denoted by dotted lines.

MindTree Limited

7 April 2011

Page 161 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Flow diagrams for eHCILL related data handling


1. Awake to Sleep state

AWAKE STATE

Rxed ehcill data

Sleep Ind Rxed?

No

Error Handler

Yes Set TXIFG; Tx Sleep Ack

SLEEP STATE

MindTree Limited

7 April 2011

Page 162 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

2. Sleep to Awake state (Wake-up from host)


SLEEP STATE

Rxed data from higher/appl layer

Tx Wake up ind

Rx ehcill data

Rxed Wake up ack

No

No

Rxed Wake up ind Yes Collision Case 1

Error Handler

Yes

AWAKE STATE Set TxIFG, Tx data

MindTree Limited

7 April 2011

Page 163 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

3. Sleep to Awake state (Wake up from peer)

SLEEP STATE

Rxed ehcill data?

Error Handler

Rxed Wake up ind?

Error Handler

Sent Wake up ind?

Set TXIFG; Tx Wake up Ack

Collision Case 1

AWAKE STATE

MindTree Limited

7 April 2011

Page 164 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Macros for debugging


The following macros have been declared for debugging purposes as part of sdk_bluetooth_common_config.h SDK_DEBUG_PRINT_STRING SDK_DEBUG_PRINT_CHAR SDK_DEBUG_MODULE_INIT The macros have no action defined against them. The user can customize these macros as needed to help in debugging the application built using the SDK. The macros then have to be inserted at appropriate points in the code to help with the debugging. The following are some possibilities: 1. Define the macros such that they can output characters to the PC using the USB connection. 2. Define the macros such that they can toggle some GPIO lines that can be used to trace the functionality 3. Define the macros to write some information to a predefined area in the memory to trace the functionality.

Support for CC2560, CC256x, CC2564 and CC2567 devices


The EtherMind SDK supports the following silicon versions of the Bluetooth controller: 1. CC2560 (BT only deprecated silicon version) 2. CC256x (BT only) 3. CC2564 (BT + LE) 4. CC2567 (BT + ANT) The silicon version is displayed on the Temperature package in the Bluetooth > Diagnostics menu. The CC2560 silicon will report a value of 0x1F02. These silicons are supported by choosing the appropriate vendor specific library and excluding the other vendor specific libraries related to other silicon, while building the application. The four libraries corresponding to these silicon versions are supplied as part of the SDK. They are named as libTI_init_script_BT_CC2560.r43, libTI_init_script_BT_CC256x.r43, libTI_init_script_BT_CC2564.r43 and libTI_init_script_BT_CC2567.r43. With IAR, exclusion or inclusion is done by right clicking on the specific library and using the Exclude from build option. The screen shot for this is shown below:

MindTree Limited

7 April 2011

Page 165 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Support for CC256x Power Circuitry


The CC256x supports three power circuitries: Full-VBAT, Full-DC2DC and mixed VBAT and DC2DC. The PAN1315 datasheet contains detailed info on these powering options. This SDK supports only Full-VBAT and Full-DC2DC options.

Paring the SDK with a PC


The following steps need to be followed to pair the EtherMind SPP SDK with the Microsoft stack in the PC using a Bluetooth 2.1 dongle 1. Download the image on to the target board 2. Turn ON Bluetooth on the target board. 3. Turn ON the Bluetooth device visibility on the target board. 4. Connect the Bluetooth 2.1 dongle to the PC 5. Open Device Manager, right click to select properties of the Bluetooth device as shown below:
MindTree Limited 7 April 2011 Page 166 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

6. Change the name of the device in the Advance tab to match the selection defined as part of sdk_bluetooth_config.h under the #define SDK_REM_DEV_NAME_PREFIX. This screen shot is shown below:

7. Search for remote devices using the PC and add the required device 8. This will allow you to establish connection to the MSP430 target device from the PC

MindTree Limited

7 April 2011

Page 167 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Performance Analysis
1. Bluetooth Initialization Time
It is the time taken to complete the Bluetooth initialization sequence at a defined frequency and baud rate on MSP430F5430+CC2560 setup. It is calculated with a GPIO signal using an oscilloscope. It is calculated by setting a GPIO at the start of Bluetooth ON sequence and resetting at the successful completion of Bluetooth ON sequence. The high time of the GPIO signal indicates the Bluetooth initialization time. The initialization time is defined as the time taken for turning ON the Bluetooth device using the following commands: 1. 2. 3. 4. 5. 6. 7. 8. 9. HCI_Reset HCI_Read_Local_Version_Information HCI_VS_Get_System_Status HCI_VS_Configure_ARMIO HCI_VS_Write_ARMIO_Port HCI_VS_Read_Modify_Write_Hardware_Register HCI_VS_Update_UART_HCI_Baudrate HCI_VS_Read_Modify_Write_Hardware_Register Vendor specific Init script for CC2560 corresponding to service-pack 2.38 with embedded LPS and EHCILL commands.

The following table presents initialization times at 25MHz for supported baud rates are shown below: Device Name CC2560 Frequency (MHz) 25 Baud Rate (bps) 115200 921600 CC256x 25 115200 921600 Initialization Time (seconds) 4.00 0.85 0.575 0.225

NOTE: Only one frequency has been chosen for calculating the BT initialization time since the change in frequency does not affect it significantly. The initialization time is in the order of seconds. Change in frequency (8/12/18/25MHz) results only in a change in the order of milliseconds with respect to the initialization times.

MindTree Limited

7 April 2011

Page 168 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

2. CPU Utilization Calculation


CPU utilization is the time spent by the processor in executing Bluetooth related tasks. To do this, a sample application is created with the static payload size set to 110 bytes. This is sent continuously over a single SPP connection in active mode. To calculate the time spent in the block of code, a hardware counter is used. Counter is started before the start of code and stopped just after the completion of execution of code. Time spent is calculated using the below mentioned formula: Time spent = Counter Value / Counters input clock frequency In the current setup, % CPU utilization is calculated using % CPU utilization = (Time spent / Reference Time) * 100 The CPU utilization measurements done with SPP TX mode at various baud rates and frequencies are as shown below:

Frequency Baudrate [MHz] [Kbps]


8 12 18 25 115.2 115.2 115.2 115.2 921.6

%CPU Utilization 14.16 12.37 10.70 9.42 10.27

MindTree Limited

7 April 2011

Page 169 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

3. Information on Code & Data sizes


The code and data sizes were calculated based on IAR EW430 MSP tool chain version 5.20.2 for the temperature application. The section contains two distinct tables of code and data size calculation. The first table contains the info related to Bluetooth SW Layers while the second table contains the info related to Sample Application Layers The mandatory code and data sizes are given in the table below:

Bluetooth SW Layers FreeRTOS Sub Total


1

Flash [Bytes] 3969 3969

RAM [Bytes] 3530 3530 122 1029 144 194 173 48 1122 941 3773 47 16 63 180 694 0 874 8240

Operating System

EtherMind Bluetooth Stack HCI L2CAP SDP RFCOMM GAP SPP BT buffer management Other stack related code Sub total CC2560 Init Script eHCILL Deep-Sleep Protocol Sub total Misc MSP430 System Stack & Heap Platform Related Files IAR Lib Total
5 4 3 2

8864 12714 10390 11666 4899 2084 1112 7633 59662 CC2560 Device Specific Code 57327 890 6622 0 3922 2544 6466 76719

Sub Total

MindTree Limited

7 April 2011

Page 170 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The code and data sizes for the optional modules are given in the table below:

Sample Application Layers Application Thermometer Application Sub Total HAL LCD Other HAL Components Sub Total Total

Flash[Bytes] 14096 14096

RAM[Bytes] 499 499 125 46 171 670

HAL (Hardware Abstraction Layer) 3232 1852 5084 19180

Storing results of Inquiry Rem_bt_dev Sub Total


Notes: 1. FreeRTOS is an open RTOS downloadable from http://freertos.org. The FreeRTOS RAM utilization includes RAM needed for user and BT tasks and associated semaphores. BT read/write task requires approximately 2KB. 2. Uses appl_spp_data_buffer[] of 4 bytes. This is determined by the payload size. The maximum size of the appl_spp_data_buffer[] is 110 bytes. 3. Sets up the necessary stack and heap required for using C code and also the buffers required for SPP operations. This is specified used the IAR IDE options and is only used before the FreeRTOS scheduler starts. Once the FreeRTOS scheduler takes over, the stack size defined as part of the individual tasks is used 4. Contains platform abstraction source code 5. Contains function definitions related to IAR standard library 6. This structure is used as part of the temperature application to store the inquiry result of 7 devices. This structure is not needed if inquiry is not part of the application. To store inquiry result of a single device, 44 bytes of RAM is used. In addition, the temperature application also stores the remote device name. If the application does not need to store remote device name, then this structure can be modified to use only 27 bytes of RAM per device. 7. The init script size is given for the CC256x device. In case of the older CC2560 device, the init script Flash size is larger by approximately 34K.
6

0 0

308 308

MindTree Limited

7 April 2011

Page 171 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

4. Throughput measurements
Throughput is the expression of how much amount of data is sent or transacted during a definite period of time. Details: Frontline FTS4BT 7.12.15.0 Air sniffer (Basic) software with FTS dongle connected to the PC, is used for measuring throughput. SSP (Secure Simple Pairing) is disabled to enable FTS to sniff the data based on PIN code alone. SPP connection is established between a Belkin 2.1 dongle on the PC and the MSP430 device. FTS is used to sniff the data being transferred between the PTS dongle and the MSP430 device. SPP data is sent from master to slave in active mode. Data transfer is sniffed for a period of 2 minutes. SPP Packet payload length for data transfer is 110 bytes. This is a static buffer and is continuously sent on a confirmation event. SPP data is sent in active mode The library is built with the L2CAP MTU size configured for 128 bytes

The results of the over the air throughput related measurements are shown below: Frequency/Baudrate[MHz] 8MHz @ 115.2 Kbps 12MHz @ 115.2 Kbps 18MHz @ 115.2 Kbps 25MHz @ 115.2 Kbps 25MHz @ 921.6 Kbps Average throughput [bps] 81830 83010 84184 90045 379585

MindTree Limited

7 April 2011

Page 172 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

APPENDIX

How to build pre-existing project using IAR


MSP-EXP430F5438+PAN1315EMK
Select the path of the workspace file to open up the IAR workspace

MindTree Limited

7 April 2011

Page 173 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Click on the required project tab in the workspace window. Right click on the package file and select the Make option

The build results will be displayed in the messages window.

MindTree Limited

7 April 2011

Page 174 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Connect the JFET to the PC and the MSP430 and load the binary image by clicking the debug Icon shown in the screenshot.

MindTree Limited

7 April 2011

Page 175 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Thedebuggershouldconnecttothetarget,loadstheimageandopenthedebuggerview.

MindTree Limited

7 April 2011

Page 176 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Click on the Debug -> Go option or press the F5 button to start the execution of the image,.

MindTree Limited

7 April 2011

Page 177 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

EZ430-RF2560
Select the path of the workspace file to open up the IAR workspace

Right click on the ez430-accl project and select the Make option

MindTree Limited

7 April 2011

Page 178 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

The build results will be displayed in the messages window.


Connect the EZ430 target board and load the binary image by clicking the debug Icon shown in the screenshot.

MindTree Limited

7 April 2011

Page 179 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Thedebuggershouldconnecttothetarget,loadstheimageandopenthe Debugger

MindTree Limited

7 April 2011

Page 180 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

ClickontheDebug>GooptionorpresstheF5buttontostarttheexecutionoftheimage,.

Loading a pre-built binary to the board using IAR workbench


Step 1: Open the IAR Embedded Workbench IDE. Step 2: To create new project click on Project tab and select the Create New Project as shown below:

MindTree Limited

7 April 2011

Page 181 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

MindTree Limited

7 April 2011

Page 182 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 3: Select the Create New Project as shown in the above snap shot then you will get the following window.

Step 4: Select Empty project and click OK then you will see the following window:.

MindTree Limited

7 April 2011

Page 183 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 5: Select the location and give the project name in the File name field as shown in the above snapshot and click on Save tab, the below screen is displayed:

Step 6: Add the pre-built binary file (*.d43) to the created project as shown below:

MindTree Limited

7 April 2011

Page 184 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step7: Select Files of type to All files (*) and add the required binary file to the project.

MindTree Limited

7 April 2011

Page 185 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 8: Right click on the project and select Options from the list.

MindTree Limited

7 April 2011

Page 186 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 9: Select General Options from the Category list and chose the device as shown below:

MindTree Limited

7 April 2011

Page 187 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 10: Click on OK to confirm the device type.

MindTree Limited

7 April 2011

Page 188 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 11: Select Debugger option from the Category list and select the Driver to FET Debugger as shown below:

MindTree Limited

7 April 2011

Page 189 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 12: Click on OK to select the FET Debugger driver as shown below:

MindTree Limited

7 April 2011

Page 190 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 13: Once binary file is added to the project, right click on the project and select Make. Create project workspace.

MindTree Limited

7 April 2011

Page 191 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 14: Click on Download and Debug tab in the menu bar (Download and debug Icon shown here) as shown below:

MindTree Limited

7 April 2011

Page 192 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 15: Click on the Skip tab (multiple times) to continue downloading process.

MindTree Limited

7 April 2011

Page 193 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Step 16: After Downloading process is completed, the screen is as shown below. Press F5 to run the image.

Performing an Inquiry with RSSI data in the inquiry result


The sample applications provided use the default HCI write inquiry mode. This does not return the RSSI information in the inquiry results. There are three possible inquiry result related events 1. Inquiry Result (event code 0x02) 2. Inquiry Result with RSSI (event code 0x22) 3. Extended Inquiry Result (event code 0x2F) The inquiry result events are passed on to the application by the SDK. The application can process the events in the desired manner.

MindTree Limited

7 April 2011

Page 194 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

To get the inquiry result with RSSI value, the application BT_hci_write_inquiry_mode() with its inquiry mode parameter set to 0x01.

needs

to

invoke

the

This needs to be done under sdk_handle_init_sequence() defined in sdk_common.c file. Information related to editing sdk_handle_init_sequence() is provided in section "Modifying the Bluetooth Initialization Sequence" in this developer guide. Once this is done, the resulting event will be HCI_INQUIRY_RESULT_WITH_RSSI_EVENT and this can be handled using the callback function sdk_hci_event_indication_callback() present in common_cb.c.

IAR Version Information


IAREmbeddedWorkbenchcanbeobtainedbychoosingtheoptionHelpAboutProductInfo IARIDEincludesmultipletoolsthatareversionedindividually.Theseversionsaregivenbelow:
NOTE:$IAR_INSTALL_PATHreferstothepathwheretheIARtoolsareinstalled. ===Installsubdirectory:430=== IARAssemblerforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\a430.exe 12/1/201012:36:52PM,2081280bytes IARC/C++CompilerforMSP430 5.20.2(5.20.2.50216) $IAR_INSTALL_PATH\430\bin\icc430.exe 1/12/20111:27:50PM,16783360bytes IARLibraryBuilder 5.0.2.5(5.0.2.5) $IAR_INSTALL_PATH\430\bin\xar.exe 11/5/20105:48:26PM,148992bytes IARXLIB 5.0.2.5(5.0.2.5) $IAR_INSTALL_PATH\430\bin\xlib.exe 11/5/20105:48:26PM,538112bytes IARUniversalLinker 5.0.2.5(5.0.2.5) $IAR_INSTALL_PATH\430\bin\xlink.exe 11/5/20105:48:26PM,2316288bytes IARCSPYBatchSimulatorDriverforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\430bat.dll 12/1/201012:15:14PM,505344bytes
MindTree Limited 7 April 2011 Page 195 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IARCSPYEmulatorDriverforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\430fet.dll 12/1/201012:20:20PM,2467840bytes IARCSPYLibrarySupportPluginforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\430libsupport.dll 12/1/201012:14:54PM,588288bytes IARLibSupportPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\430\bin\430LibSupport.ENU.dll 11/23/20105:05:32AM,10240bytes IARLibSupportPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\430\bin\430LibSupport.JPN.dll 11/23/20105:05:32AM,9216bytes IARCSPYProcessorDescriptorforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\430proc.dll 12/1/201012:17:12PM,1895936bytes IARCSPYSimulatorDriverforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\430sim.dll 12/1/201012:21:50PM,4061184bytes CP210x 1.2(1.2.0.0) $IAR_INSTALL_PATH\430\bin\CP210xManufacturing.dll 1/14/20105:19:52PM,69632bytes IARProjectFileConverterforMSP430 V3.21A/W32(3.21.1.9) $IAR_INSTALL_PATH\430\bin\cwtd430.dll 1/14/20105:21:20PM,352256bytes FTD2XXlibrary 3.01.06(3.1.6.1) $IAR_INSTALL_PATH\430\bin\FTD2XX.dll 1/14/20105:19:52PM,81920bytes HIL 1,2,6,0(1.2.6.0) $IAR_INSTALL_PATH\430\bin\hil.dll 11/3/20102:36:22PM,32768bytes SEGGERJLinkMSP430interfaceDLL 2.1.1.0(2.1.1.0) $IAR_INSTALL_PATH\430\bin\JLink430.dll
MindTree Limited 7 April 2011 Page 196 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

1/14/20105:19:52PM,114688bytes MSP430.dllforUSBMSP430FPA4v61basedonTI'sver.2.4.6.1 2,4,6,1(2.4.6.1) $IAR_INSTALL_PATH\430\bin\MSP430FPA.dll 11/26/20105:19:50PM,585728bytes MSP430JTAGInterfaceDriver 2.4.7.001(2.4.7.1) $IAR_INSTALL_PATH\430\bin\msp430.dll 11/8/20109:51:12AM,352256bytes MSP430 1,0,4,0(1.0.4.0) $IAR_INSTALL_PATH\430\bin\olimex.dll 11/29/20109:44:14AM,1138688bytes SBMSP430_DLLDLL 2,3,3,3(2.3.3.3) $IAR_INSTALL_PATH\430\bin\sbmsp430.dll 1/14/20105:19:52PM,262144bytes SiUSBXp 3.1(3.1.0.0) $IAR_INSTALL_PATH\430\bin\SiUSBXp.dll 11/18/201010:26:50AM,90112bytes MSP430 Version(2.3.3.1) $IAR_INSTALL_PATH\430\bin\SoftBaugh.dll 1/14/20105:19:52PM,32768bytes IARWorkbenchTargetDescriptorforMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\swtd430.dll 12/1/201012:15:48PM,1005056bytes IARWorkbenchTargetDescriptor,Emulator,forMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\swtd430fet.dll 12/1/201012:14:42PM,587264bytes IARWorkbenchTargetDescriptor,Simulator,forMSP430 5.20.1(5.20.1.50215) $IAR_INSTALL_PATH\430\bin\swtd430sim.dll 12/1/201012:14:48PM,540672bytes DriverInstallationUtility 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\Olimex\USBXpressInstaller.exe 9/9/20094:49:02AM,290816bytes $IAR_INSTALL_PATH\430\drivers\TIUSBFET\InstallDriver32.exe
MindTree Limited 7 April 2011 Page 197 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

1/14/20105:21:40PM,61440bytes $IAR_INSTALL_PATH\430\drivers\TIUSBFET\InstallDriver64.exe 1/14/20105:21:40PM,61440bytes $IAR_INSTALL_PATH\430\drivers\TIUSBFET\eZ430UART\preinstalCDC.exe 1/14/20105:19:36PM,49152bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista32\DPinst.exe 1/14/20105:20:08PM,552528bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista64\DPinst64.exe 1/14/20105:20:08PM,1047632bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win732\DPinst.exe 1/14/20105:20:08PM,552528bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win764\DPinst64.exe 1/14/20105:20:08PM,1047632bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP32\DPinst.exe 1/14/20105:20:08PM,552528bytes DriverPackageInstaller 2.1(2.1.0.0) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP64\DPinst64.exe 1/14/20105:20:08PM,1047632bytes FTD2XXDynamicLinkLibrary 3.02.02(3.2.2.0) $IAR_INSTALL_PATH\430\drivers\Olimex\FTD2XX.dll 11/16/20108:54:24AM,199048bytes FTDIUSBSerialConverterPropertyPageProvider 1.2.0.1(1.2.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftbusui.dll 10/22/20092:17:04PM,143688bytes FT2232VCPCoInstaller 2.00.00.1(2.0.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftcserco.dll 10/22/20092:11:20PM,51528bytes
MindTree Limited 7 April 2011 Page 198 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftd2xx64.dll 10/22/20092:17:18PM,330056bytes FTDIMultiLingualPropertyPageTextLibrary 1,4,0,1(1.4.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftlang.dll 10/22/20092:16:52PM,284992bytes FTDIVirtualCOMPortPropertyPageProvider 2.06.00.1builtby:WinDDK(2.6.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftserui2.dll 10/22/20092:08:36PM,55112bytes FTDIUSBSerialConverterPropertyPageProvider 1.2.0.1(1.2.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftbusui.dll 10/22/20092:17:10PM,120136bytes FT2232VCPCoInstaller 2.00.00.1(2.0.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftcserco.dll 10/22/20092:11:26PM,54088bytes FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftd2xx.dll 10/22/20092:17:26PM,206144bytes FTDIMultiLingualPropertyPageTextLibrary 1,4,0,1(1.4.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftlang.dll 10/22/20092:16:56PM,197952bytes FTDIVirtualCOMPortPropertyPageProvider 2.06.00.1builtby:WinDDK(2.6.0.1) $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftserui2.dll 10/22/20092:08:46PM,52552bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista32\WdfCoInstaller01009.dll 1/14/20105:20:08PM,1461992bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista64\WdfCoInstaller01009.dll 1/14/20105:20:06PM,1721576bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win732\WdfCoInstaller01009.dll
MindTree Limited 7 April 2011 Page 199 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

1/14/20105:20:06PM,1461992bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win764\WdfCoInstaller01009.dll 1/14/20105:20:08PM,1721576bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP32\WdfCoInstaller01009.dll 1/14/20105:20:08PM,1461992bytes WDFCoinstaller 1.9.7600.16385(win7_rtm.0907131255)(1.9.7600.16385) $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP64\WdfCoInstaller01009.dll 1/14/20105:20:06PM,1721576bytes LCDPluginforEW430 3.42A(3.42.1.9) $IAR_INSTALL_PATH\430\plugins\Lcd\lcd.dll 12/1/201012:15:48PM,413696bytes SEGGERembOSIARPlugin 6,0,6,0(6.0.6.0) $IAR_INSTALL_PATH\430\plugins\rtos\embOS\embOSPlugin.dll 11/4/20102:23:26PM,572416bytes PowerPacRTOSPlugin 6,0,6,0(6.0.6.0) $IAR_INSTALL_PATH\430\plugins\rtos\PowerPac\PowerPacRTOSPlugin.dll 11/2/20109:40:42PM,594944bytes C/OSII<=2.86KAPluginforCSPYDLL 2.5.0(2.5.0.0) $IAR_INSTALL_PATH\430\plugins\rtos\uCOSII\uCOSII286KACSpy.dll 11/3/20108:25:58PM,659456bytes C/OSII>=2.87KAPluginforCSPYDLL 2.5.1(2.5.1.0) $IAR_INSTALL_PATH\430\plugins\rtos\uCOSII\uCOSIIKACSpy.dll 11/3/20108:25:58PM,664576bytes PspUtil1PluginDLL 2.0(2.0.0.0) $IAR_INSTALL_PATH\430\plugins\simulation\PspPort1LED.psp.dll 3/12/201011:18:04AM,464384bytes CSPYPspWatchdogPluginDLL 2.0(2.0.0.0) $IAR_INSTALL_PATH\430\plugins\simulation\PspWatchdogPlugin.psp.dll 3/12/201011:16:56AM,452096bytes $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\Echo1.exe
MindTree Limited 7 April 2011 Page 200 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

12/1/20101:44:18PM,49152bytes $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\EchoFast.exe 12/1/20101:44:18PM,45056bytes $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\Test.exe 12/1/20101:44:18PM,45056bytes $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\HID\Example\Exe\HIDEcho1.exe 12/1/20101:44:16PM,53248bytes ===Installsubdirectory:arm=== $IAR_INSTALL_PATH\arm\bin\het470.exe 11/4/20102:00:32PM,212992bytes IARArchiveTool 9.7.1.24(9.7.1.24) $IAR_INSTALL_PATH\arm\bin\iarchive.exe 10/29/201012:09:14PM,1529856bytes IARAssemblerforARM 6.10.1.52143(6.10.1.52143) $IAR_INSTALL_PATH\arm\bin\iasmarm.exe 10/29/201012:09:10PM,2451456bytes IARC/C++CompilerforARM 6.10.1.52143(6.10.1.52143) $IAR_INSTALL_PATH\arm\bin\iccarm.exe 10/29/201012:09:18PM,25134080bytes IARELFDumperforARM 6.10.1.52143(6.10.1.52143) $IAR_INSTALL_PATH\arm\bin\ielfdumparm.exe 10/29/201012:09:12PM,2629632bytes IARELFTool 9.7.1.24(9.7.1.24) $IAR_INSTALL_PATH\arm\bin\ielftool.exe 10/29/201012:09:14PM,333312bytes IARELFLinkerforARM 6.10.1.52143(6.10.1.52143) $IAR_INSTALL_PATH\arm\bin\ilinkarm.exe 10/29/201012:09:20PM,4645376bytes IARObjectFileManipulator 9.7.1.24(9.7.1.24) $IAR_INSTALL_PATH\arm\bin\iobjmanip.exe 10/29/201012:09:16PM,1038336bytes IARAbsoluteSymbolExporter 9.7.1.24(9.7.1.24)
MindTree Limited 7 April 2011 Page 201 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\arm\bin\isymexport.exe 10/29/201012:09:16PM,965632bytes $IAR_INSTALL_PATH\arm\bin\jlink.exe 11/4/20102:24:26PM,143360bytes $IAR_INSTALL_PATH\arm\bin\JLinkSTM32.exe 11/4/20102:24:26PM,53248bytes $IAR_INSTALL_PATH\arm\bin\JLinkSTR91x.exe 11/4/20102:24:26PM,61440bytes $IAR_INSTALL_PATH\arm\bin\JLinkTCPIPServer.exe 11/4/20102:24:26PM,77824bytes IARCSPYAngelDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armangel.dll 11/3/201011:59:40AM,1724416bytes IARCSPYAngelDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armangel.ENU.dll 11/3/201011:51:08AM,160768bytes IARCSPYAngelDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armangel.JPN.dll 11/3/201011:51:06AM,127488bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armbat.dll 11/3/201011:50:14AM,515584bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armbat.ENU.dll 11/3/201011:50:04AM,92672bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armbat.JPN.dll 11/3/201011:50:02AM,72704bytes IARCSPYGDBServerDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armgdbserv.dll 11/3/201011:59:28AM,1667584bytes IARCSPYGDBServerDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armgdbserv.ENU.dll
MindTree Limited 7 April 2011 Page 202 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

11/3/201011:49:58AM,165888bytes IARCSPYGDBServerDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armgdbserv.JPN.dll 11/3/201011:49:56AM,131584bytes IARCSPYJLinkDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjlink.dll 11/3/201011:58:50AM,4087808bytes IARCSPYJLinkDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjlink.ENU.dll 11/3/201011:49:34AM,174592bytes IARCSPYJLinkDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjlink.JPN.dll 11/3/201011:49:30AM,143872bytes IARCSPYJTAGDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjtag.dll 11/3/201011:58:08AM,1597952bytes IARCSPYJTAGDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjtag.ENU.dll 11/3/201011:49:10AM,157696bytes IARCSPYJTAGDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armjtag.JPN.dll 11/3/201011:49:04AM,128000bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armLibSupport.dll 11/3/201011:48:48AM,612864bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armLibSupport.ENU.dll 11/3/201011:48:40AM,78848bytes IARCSPYLibrarySupportPlugInforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armLibSupport.JPN.dll 11/3/201011:48:38AM,58880bytes IARCSPYTIStellarisFTDIDriverforARM
MindTree Limited 7 April 2011 Page 203 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armlmiftdi.dll 11/3/201012:00:14PM,2524672bytes IARCSPYTIStellarisFTDIDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armlmiftdi.ENU.dll 11/3/201011:48:58AM,174080bytes IARCSPYTIStellarisFTDIDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armlmiftdi.JPN.dll 11/3/201011:48:54AM,139776bytes IARCSPYPEMicroDriverforARM 6,10,1,0(6.10.1.0) $IAR_INSTALL_PATH\arm\bin\armpemicro.dll 11/3/20109:00:54AM,892808bytes IARCSPYProcessorDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armproc.dll 11/3/201011:49:02AM,955392bytes IARCSPYProcessorDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armproc.ENU.dll 11/3/201011:48:36AM,71680bytes IARCSPYProcessorDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armproc.JPN.dll 11/3/201011:48:34AM,52736bytes IARCSPYRDIDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrdi.dll 11/3/201012:01:46PM,2252288bytes IARCSPYRDIDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrdi.ENU.dll 11/3/201011:48:34AM,154624bytes IARCSPYRDIDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrdi.JPN.dll 11/3/201011:48:30AM,124928bytes IARCSPYROMMonitorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrom.dll 11/3/201011:57:08AM,1600512bytes
MindTree Limited 7 April 2011 Page 204 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IARCSPYROMMonitorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrom.ENU.dll 11/3/201011:48:16AM,157696bytes IARCSPYROMMonitorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armrom.JPN.dll 11/3/201011:48:12AM,124416bytes IARCSPYSimulatorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armsim2.dll 11/3/201012:02:32PM,4782080bytes IARCSPYSimulatorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armsim2.ENU.dll 11/3/201011:47:42AM,145408bytes IARCSPYSimulatorDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armsim2.JPN.dll 11/3/201011:47:42AM,116224bytes IARCSPYSTLINKDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armstlink.dll 11/3/201011:48:04AM,876032bytes IARCSPYSTLINKDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armstlink.ENU.dll 11/3/201011:48:52AM,132608bytes IARCSPYSTLINKDriverforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\armstlink.JPN.dll 11/3/201011:51:12AM,108032bytes IARWorkbenchProjectfileconverterforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\cwtdarm.dll 11/3/201011:45:30AM,968192bytes IARWorkbenchProjectfileconverterforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\cwtdarmlib.dll 11/3/201011:45:30AM,582656bytes $IAR_INSTALL_PATH\arm\bin\FTCJTAG.dll 11/3/20109:01:36AM,81920bytes
MindTree Limited 7 April 2011 Page 205 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\arm\bin\ftd2xx.dll 11/3/20109:01:38AM,206144bytes FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\arm\bin\ftd2xx64.dll 11/3/20109:01:38AM,330056bytes SEGGERJLinkinterfaceDLL 4.20m(4.20.13.0) $IAR_INSTALL_PATH\arm\bin\jlinkarm.dll 11/4/20102:24:26PM,3231744bytes 2.0.2.0(2.0.2.0) $IAR_INSTALL_PATH\arm\bin\jtag_bb.dll 10/22/201012:57:18PM,60416bytes $IAR_INSTALL_PATH\arm\bin\jtag_raven.dll 10/22/201012:57:44PM,13824bytes 2.0.0.2(2.0.0.2) $IAR_INSTALL_PATH\arm\bin\jtag_usb.dll 10/22/201012:57:18PM,435712bytes JTAG_USB2 2,0,0,8(2.0.0.8) $IAR_INSTALL_PATH\arm\bin\JTAG_USB2.dll 10/22/201012:57:44PM,172032bytes 2.0.0.3(2.0.0.3) $IAR_INSTALL_PATH\arm\bin\jtag_wig.dll 10/22/201012:57:18PM,98816bytes mac_conn.dll 2.0.0.0(2.0.0.0) $IAR_INSTALL_PATH\arm\bin\mac_con.dll 10/22/201012:57:18PM,40960bytes mac_enet.dll 2.0.0.0(2.0.0.0) $IAR_INSTALL_PATH\arm\bin\mac_enet.dll 10/22/201012:57:18PM,49152bytes 2.0.0.2(2.0.0.2) $IAR_INSTALL_PATH\arm\bin\mac_lpt.dll 10/22/201012:57:18PM,426496bytes OkiUsbDLL 1,1,1,0(1.1.1.0) $IAR_INSTALL_PATH\arm\bin\OkiUsb.dll
MindTree Limited 7 April 2011 Page 206 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

10/28/201010:08:02PM,28672bytes 4.0.1.2(4.0.1.2) $IAR_INSTALL_PATH\arm\bin\STLinkIIIUSBDriver.dll 12/1/20093:20:06PM,389632bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm.dll 11/3/201011:47:04AM,1146368bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm.ENU.dll 11/3/201011:46:30AM,110080bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm.JPN.dll 11/3/201011:46:28AM,101888bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.dll 11/3/201011:46:40AM,576000bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.ENU.dll 11/3/201011:46:28AM,8704bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.JPN.dll 11/3/201011:46:26AM,7168bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.dll 11/3/201011:46:38AM,562176bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.ENU.dll 11/3/201011:46:26AM,8704bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.JPN.dll 11/3/201011:46:24AM,7168bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170)
MindTree Limited 7 April 2011 Page 207 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom.dll 11/3/201011:46:36AM,445440bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom.ENU.dll 11/3/201011:46:24AM,8704bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom.JPN.dll 11/3/201011:46:22AM,6656bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.dll 11/3/201011:46:26AM,595968bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.ENU.dll 11/3/201011:46:10AM,10752bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.JPN.dll 11/3/201011:46:10AM,9216bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.dll 11/3/201011:46:06AM,567808bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.ENU.dll 11/3/201011:45:50AM,8192bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.JPN.dll 11/3/201011:45:50AM,6656bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.dll 11/3/201011:46:06AM,587776bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.ENU.dll 11/3/201011:45:48AM,9728bytes
MindTree Limited 7 April 2011 Page 208 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.JPN.dll 11/3/201011:45:48AM,8192bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.dll 11/3/201011:46:24AM,576512bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.ENU.dll 11/3/201011:46:38AM,8704bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.JPN.dll 11/3/201011:46:08AM,7168bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi.dll 11/3/201011:46:22AM,437248bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi.ENU.dll 11/3/201011:46:20AM,9216bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi.JPN.dll 11/3/201011:46:06AM,7168bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.dll 11/3/201011:46:04AM,433664bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.ENU.dll 11/3/201011:45:48AM,8192bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.JPN.dll 11/3/201011:45:48AM,6656bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.dll
MindTree Limited 7 April 2011 Page 209 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

11/3/201011:46:06AM,432128bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.ENU.dll 11/3/201011:45:48AM,8192bytes IARWorkbenchTargetDescriptorforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.JPN.dll 11/3/201011:46:08AM,6656bytes template.dll 3.0.3.8(3.0.3.8) $IAR_INSTALL_PATH\arm\bin\template.dll 10/22/201012:57:18PM,2179072bytes 1.34.0.6(1.34.0.6) $IAR_INSTALL_PATH\arm\bin\unit_ngs_arm.dll 11/3/20109:00:54AM,1233800bytes 2.0.0.5(2.0.0.5) $IAR_INSTALL_PATH\arm\bin\wigglers.dll 10/22/201012:57:44PM,123904bytes 1.1.0.2(1.1.0.2) $IAR_INSTALL_PATH\arm\bin\pemicro\icdarmcortex_dll_v101.dll 11/3/20109:00:52AM,2487688bytes 2.1.0.5(2.1.0.5) $IAR_INSTALL_PATH\arm\bin\pemicro\pemicro_serialcm2.dll 11/3/20109:00:54AM,661504bytes OSBDMDynamicLinkLibrary 1,0,26,0(1.0.26.0) $IAR_INSTALL_PATH\arm\bin\pemicro\peosbdmv1.dll 11/3/20109:00:54AM,105472bytes $IAR_INSTALL_PATH\arm\drivers\Jlink\InstDrivers.exe 11/4/20102:24:28PM,51816bytes DriverPackageInstaller 2.01(2.0.1.0) $IAR_INSTALL_PATH\arm\drivers\Jlink\x64\DPInst.exe 11/4/20102:24:26PM,845736bytes DriverPackageInstaller 2.01(2.0.1.0) $IAR_INSTALL_PATH\arm\drivers\Jlink\x86\DPInst.exe 11/4/20102:24:28PM,521128bytes SetupLauncher 2.58.0000(16.0.0.435)
MindTree Limited 7 April 2011 Page 210 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\arm\drivers\Macraigor\ocd_cmdr.exe 10/22/201012:57:46PM,8751216bytes SetupLauncher 3.0(16.0.0.400) $IAR_INSTALL_PATH\arm\drivers\pemicro\drivers_osjtag_multilink_cyclone_install.exe 11/3/20109:00:56AM,5531408bytes FTD2XXlibrary 3.01.08(3.1.8.1) $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\ftd2xx.dll 11/3/20109:01:38AM,176128bytes FTLang 1,0,0,1(1.0.0.1) $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\FTLang.dll 11/3/20109:01:38AM,102400bytes FTDIPortsClassInstaller 2.00.00.1(2.0.0.1) $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\ftserui2.dll 11/3/20109:01:38AM,33360bytes FTDIUSBSerialConverterPropertyPageProvider 1.2.0.1(1.2.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftbusui.dll 11/3/20109:01:38AM,143688bytes FT2232VCPCoInstaller 2.00.00.1(2.0.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftcserco.dll 11/3/20109:01:38AM,51528bytes FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftd2xx64.dll 11/3/20109:01:38AM,330056bytes FTDIMultiLingualPropertyPageTextLibrary 1,4,0,1(1.4.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftlang.dll 11/3/20109:01:38AM,284992bytes FTDIVirtualCOMPortPropertyPageProvider 2.06.00.1builtby:WinDDK(2.6.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftserui2.dll 11/3/20109:01:38AM,55112bytes FTDIUSBSerialConverterPropertyPageProvider 1.2.0.1(1.2.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftbusui.dll 11/3/20109:01:38AM,120136bytes
MindTree Limited 7 April 2011 Page 211 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

FT2232VCPCoInstaller 2.00.00.1(2.0.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftcserco.dll 11/3/20109:01:36AM,54088bytes FTD2XXlibrary 3.01.19(3.1.19.0) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftd2xx.dll 11/3/20109:01:38AM,206144bytes FTDIMultiLingualPropertyPageTextLibrary 1,4,0,1(1.4.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftlang.dll 11/3/20109:01:38AM,197952bytes FTDIVirtualCOMPortPropertyPageProvider 2.06.00.1builtby:WinDDK(2.6.0.1) $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftserui2.dll 11/3/20109:01:38AM,52552bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.dll 11/3/201011:52:44AM,557056bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.ENU.dll 11/3/201011:51:58AM,11776bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.JPN.dll 11/3/201011:51:56AM,10240bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin.dll 11/3/201011:53:00AM,553984bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.dll 11/3/201011:52:14AM,11776bytes IARCSPYRTOS/CMXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin.JPN.dll 11/3/201011:52:12AM,10240bytes SEGGERembOSIARPlugin 6,0,6,0(6.0.6.0) $IAR_INSTALL_PATH\arm\plugins\rtos\embOS\embOSPlugin.dll
MindTree Limited 7 April 2011 Page 212 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

11/4/20102:23:26PM,572416bytes CSPY6.xMQXRTOSPluginDLL 4.4.1(4.4.1.0) $IAR_INSTALL_PATH\arm\plugins\rtos\MQX\MQXRtosPluginARM.dll 11/2/201011:28:02AM,1340928bytes OpenRTOSPluginDLL 2,0,0,0(2.0.0.0) $IAR_INSTALL_PATH\arm\plugins\rtos\OpenRTOS\OpenRTOSPlugin.dll 11/4/20101:34:06PM,630272bytes PowerPacRTOSPlugin 6,0,6,0(6.0.6.0) $IAR_INSTALL_PATH\arm\plugins\rtos\PowerPac\PowerPacRTOSPlugin.dll 11/2/20109:40:42PM,594944bytes RTXC_K3_PluginDLL 1,0,0,154(1.0.0.154) $IAR_INSTALL_PATH\arm\plugins\rtos\Quadros\Quadros_EWB6_Plugin.dll 10/22/201012:36:06PM,786432bytes SafeRTOSPluginDLL 2,0,0,0(2.0.0.0) $IAR_INSTALL_PATH\arm\plugins\rtos\SafeRTOS\SafeRTOSPlugin.dll 11/4/20101:34:06PM,640000bytes IARCSPYRTOS/THREADXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.dll 11/3/201011:52:10AM,619008bytes IARCSPYRTOS/THREADXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.dll 11/3/201011:51:16AM,12288bytes IARCSPYRTOS/THREADXPluginforARM 6.10.1.52170(6.10.1.52170) $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.JPN.dll 11/3/201011:51:14AM,10752bytes C/OSII<=2.86KAPluginforCSPYDLL 2.5.0(2.5.0.0) $IAR_INSTALL_PATH\arm\plugins\rtos\uCOSII\uCOSII286KACSpy.dll 11/3/20108:25:58PM,659456bytes C/OSII>=2.87KAPluginforCSPYDLL 2.5.1(2.5.1.0) $IAR_INSTALL_PATH\arm\plugins\rtos\uCOSII\uCOSIIKACSpy.dll 11/3/20108:25:58PM,664576bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91CAP9\Setup\IP_FS\FS_RO\Tool\Bin2C.exe
MindTree Limited 7 April 2011 Page 213 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91RM9200\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM7X128\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM7X256\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9260\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9261\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9263\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9G20\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9G45\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91SAM9XE\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Freescale\i.MX27\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Freescale\KSKi.MX25\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC1768_IAR\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC2368\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC2378_IAR\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC2378_KEIL\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC2468\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC2478\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes
MindTree Limited 7 April 2011 Page 214 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\NXP\LPC3250\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\ST\STM32F107_MB784\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\ST\STM32F107_STM32F107VC SK_IAR\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\ST\STR912\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\TexasInstruments\LM3S6965\Setup\IP_FS\FS_RO\Tool\Bin2C.ex e 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\TexasInstruments\LM3S9B90\Setup\IP_FS\FS_RO\Tool\Bin2C.ex e 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\TOSHIBA\TMPA910\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\TOSHIBA\TMPA910SK\Setup\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20106:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\GUI\Windows\BmpCvt.exe 10/27/20107:15:00PM,108544bytes $IAR_INSTALL_PATH\arm\PowerPac\GUI\Windows\FontCvtDemo.exe 10/27/20107:15:00PM,228864bytes $IAR_INSTALL_PATH\arm\PowerPac\GUI\Windows\PowerPacGUI_Simulator\Tool\BmpCvtDemo.exe 10/27/20107:15:00PM,110080bytes $IAR_INSTALL_PATH\arm\PowerPac\GUI\Windows\PowerPacGUI_Simulator\Tool\FontCvtDemo.exe 10/27/20107:15:00PM,230912bytes $IAR_INSTALL_PATH\arm\PowerPac\GUI\Windows\PowerPacGUI_Simulator\Tool\Viewer.exe 10/27/20107:15:00PM,38912bytes $IAR_INSTALL_PATH\arm\PowerPac\TCPIP\Application\Webserver\IP_FS\FS_RO\Tool\Bin2C.exe 10/27/20107:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\TCPIP\Example\FileSystem\FS_RO\Tool\Bin2C.exe 10/27/20107:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\TCPIP\Windows\SpeedTestServer\main.exe 10/27/20107:15:00PM,40960bytes $IAR_INSTALL_PATH\arm\PowerPac\TCPIP\Windows\UDPDiscover\UDPDiscover.exe 10/27/20107:15:00PM,40960bytes
MindTree Limited 7 April 2011 Page 215 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Echo1.exe 10/27/20107:15:00PM,49152bytes $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\EchoFast.exe 10/27/20107:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Performance.exe 10/27/20107:15:00PM,49152bytes $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Test.exe 10/27/20107:15:00PM,45056bytes $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\HID\SampleApp\Exe\HIDEcho1.exe 10/27/20107:15:00PM,53248bytes $IAR_INSTALL_PATH\arm\RTOS\SEGGER\Util\embOSView.exe 11/4/20102:24:18PM,147456bytes ===Installsubdirectory:common=== IARCSpyBat 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\CSpyBat.exe 11/23/20105:06:30AM,735232bytes IARBuildUtility 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarBuild.exe 11/23/20105:08:22AM,97280bytes IAREmbeddedWorkbenchIDE 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarIdePm.exe 11/23/20105:07:30AM,504320bytes IARCSpyBatLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\CSpyBat.ENU.dll 11/23/20105:04:30AM,5632bytes IARCSpyBatLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\CSpyBat.JPN.dll 11/23/20105:04:34AM,4096bytes IARCSPYDebuggerGUI 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\DebuggerGui.dll 11/23/20105:08:30AM,1877504bytes IARCSPYDebuggerGUILanguageSpecificResources 6.1.2.1748(6.1.2.1748)
MindTree Limited 7 April 2011 Page 216 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

$IAR_INSTALL_PATH\common\bin\DebuggerGui.ENU.dll 11/23/20105:07:46AM,65536bytes IARCSPYDebuggerGUILanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\DebuggerGui.JPN.dll 11/23/20105:07:44AM,56832bytes IARFindInFiles 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\FindInFiles.dll 11/23/20105:07:24AM,302080bytes IARFindInFilesLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\FindInFiles.ENU.dll 11/23/20105:05:56AM,4608bytes IARFindInFilesLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\FindInFiles.JPN.dll 11/23/20105:05:50AM,4096bytes IARBuildUtilityLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarBuild.ENU.dll 11/23/20105:05:46AM,3072bytes IARBuildUtilityLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarBuild.JPN.dll 11/23/20105:05:46AM,3072bytes IAREmbeddedWorkbenchIDELanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarIdePm.ENU.dll 11/23/20105:05:46AM,472064bytes IAREmbeddedWorkbenchIDELanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IarIdePm.JPN.dll 11/23/20105:05:46AM,467456bytes IARIDEFramework 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IdeFramework.dll 11/23/20105:05:48AM,1022976bytes IARIDEFrameworkLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IdeFramework.ENU.dll 11/23/20105:05:38AM,4608bytes
MindTree Limited 7 April 2011 Page 217 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IARIDEFrameworkLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\IdeFramework.JPN.dll 11/23/20105:05:38AM,3584bytes IARCSPYDebuggerKernel 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\kernel.dll 11/23/20105:08:52AM,2305024bytes IARCSPYDebuggerKernelLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\kernel.ENU.dll 11/23/20105:08:00AM,14336bytes IARCSPYDebuggerKernelLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\kernel.JPN.dll 11/23/20105:08:00AM,10240bytes IARLogWindow 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\LogWindow.dll 11/23/20105:06:42AM,254464bytes IARLogWindowLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\LogWindow.ENU.dll 11/23/20105:05:04AM,9728bytes IARLogWindowLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\LogWindow.JPN.dll 11/23/20105:05:04AM,9728bytes IARProjectManagerEngine 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.dll 11/23/20105:08:00AM,1216512bytes IARProjectManagerEngineLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.ENU.dll 11/23/20105:04:50AM,13312bytes IARProjectManagerEngineLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.JPN.dll 11/23/20105:04:48AM,9216bytes IARProjectManagerGui 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerGui.dll
MindTree Limited 7 April 2011 Page 218 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

11/27/201012:10:06AM,807424bytes IARProjectManagerGuiLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerGui.ENU.dll 11/23/20105:04:44AM,156672bytes IARProjectManagerGuiLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\ProjectManagerGui.JPN.dll 11/23/20105:04:40AM,147968bytes IARTextEditor 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\TextEditor.dll 11/23/20105:07:56AM,745984bytes IARTextEditorLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\TextEditor.ENU.dll 11/23/20105:04:28AM,25600bytes IARTextEditorLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\TextEditor.JPN.dll 11/23/20105:05:48AM,23552bytes SharedLibraryforXercesCVersion1.5.1 1,5,1(1.5.1.0) $IAR_INSTALL_PATH\common\bin\xercesc_1_5_1.dll 11/1/20108:16:26PM,1197056bytes IARXmlLib 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\bin\XmlLib.dll 11/23/20105:04:06AM,87040bytes IARCodeCoveragePlugin 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage.dll 11/23/20105:08:26AM,451584bytes IARCodeCoveragePluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage.ENU.dll 11/23/20105:08:22AM,10752bytes IARCodeCoveragePluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage.JPN.dll 11/23/20105:08:12AM,10240bytes IARORTIRTOSPlugin
MindTree Limited 7 April 2011 Page 219 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Orti\Orti.dll 11/23/20105:07:00AM,563200bytes IARORTIRTOSPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Orti\Orti.ENU.dll 11/23/20105:05:02AM,8704bytes IARORTIRTOSPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Orti\Orti.JPN.dll 11/23/20105:05:02AM,7680bytes IARStackPlugin 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Stack\Stack.dll 11/23/20105:06:08AM,486400bytes IARStackPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Stack\Stack.ENU.dll 11/23/20105:04:24AM,7168bytes IARStackPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\Stack\Stack.JPN.dll 11/23/20105:04:52AM,6144bytes IARSymbolsPlugin 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\SymList\SymList.dll 11/23/20105:06:16AM,431616bytes IARSymbolsPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\SymList\SymList.ENU.dll 11/23/20105:05:00AM,3072bytes IARSymbolsPluginLanguageSpecificResources 6.1.2.1748(6.1.2.1748) $IAR_INSTALL_PATH\common\plugins\SymList\SymList.JPN.dll 11/23/20105:05:00AM,2560bytes

MindTree Limited

7 April 2011

Page 220 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Frequently asked Questions


1. Can the JFET be used as a power source for MSP-EXP430F5438+PAN1315ETU? No. The FET cannot power-up the MSP-EXP430F5438+PAN1315ETU Bluetooth solution. Only USB or battery modes will need to be used. 2. Why does the MSP-EXP430F5438 reset after few minutes of use? Check if the package is being run in evaluation mode. This can be done using the INFO MENU screen. Check if the DEV TYPE value has either F5438 or "F5438A" against it. This indicates that the package is being run in evaluation mode. When MSP430BT5190 is mounted, then you should not expect this limitation. 3. The package does not behave as expected when it is built with IAR C/C++ Optimization level set to High Speed Disabling the code motion transformation fixes this issue. 4. Compiling with Data Model setting at Small or Medium does not work The library has been built with the Data Model setting at Large. IAR does not permit mixing of data models and hence the application will need to be built with the Data Model value set to Large. 5. What is the version of the EtherMind stack used for the MSP430 SPP accelerometer, temperature and evaluation packages? The version of the EtherMind stack used is 8.0.31 6. What is the version of the EtherMind SDK? The version is specified using the #define SDK_SW_VERSION in the file $BT_SDK_DIR/export/common_appl/sdk_common.h 7. Im unable to build the package due to path length related issues. What could be wrong? Windows has a max path length limit and does not accept paths that are too long. Move the project higher in your directory structure towards the C:\ directory and the project should compile without error. 8. Can I build my application with the different IAR version, other than the one mentioned in the appendix section? It is not recommended to use the other IAR version than the one that is specified in appendix section. 9. What is the work around for MSP430 Flash Read Error Susceptibility described in detail as part of TI PCN# 20100910003? Detailed information about this error is provided as part of the following documents http://focus.ti.com/lit/er/slaz071a/slaz071a.pdfhttp://focus.ti.com/lit/an/slaa470/slaa470.pdf
MindTree Limited 7 April 2011 Page 221 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

To avoid this error, the following steps have been done: a. No empty while(1) loops exist in either the library or the application b. All ISR related code should be moved to a location greater than 0x8000. To achieve this, the IAR linker map file should be customized. The default location of the linker file is $IAR_INSTALL_PATH\430\config\lnk430F5438A.xcl. -Z(CODE)CSTART,ISR_CODE=5C00-FF7F has to be replaced by -Z(CODE)CSTART,ISR_CODE=8000-FF7F c. The flash banks 1 & 3 are unaffected on the MSP430F5438A. If required, the linker file can be customized to place code only in these banks. 10. Can I debug the code using printf statements? Yes, printf statements can be added for the debugging purpose and output is visible in the Terminal IO window (View Terminal IO) 11. What is the version of the TI init script used for initialization? The init script is based on version 2.38 and it embeds the LPS and EHCILL commands.

MindTree Limited

7 April 2011

Page 222 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Abbreviations
Abbreviation
API BD_ADDR HCI L2CAP SDDB SDK SDP SM SPP UART USB

Reference
Application Programmers Interface Bluetooth Device Address Host Controller Interface Logical Link Control and Adaptation Protocol SDP Database Software Development Kit Service Discovery Protocol Security Manager Serial Port Profile Universal Asynchronous Receiver Transmitter Universal Serial Bus

References
Sl. No.
1 2

Reference

EtherMind Stack API Documents, Part I & II. EtherMind SPP API Document

MindTree Limited

7 April 2011

Page 223 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Contact: Bluetooth@mindtree.com www.mindtree.com


United States MindTree Limited Suite #105 #2855 Kifer Road, Santa Clara CA 95051. USA. Tel: +1 408 986 1000 Fax: +1 408 986 0005 Japan Yurakucho Building 11th Floor 1-10-1, Yurakucho, ChiyodaKu Tokyo, Japan 100-0006 Tel: +81 (3) 5219 2094 Fax: +81 (3) 5219 2021 United Kingdom Regus House Windmill Hill Business Park Whitehill Way Swindon Wiltshire SN5 6QR UK. Tel: +44 (0) 1793 441418 Fax: +44 (0) 1793 441618 Singapore Suite #12 Level 15, Prudential Tower 30 Cecil Street Singapore 049712. Tel: +65 232 2751, 52, 53 Fax: +65 232 2888 India #42 27th Cross Banashankari II Stage Bangalore - 560 070 Karnataka. India. Tel: +91 80 671 1777 Fax: +91 80 671 4000

Information disclosed in this document is preliminary in nature and subject to change. MindTree Limited reserves the right to make changes to its products without notice, and advises customers to verify that the information being relied on is current. 2010 MindTree Limited The MindTree logo design is a trademark of MindTree Limited. Bluetooth is a trademark owned by Bluetooth SIG, Inc. and licensed to MindTree Ltd. All other products, services, and company names are trademarks, registered trademarks or service marks of their respective owners.

MindTree Limited

7 April 2011

Page 224 of 224

MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

Você também pode gostar