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

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

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

................................................................................................................. 150  Explanation of the Simple Application .................................................................................................................................... 163  Sleep to Awake state (Wake up from peer) .......................................................................  Awake to Sleep state ........................................................................................................................... 127  Porting Security Manager Persistent Storage ......................................................................................................................... 144  Explanation of the Sample Temperature Application .... 157  Flow Diagram for SPP Disconnection ................................................................................................................................ 125  SM UI Notification Callback Event Identifiers .................................................... 160  Flow Diagram for sending SPP Data .......................................................................................................... 165  Support for CC256x Power Circuitry ....................................... 139  MSP430 resources used by the Sample SPP applications ..................... 124  BT_sm_user_conf_request_reply .......................................................................... 125  SM User Interface Notification Callback ....................................................................................................... 150  (Common for both MSP-EXP430F5438+PAN1315EMK and EZ430-RF2560) ... 166  MindTree Limited 7 April 2011 Page 7 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide ........................................ 155  Flow Diagram for Establishing SPP connection .......................................................... 135  How do I change the SPP Server Channel? .................. 164  Macros for debugging .................................................................... 128  Updating SDP Database .................... 162  1................................................................................................................................................................................................................................................................ 125  Security Manager Callbacks ...............................................  2. 161  Flow diagrams for eHCILL related data handling .................................................. CC2564 and CC2567 devices .... 144  Mandatory Resources ...................................................... 165  Support for CC2560............................. 162  Sleep to Awake state (Wake-up from host)..................................... 138  How do I change the ‘ServiceName’ attribute of SPP record? ..........BT_sm_get_device_link_key ..................................... 144  Explanation of the Sample Accelerometer Application ........................................................ 138  How do I add a new custom UUID in the existing record? ......................  3......... 123  BT_sm_link_key_request_reply .......................... 144  Optional Resources ................... CC256x.....................................................................................................................

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

Minimum information on accessing the vendor specific API commands. Installation procedure and how to use EtherMind Bluetooth SDK. API interfaces.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. Tasks etc. Interrupts. CPU utilization and Code & Data sizes MindTree Limited 7 April 2011 Page 9 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Explanation of sample application to send data over SPP Performance analysis data related to related to Bluetooth initialization time.) Procedure to integrate the Bluetooth stack with the end user application.

25. power level related information.Revision History Owner contact: ethermind_support@mindtree. SDK configuration table. code and data size calculations. Updated based on additional feedback from TI.0. measurements and data throughput measurements LPM Change Description Date 11th March 2010 20th March 2010 21st April 2010 4 Added flow diagrams.0 Added changes related to sdk_bluetooth_common_config. 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. changed version info to RC4. Changes related to security manager. Diagram showing connection between MSP430 and PAN1315ETU.1. initialization times. Directory structure and section related to Security Manager Added documentation related to EZ430. Updated code and data size measurements according to RC3. write and user tasks.h Updated Version Info to RC3. BT initialization times.h. initialization time. throughput measurements.24 release. Changes related to renaming sdk_config. LPM measurements. Added controller version 7 April 2011 Page 10 of 224 16th July 2010 9 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 .22 release. Added section on updating SDP database. FAQ section. Additional information added based on changes in GUI Updates to description of software architecture. Refer to Issue id 30 for list of modifications Updates to throughput calculations.h to sdk_bluetooth_config. Version Info changed to RC4. aligned documentation for sdk config parameters with source code. Updated code and data sizes for temperature application.com Version 1 2 3 Initial Version Changes based on Feedback from TI. Added section on changing baud rate. 8 Updated the section “Considerations to be taken while customizing the application”  Updated code and data size measurements. Added flow diagrams related to eHCILL Updated code and data size measurements according to RC3. updated directory structure. code and data size. Added more information on read.

Removed hyperlinks and added explicit section names.info PG_3. Added info related to simple application. Added Connection Flow Charts.16 18th Mar 2011 MindTree Limited 7 April 2011 Page 11 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .10. Updated BT init sequence section. 15 Updated documentation as per Release 5. Added sdk functions.

MSP-EXP430F5438+PAN1315EMK The picture below shows the MSP-EXP430F5438 plugged in with the PAN1315ETU Bluetooth connectivity board. The SDK is available for TI MSP430BT5190 processor. and also instructions for running the included reference applications. MindTree Limited 7 April 2011 Page 12 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . For simplicity and documentation purpose. 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. and implement applications using it. This document provides step-by-step procedures for installation of EtherMind Bluetooth SDK. the BT_SDK_DIR will be used to denote the directory where released EtherMind Bluetooth SDK components are unzipped.Introduction The EtherMind Bluetooth SDK provides a platform for end system designers to quickly evaluate EtherMind Bluetooth Software Protocol Stack and Profiles. All directory paths in this document are relative to BT_SDK_DIR.

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 .

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.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. 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 .

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

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. MindTree Limited 7 April 2011 Page 18 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . the following pins of RF3 needs to be shorted as shown below. To use the PAN1315ETU with MSP-EXP430F5438.

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 .

SDP. 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. 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. HAL. T know the IAR Version Information. Boot code MindTree Limited 7 April 2011 Page 20 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . GAP and L2CAP layers are implemented as part of the EtherMind Bluetooth stack. The SPP. RFCOMM.Software The following software is required for installation of EtherMind Bluetooth SDK:  IAR Embedded Workbench for MSP430.

Based on the availability of uart tx circular buffer space. 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. When the data is ready for the transmission. The task priorities in the order of highest to lowest are read task. the packet is fragmented and first chunk of data is copied to the uart tx circular buffer.org. 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. data is copied from uart circular buffer to the read task buffer and xReadSemaphore is released. The MSP-EXP430F5438+PAN1315EMKprovides three software packages: 1. On completing the data transmission first chunk of data of uart tx circular buffer. xReadSemaphore is acquired and packet is sent to HCI transport layer for further processing. User task implemented as part of the application and the default idle task created by the FreeRTOS. The temperature application has four tasks – Read & Write tasks implemented by the EtherMind Bluetooth SDK.2 is used in EtherMind Bluetooth SDK. A circular buffer is used to store the data received from UART Rx ISR.0. After the reception of complete packet. The TIMER1_A0_ISR and the PORT2_VECTOR_ISR generate the events and write them to the circular buffer.freertos. At the end of transmission of complete packet. FreeRTOS v6. write task. Write Task – This is responsible to en-queue the data received from application or higher layers to uart tx circular buffer. MindTree Limited 7 April 2011 Page 21 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . xWritePlSemaphore will be in the released state. The user task reads the events from the circular buffer and handles them appropriately. As part of ReadTask. xWritePlSemaphore is the semaphore used for synchronization between UART Tx ISR and Write Task. xWritePlSemaphore is released for the next chunk of data. 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. Temperature package 3. Accelerometer package 2. xWritePlSemaphore is acquired by Write Task. The source files for FreeRTOS can be obtained from http://www.Software tasks The MSP430BT5190+CC2560 software solution uses FreeRTOS as the underlying OS. user task and finally the idle task. User Task – Used to handle the events generated by switch buttons and Timer1_A3 of MSP430BT5190. 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.

defined in the file sdk_pl.\ }\ bytes_to_be_processed_in_user_buf++.\ } MindTree Limited 7 April 2011 Page 22 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .c as follows: /* Circular buffer used to handle Timer and Port 2 vectors */ UCHAR circular_user_buffer[MAX_USER_BUF]. 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++. The size of the buffer is currently set to 20 in in appl_sdk.\ if (circular_user_buf_wt == MAX_USER_BUF) {\ circular_user_buf_wt = 0.TIMER1_A0_ISR PORT2_VECTOR_ISR User Task The circular buffer is defined in the file user_task. /* Write pointer in the user buffer.h(as shown below). This gets incremented in the Timer ISR and * Switch ISR */ INT16 circular_user_buf_wt = 0.h #define MAX_USER_BUF 20 The macro UPDATE_USER_BUFFER. This gets incremented in the user task handler */ static INT16 circular_user_buf_rd = 0. /* Read pointer in user buffer.

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. and the PORT2_VECTOR_ISR handles key presses.The TIMER1_A0_ISR. LCD contrast adjustment.c or BT_SDK_DIR \bluetooth\private\platforms\spp\accl_ar ch\msp430\user_task. The user_task_routine. joystick actions. inserts the information into the circular buffer. RSSI and Tx Power levels. However. debouncing and LPM switching modes information. c 0 256 * The greater the number higher the task priority ** xReadSemaphore is created as part of the library. *** 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 .c IdleTask*** vApplicationIdleHook() BT SDK DIR \bluetooth\export\temp_appl\appl_spp.c .c or BT_SDK_DIR \bluetooth\export\simple_appl\appl_spp. This should not be modified by the user. in user_task. it is visible as part of the UART ISR. such as the temperature display data.c or BT_SDK_DIR \bluetooth\export\accl_appl\appl_spp.

the read task is moved back to the blocked state. SW2 and Joystick) MindTree Limited 7 April 2011 Page 24 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . After processing the received data. Semaphores are used to synchronize the activities between the tasks and ISRs. After processing these events. TIMER1_A0_ISR in BT_SDK_DIR \bluetooth\private\p latforms\spp\temp_ arch\msp430\user_t ask. Read semaphore moves the read task to ready state on receiving expected bytes of data from the UART. Few other semaphores are used internally as part of the Bluetooth core library but are not exposed to the end user.c TIMER1_A0_ISR in BT_SDK_DIR \bluetooth\private\p latforms\spp\temp_ arch\msp430\user_t ask. User semaphore moves the user task to ready state on generating the events from switch buttons or Timer1_A3.c and PORT2_VECTOR_ISR in BT_SDK_DIR \bluetooth\export\te mp_appl\appl_menu _pl. 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 When any event are generated either from Timer1_A3 or switches buttons (SW1.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.Semaphores Tasks are created in a blocked state. the user task is moved to blocked state.

c MindTree Limited 7 April 2011 Page 25 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .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. TIMER1_A0_ISR in BT_SDK_DIR \ bluetooth\export\ac cl_appl\user_task.c TIMER1_A0_ISR and PORT2_VECTOR_ISR in BT_SDK_DIR \ bluetooth\export\ac cl_appl \user_task. SW2 and Joystick) xUserSemaphore After processing the events generated from Timer1_A3 and switch buttons.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.

The read task then processes the bytes received and then moves the xReadSemaphore back to the blocked state. This semaphore is unblocked once the required number of bytes is obtained on the UART. this can also be totally eliminated and this functionality may be incorporated as part of the idle task. Read task Read task is initially in the blocked state using the xReadSemaphore.Flow Diagrams The read and write tasks are required for the Bluetooth application to work correctly. Write task implementation is done completely inside the Bluetooth library. the user task is application dependent. To reduce memory. 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 . The read task and user task flow diagrams are explained below. The user task is not required for the end application and can be completely removed by the user. However.

it moves the xUserSemaphore back to the blocked state. This semaphore is unblocked by either the Timer ISR or the Port2 ISR when a switch operation is performed.User task User task is initially in the blocked state using the xUserSemaphore. 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 . Once the user task processes the information produced by either of the ISRs.

using other ISRs etc. For example.h. 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. This sample implementation can be obtained by referring to examples on the FreeRTOS. (unsigned portLONG *)NULL. if required. 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. This may involve creating additional tasks. FreeRTOS uses an additional 10 bytes to store information about it. 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. the configuration of the task stack size needs to be specified as 128. a new task can be created using the FreeRTOS API as follows: xTaskCreate((pdTASK_CODE) user_task_handler. if the stack size of a task needs to be 256 bytes. (unsigned portBASE_TYPE)USER_TASK_PRIORITY.h will need to be modified to add the name. the tick timer may be added to the application. used in the system. Accordingly. a new binary semaphore can be created using the FreeRTOS API as follows: vSemaphoreCreateBinary(xUserSemaphore). the configTOTAL_HEAP_SIZE will need to be increased by 256 + 64 + 10 + 1 = 331 Bytes. There also may be an extra byte needed to factor in alignment issue. The details of the new task to be created need to be entered in the file BT_task.Considerations to be taken while customizing the application Users may want to customize the application according to their needs. In addition for every data structure that gets created.org website. Some considerations to be used while doing so are given below: Creating additional tasks New tasks can be created by calling the FreeRTOS APIs. FreeRTOS uses a TCB of 64 bytes. semaphores etc. For example. MindTree Limited 7 April 2011 Page 28 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .h needs to be increased accordingly based on the number of new tasks that are added. USER_TASK_STACK_SIZE. This means that for new task that gets created with a stack size specified as 256 bytes. (xTaskHandle *) NULL). The unit of stack size is defined as 16-bits for MSP430F5438A in the file FreeRTOSConfig. So. On creation of a new task. This file BT_task. semaphores. Creating additional semaphores New semaphores can be created by calling the FreeRTOS APIs. a data structure containing information about the task is created. stack size and priority of the new task. the configTOTAL_HEAP_SIZE definition has to be increased accordingly based on the type and number of semaphores that need to be added.h. However. This is referred to as the TCB. (const signed portCHAR *)”USER_TASK”. FreeRTOS requires that the stack size be specified in terms of units of the stack size.

As part of the FreeRTOS modifications. in the file BT_SDK_DIR/bluetooth/export/common_appl/sdk_common. the configTOTAL_HEAP_SIZE will need to be increased by 58 + 10 + 1 = 69 Bytes. Write. Additional ISRs also mean that the read and write tasks can get interrupted by more sources. In addition for every data structure that gets created. if interrupts are being nested. This is re-enabled back in the idle task. 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. Handling ISRs The user application may have additional interrupts that may need to be handled. If the priority of the application tasks are increased over the Bluetooth Read and Write tasks. care is taken to ensure that RTS is disabled as part of every context switch to ensure that the UART does not overflow. Parameters: MindTree Limited 7 April 2011 Page 29 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . FreeRTOS uses an additional 10 bytes to store information about it. If a new ISR needs to be added. 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. the user will need to ensure that the Bluetooth UART does not overflow. care needs to be taken to maintain the relative priority of the Bluetooth Read and Write tasks with respect to the other tasks. RTS is disabled as part of the ISRs. 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. User and Idle. While handling these ISRs. using a similar logic can ensure that the UART does not overflow. The current design does not prevent the application tasks to have a higher priority over the Bluetooth Read and Write tasks. This means that for new binary semaphore that gets created. However. Controlling RTS correctly in the interrupts is vital to ensure that the UART does not overflow.c. which is a common file for all applications. As part of the temperature application. In these cases. There may be an extra byte needed to factor in alignment issue. The Bluetooth related Read and Write tasks have been given more priority as compared to the User task in the example application. In such a scenario. The MSP430F5438 does not have hardware based flow control and also does not have any UART buffers. the corresponding task stack sizes will also have be increased accordingly.Creation of a new binary semaphore results in addition of a data structure that uses 58 bytes. 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. The application section of the init sequence is implemented with the function sdk_handle_init_sequence(). Modifying the Bluetooth Initialization Sequence The execution of the initialization sequence is partially done in the library and remaining in the application source.

8. 3.38 with EHCILL commands embedded. 6. 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. 2. 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. 4. 8. 5. After all the commands and their corresponding events of the application section of the init sequence are handled. 4.the EHCILL command complete event : SDK_BT_RF_SET_SLEEP_MODE. 14. 6. The commands executed from the application source code are: 1. 2. for handling the command complete event for the new command. 3. 13. MindTree Limited 7 April 2011 Page 30 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 11. 3) Insert another case (preferably just below the modified case). 10. 2. 9. 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. 7. 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. 7. 9. 16. 12. which is currently. SDK_Bt_Rf_Set_Power_Vector (Level 1. 15. 5.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.

c All functions in heap_bt.c appl_spp.c sdk_common.c sdk_pl.c appl_spp. 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. send the command which was the next in the unchanged sequence.c appl_bt_rf.c MindTree Limited 7 April 2011 Page 31 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .c heap_bt.c BT_UART_ISR appl_bt_on_sdk_indication sdk_error_handler File Name appl_spp. 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.c appl_spp. The SDK depends on the following functions being present as part of the application to provide the required Bluetooth functionality. 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.c appl_spp.c msp430_uart.c appl_spp.4) Once the event handling for the new command is done. If any command needs to be removed from the sequence. 3) Remove the event handler/case for the command to be removed.c appl_spp.c appl_spp. 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 sdk_common.c sdk_common.c sdk_pl.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_pl.c sdk_common.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 .c sdk_pl.

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

MSP-EXP430F5438+PAN1315EMK Directory Structure +---bluetooth +---build | +---msp430 | +---spp | +---accl | | +---iar | | +---release | +---lib[EtherMind Stack.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 .Directory Structure The high-level directory structure for MSP430 SPP package is provided below for reference. 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. with notes against the main directories.

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 . 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.EZ430-RF2560 Directory Structure +---bluetooth +---build | +---msp430 | +---spp | +---ez430-accl | | +---iar | | +---release | +---lib[EtherMind Stack.

h 3. Configure the pins related to Bluetooth operation in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_pin_config.h 2. Configure common Bluetooth related parameters in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_bluetooth_common_config. Open the workspace placed in BT_SDK_DIR \bluetooth\build\msp430\spp\workspace\iar\SPP. Configure parameters specific to the temperature application in BT_SDK_DIR \bluetooth\export\temp_appl\sdk_bluetooth_config.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.h 4.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 .

h 2. Configure configure common Bluetooth related parameters in BT_SDK_DIR \bluetooth\export\common_appl\sdk_bluetooth_common_config. This will build the required binary file that needs to be downloaded to the target.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. Configure the parameters specific to accelerometer application in BT_SDK_DIR \bluetooth\export\accl_appl\sdk_bluetooth_config.h MindTree Limited 7 April 2011 Page 37 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Right click on the project name that needs to be built and chose the “Make” option. 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.

open the workspace placed in BT_SDK_DIR \bluetooth\build\msp430\spp\workspace\iar\ez430-accl.eww 5. To launch IAR MSP430 EW IDE.h 4. Right click on the project ‘ez430-accl’ and chose the “Make” option.3. This is shown in the picture below: MindTree Limited 7 April 2011 Page 38 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . This will build the required binary file that needs to be downloaded to the target. Configure the pins related to Bluetooth operation in BT_SDK_DIR \bluetooth\export\common_appl\ sdk_pin_config.

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

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 . including SDP Database APIs EtherMind RFCOMM APIs & Callback Management EtherMind Serial Port Profile (SPP) Library libspp_pl. Component libspp_core.r43 Remarks EtherMind Stack API Library for      EtherMind Initialization & Shutdown APIs EtherMind HCI APIs & Callback Management EtherMind SDP APIs & Callback Management.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.r43 libs_TI_init_script.

h” can be customized before building the accelerometer application using the EtherMind Stack API library. the configuration file “BT_SDK_DIR\bluetooth\export\accl_appl\sdk_bluetooth_config. 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” 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. the configuration file “BT_SDK_DIR\bluetooth\export\simple_appl\sdk_bluetooth_config. The pin configuration related to Bluetooth functionality can be done using the configuration file “BT_SDK_DIR\bluetooth\export\common_appl\sdk_pin_config. Similarly.h” The UART baud rate. the corresponding workspaces will need to be rebuilt to generate the new images.h” Once changes are done to the configuration files.h” can be customized before building the accelerometer application using the EtherMind Stack API library. 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. the corresponding workspaces will need to be rebuilt to generate the new images.h” Once changes are done to the configuration files. EZ430-RF2560 The EtherMind configuration file “BT_SDK_DIR\bluetooth\export\accl_appl\sdk_bluetooth_config. Similarly.Configuring EtherMind Stack API Library MSP-EXP430F5438+PAN1315EMK The EtherMind configuration file “BT_SDK_DIR\bluetooth\export\temp_appl\sdk_bluetooth_config.h” The UART baud rate. MindTree Limited 7 April 2011 Page 41 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Configuration parameters for the Application and EtherMind Stack The table below lists various parameters that can be configured as part of the Bluetooth solution.h” can be customized before building the temperature application using the EtherMind Stack API library.

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 .

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.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.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. 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.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. 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 . hold.

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 doesn’t 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.Configuration Remarks (Indicated device is discoverable by limited inquiry procedure.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 . 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.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.

to be used only if the application needs to initiate connection with a fixed SPP de-vice on this fixed port. Default: 0x00 (Implies No Bonding) Example: If Bonding is required then this parameter has to be set to 0x01. Default: 48 bytes MindTree Limited 7 April 2011 Page 45 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . SDK_CONFIG_SPP_AUTHENTICATION_LEVEL This parameter determines the SPP Service Authentication requirements.Configuration Remarks can be changed to say “3” baseband receive slots SDK_CONFIG_SPP_PEER_SERVER_CHANNEL Port address of peer SPP de-vice. SDK_SPP_ATTRIB_DATA_LEN This parameter determines the SDP query buffer length for SPP. Default: SM_SERVICE_SECURITY_LEVEL_3 (Which implies strong MITM protection desired. Default : 0x01 Example: If the peer server channel number needed is 0x01. then 0x01 has to be set. It is not necessary that if SDK_CONFIG_SPP_PEER_BD_ADDR is defined then this configuration parameter is also defined. 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. 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.

BT_UART_PORT_SEL UART tx and rx port selection register Default : P9SEL Example : If Pin8. Default: defined vendor_specific_init.h.4 and Pin8.4 and Pin8. Example: If the maximum output level required is 10db.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. 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.Configuration Remarks SDK_MAX_OUTPUT_POWER_LEVEL This parameter determines the maximum output power level.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. UART baud rate of CC2560 will be changed to the value defined.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 .

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.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.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 .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.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.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.Configuration Remarks Default:BIT5 Example: if Pin 7.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.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 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 P2OUT BT_UART_CTS_PORT_IN UART CTS port input register Default: P1IN Example: If Pin 3. then the value should be set as UCA2CTL0 MindTree Limited 7 April 2011 Page 48 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .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.Configuration BT_UART_CTS_PORT_SEL Remarks UART CTS 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.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.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.

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 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 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 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 . 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 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 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 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.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 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 . 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.

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.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 . it needs to be defined as PORT2_VECTOR.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. then it is defined as PORT1_VECTOR.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. BT_BRF_CLK_PORT_SEL BRF Clock Port Select Default: P11SEL Example: If Pin 11.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. If CTS pin is configured on Port2.Configuration Remarks CC2560 controller.

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.6 is used as nSHUTDOWN for CC2560 then the value should be set to P1OUT SYSTEM_CLK set the system clock hal_board. 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 . MSP430_LPM_ENABLE This parameter enables Low Power Mode feature of MSP430 Default : Enabled Example : To disable.Configuration Remarks Default: P1OUT Example: If Pin 1.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. then it should be set to 15 seconds.

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

4. place the switch SW1 at ‘USB’ position Once powered on the following display will appear on the LCD     MAIN MENU  BLUETOOTH   SETTINGS  INFO  5. 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. the following sub menus and their current status are shown. 7. place the switch ‘POWER SELECTOR (SW1)’ at ‘BATT’ position.Steps to set up: 1. SETTINGS and INFO. 2.  BLUETOOTH MENU  BLUETOOTH   : OFF   VISIBLE     : NO  START INQUIRY  CONNECT     : 0  DATASEND    : 0  DISCONNECT  TEMPERATURE  DIAGNOSTICS    SETTINGS MENU  SET FREQUENCY  SET BAUDRATE  MindTree Limited 7 April 2011 Page 54 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Connect the PAN1315ETU module to MSP-EXP430F5438 as described in the Requirements section. To power on using USB. To power on using battery. 3. 6. Against each option. User has three options: BLUETOOTH. 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.

  CONNECT PEER  BlueMSP‐5C2F  BlueMSP‐5CA3  MindTree Limited 7 April 2011 Page 55 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .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. 8. 11. 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. Select BLUETOOTH MENU -> SPP CONNECT -> CONNECT DEVICE option.3V  IAR       5. After the inquiry is completed. the status changes to “COMPLETED” . 14. Here. In that case. The LCD should indicate the status against “BLUETOOTH :” as “ON” If LED stops blinking and the LCD status against “BLUETOOTH :” is OFF. Choose a device to get connected. then switching on Bluetooth was unsuccessful. 13. Make the device discoverable by selecting the “VISIBLE: ” option on LCD. In the status area. the status against “VISIBLE: “changes to “YES”.  BLUETOOTH MENU     BLUETOOTH   : ON  VISIBLE     : YES  START INQUIRY  CONNECT     : 0  DATASEND    : 0  DISCONNECT  TEMPERATURE  DIAGNOSTICS  12. reset the board and repeat step 9 10. 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.16  FREQUENCY 18MHz  BAUDRATE  115200  DEV TYPE  BT5190  VOLTAGE   3. the inquired device with the name starting from “BlueMSP” gets displayed. “LED Status indications” and “LCD Status indications”.    INFO MENU  VERSION   5. in the Inquiry Menu screen. Please refer the section “Usage of Menu options”.20.

BD Address.  BLUETOOTH MENU  BLUETOOTH   : ON  VISIBLE     : YES  START INQUIRY  CONNECT     : 1  DATASEND    : 0  DISCONNECT  TEMPERATURE  DIAGNOSTICS  16. In DeviceB. Select the device to which the SPP temperature data has to be sent. 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.NOTE: After it’s connected. 15. 17. To disconnect the connected device. the device will no longer be there in the connected device list. 18. LED2 turns ON and the status against “SPP CONNECT” changes to “1” indicating that one device is connected. Select BLUETOOTH MENU -> DIAGNOSTICS to view the local device name. select BLUETOOTH MENU -> DATSEND option on the board. On doing this. 20. It moves to the disconnected device list. For SPP data transfer.   DIAGNOSTICS  BlueMSP‐9324  ADR 9324DAD42300  CTRLVER  0x0F06  SNIFF    ENABLED  LPM      ENABLED  PEER1 MENU  PEER2 MENU  MindTree Limited 7 April 2011 Page 56 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . It lists down the connected devices. LED2 turns OFF and the status of “SPP CONNECT” changes to “NO”. Peer1 menu and Peer2 menu. Select BLUETOOTH MENU -> SPP CONNECT -> DISCONNECT DEVICE and the device to disconnect. Controller Version.  BLUETOOTH MENU   BLUETOOTH   : ON  VISIBLE     : YES  START INQUIRY  CONNECT     : 1  DATASEND    : 1  DISCONNECT  TEMPERATURE  DIAGNOSTICS  19. Select BLUETOOTH MENU -> TEMPERATURE to view its own board’s temperature and temperature sent by the peer1(DeviceA).

if we are running a PC game such as PPRacer. the boards begin sending the locally sampled accelerometer data to the peer. and the other is connected to the battery pack. EZ430-RF2560 . then the “CTRLVER” will be displayed as PG 3. one is connected to the PC/laptop via the emulator board. forwards the the accelerometer data received over the SPP connection. the direction inputs to the game can be given from the remote bluetooth device.10 21. The EZ430 target boards run the MindTree EtherMind stack. Once the SPP connection has been established. then repeat the steps from step9.0. onto the USB port.10 (2. The acclerometer data so received is mapped into keypresses and is written into the keyboard events buffer by the PC application.Accelerometer application The setup uses two EZ430-RF2560 target boards. The target board connected to the PC/laptop. Accordingly the status change should happen. 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 . If the user wants to send SPP data to Peer2 as well.31 – 0x2 is the major number and 0x1F is the minor number).If the controller used is PG 3. which is used to create an SPP connection between them. Now.

Connect one of the modules to the PC/laptop and the other to the battery pack and power it on. the initiator should be able to see the discoverable device and connect to it. MindTree Limited 7 April 2011 Page 58 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 4. indicating that the device is in a discoverable state. it is indicated by LED2 on both devices going to a solid ON state. Peer device name has to be configured as “BlueMSP-Appl” for establishing successful SPP connection. both the devices start exchanging the local accelerometer data over the SPP link. Within a short time. Once the Bluetooth ON is completed. we see that the initiator device’s LED2 starts blinking faster. 3. start the PPRacer game. Open the keyboard events generator application. 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. and select an appropriate COM port by following instructions on the console. 6. Once powered on. As soon as the SPP connection has been established. Now. which indicates that this device has begun discovering its neighboring devices to connect to.Steps to set up: 1. 5. It has the provision of establishing the SPP connection. 9. which switches on the Bluetooth and set the device visibility “ON”. if the connection is initiated from the peer device only. 8. 7. Once both the modules have been so initialized. 2. The accelerometer data being transmitted to the peer can be stopped/started using the S2 button. LED1 will stop toggling and will stabilize to the power-on state. indicating the Bluetooth ON procedure. You should be able to control the game using the EZ430 device connected to the battery pack as a remote control. Now. the LED1 on both the modules will start toggling. press the S1 button on any one of the boards to trigger a Bluetooth connection. Simple application Simple application is the basic application. Once the SPP connection is successfully established. The set up contains one MSP-EXP430F5438 connected with the PAN1315ETU and other peer Bluetooth Device. Load the SPP binary image onto two EZ430-RF2560 modules using the emulator board. then the simple application starts sending the data over SPP connection. If an SPP connection has been successfully established between the two devices. At the same time LED2 will begin blinking slowly.

a pop-up message shows “Inquiry Completed”.LCD Menu navigation with MSP-EXP430F5438+PAN1315EMKTemperature application The joystick is used to select the various options on the menu displayed on the LCD. LEFT.   Select “BLUETOOTH” option to toggle the ON/OFF status of Bluetooth. RIGHT and CENTER keys. If there is no previous screen. Select “VISIBLE:” option to toggle the visibility the Bluetooth device. This means that only other devices in the limited inquiry mode are made visible to it. Select “START INQUIRY” to discover other visible bluetooth devices. Moving the joystick RIGHT does not cause any action to take place. Select “DIAGNOSTICS” to display the Local BD-address and connected peer’s Tx power and RSSI       MindTree Limited 7 April 2011 Page 59 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . This populates the list of peer devices that the device can connect to in the “CONNECT” menu. DOWN. The application sets the device in limited inquiry mode. This is done only on items that have been highlighted. Limited inquiry option is used instead of the General inquiry. The joystick is be mapped to UP. 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. This automatically turns to “OFF” once two devices have been connected. 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. Select “TEMPERATURE” to display its own and peer device temperature readings. Once inquiry is complete. no further action is performed. Examples of Menu Navigation BLUETOOTH MENU Select the “BLUETOOTH” option on the top level menu to perform Bluetooth related operations. Pressing the joystick CENTER button selects an option.

INFO MENU Select the “INFO” option on the top level menu to view the following information: 1. 8 MHz at 115. For MSP430F5438A device.2 Kbps 4. NOTE: The MSP430F5438 and MSP430F5438A devices run in the “evaluation” mode and have a timeout associated with the Bluetooth operations. Baud rate used 4. Toolchain name and version MindTree Limited 7 April 2011 Page 60 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .6 Kbps Note that the 25 MHz is supported only for the BT5190 and the MSP430F5438A devices.2 Kbps 5. Power supply voltage 6. 25 MHz at 115.   “SET FREQUENCY” to set the frequency “SET BAUDRATE” to set the baudrate Currently. 18 MHz at 115. F5438 is displayed b. Device type a.SETTINGS MENU Select the “SETTINGS” option on the top level menu to change the frequency and baud rate operation. only the following combinations are supported: 1. For MSP430F5438 device. BT5190 is displayed. Frequency of board operation 3. 5. 12 MHz at 115. F5438A is displayed c.2 Kbps 2. For BT5190 device. 25 MHz at 921. Software version 2.2 Kbps 3.

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 LCD backlight of the LCD can be toggled by pressing the switch “S1”. the backlight of LCD will be OFF. MindTree Limited 7 April 2011 Page 61 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Note that the backlight is automatically switched off when MSP430 enters LPM mode.

SPP data is being transferred Device is in inquiry scan mode Device is in inquiry mode.LED STATUS INDICATIONS MSP-EXP430F5438+PAN1315EMK There are two LEDs on the MSP-EXP430F5438. This section describes the various states of the LEDs for different applications. If it finds another “BlueMSP430-Demo” device. 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. MindTree Limited 7 April 2011 Page 62 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 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. LED1 is red & LED2 is yellow. it will connect automatically and data transfer will begin. No active SPP connections. SPP connection established to peer device SPP data is being transferred. No active SPP connections.

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.

  MSP430 enters low power mode if: 
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 enters low power mode if:  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
As recommended in principles of LPM applications, peripherals like LED’s and LCD, temperature Sensor,  timers and UART need to be turned OFF.  These peripherals are restored to normal functionality while  exiting LPM.   MSP430 exits LPM by UART interrupt when data is received on UART. So, if eHCILL is disabled in the  application, the UART should not be turned OFF. If eHCILL is enabled, UART can be turned OFF as UART is  reconfigured in CTS pin interrupt handler during wake up from CTS mechanism. To know more about the  eHCILL protocol refer to the section “Power Saving Modes  eHCILL Mode”    
MindTree Limited 7 April 2011 Page 66 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

In our application. 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. Returns: API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. sdk error handler with error code SDK_ERROR_IN_HCI_LOCAL_NAME_LEN is invoked.5dBm. 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.h is provided to set the maximum output power at the CC2560 chip port. 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 . If the length exceeds BT_LOCAL_NAME_SIZE.h header file.c is provided to change the config local name suffix. It should be noted that the length of the local name after adding suffix should not exceed BT_LOCAL_NAME_SIZE. The valid values range from 4dBm to 12dBm in steps of 0. The function can be customized to change the suffix of the local name based on the requirement. Valid values are defined in BT_SDK_DIR/ Bluetooth/private/platforms/arch/common/ vendor_specific_init.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. last 2 bytes of BD addr is appended at the end of the local name.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.

  MindTree Limited 7 April 2011 Page 68 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.

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. CTS is connected to PORT 1 pin. During inactivity. eHCILL is provided in source code format as part of the file BT_SDK_DIR\bluetooth\export\common_appl\appl_bt_rf. MindTree Limited 7 April 2011 Page 69 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . it is not recommended to change the eHCILL implementation or eHCILL configuration without extensive knowledge of the eHCILL protocol. The controller issues a pulse on the CTS signal to wake up the host. 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. controller sends deep sleep indication based on the configured inactivity timeout value and host acknowledges it by sending deep sleep acknowledgement. eHCILL mode is configured after Bluetooth is turned “ON”.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. To know more refer to the TI document “SWRA288 . However. the mapping to PORT2 needs to be done as part of the configuration parameters. before going to sleep CTS pin of the host is configured as interrupt pin. the pulse is detected as PORT 1 interrupt. However CTS can be configured to PORT2.eHCILL 4 Wire Power Managment Protocol. In this case. According to eHCILL implementation.c. 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. In the current setup.pdf”.

other than initial activation. LPS is transparent to the host and does not require host intervention. To know more refer to the TI document “SWRA360 . MindTree Limited 7 April 2011 Page 70 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .25 mS). 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. Low power scan (LPS) is a mechanism to reduce the current consumed by the page/inquiry scan sequences.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.pdf”. Default scan window for both inquiry and page scans is 9 frames (= 11.Bluetooth Low-Power Scan. The specification requires default inquiry scans (if enabled) to be performed every 2. 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 configured as part of Bluetooth initialization sequence.56s and page scans (if enabled) to be performed every 1.28s.

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. Note: Sniff mode shall be enabled after SPP connection (local  BT_spp_connect() or from peer). 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 ) Active Mode / Send Data BT_hci_sniff_mode(SNIFF_MAX_INTERVAL SNIFF_MIN_INTERVAL. Parameters for this API are configurable in sdk_bluetooth_config. 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(). SNIFF_TIMEOUT ) HCI_COMMAND_STATUS_EVENT (HCI_SNIFF_MODE_OPCODE) Connection Establishment Enable Sniff HCI_MODE_CHANGE_EVENT (SNIFF_MODE . SNIFF_ATTEMPT.h file. MindTree Limited 7 April 2011 Page 71 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Example in the appl_spp.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.

in case OP_PEER_DISCONNECT sniff mode is disabled before initiating SPP Disconnection.c file under the sdk_bluetooth_menu_handler().0x00(Success) or 0x01-0xFF (Command Failed) Opcode . Note: Sniff mode shall be disabled before disconnecting SPP connection (local  BT_spp_disconnect()) Example in the appl_sdk.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function]. Events associated with sniff mode enable API: 1) HCI_COMMAND_STATUS_EVENT Important event parameters: Status .c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function].c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function].SNIFF_INTERVAL Example this event is handled in the appl_cb.SNIFF_MODE (0x02) Interval .HCI_SNIFF_MODE_OPCODE Example this event is handled in the appl_cb.0x00(Success) or 0x01-0xFF (Command Failed) Opcode .Events associated with sniff mode enable API: 1) HCI_COMMAND_STATUS_EVENT Important event parameters: Status .HCI_EXIT_SNIFF_MODE_OPCODE Example this event is handled in the appl_cb. MindTree Limited 7 April 2011 Page 72 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .0x00(Success) or 0x01-0xFF (Command Failed) Current Mode . 2) To Exit Sniff mode: BT_hci_exit_sniff_mode(). 2) HCI_MODE_CHANGE_EVENT Important event parameters: Status .

0x00(Success) or 0x01-0xFF (Command Failed) Current Mode . including all its modules. It follows a bottom-up approach – that is. During this initialization. Timer Libraries. The Bluetooth level initialization is not performed here. This is the first routine that the applications/profiles should call to initialize the entire stack. which is invoked from BT_ethermind_init(). The Debug.c file under the sdk_hci_event_indication_callback() function [this callback is registered in the BT_bluetooth_on() function]. various modules create and initialize their respective synchronization and conditional variables and allocate any static memory (if required). 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. The detailed description of the General Stack APIs is given below. The naming convention for this initialization handler is as follows (unless otherwise specified): void <module_name>_init ( void ). one after the other. Internal protocol modules provide an “EtherMind INIT” initialization handler. This API Starts the Bluetooth functionality of the device. and Transport modules are initialized before others. This API Stops the Bluetooth functionality of the device. BT_ethermind_init() calls the initialization routine of each module. All modules perform platform level initialization during this process.h” void BT_ethermind_init (void). the lower layers are initialized before the higher layers.2) HCI_MODE_CHANGE_EVENT Important event parameters: Status . The EtherMind tasks are created during this time – and they are moved to a dormant state. Internally. EtherMind Stack Initialization Name Synopsis Description BT_ethermind_init(): To initialize the EtherMind Bluetooth stack #include “BT_common. IN None MindTree Limited 7 April 2011 Page 73 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .ACTIVE_MODE (0x00) Example this event is handled in the appl_cb.

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

Application and Profile Initialization functions will not be called from this API. and it is not possible to communicate to the Bluetooth device (Host Controller hardware). containing the name to be set in the local Bluetooth device (Host Controller Hardware). and re-initializes data structures. another Bluetooth-ON can be performed. on return of this API. Following HCI Commands are transmitted to Host Controller hardware. This routine shuts down the stack.h. The EtherMind Read. The name string must be null terminated. which is invoked from BT_bluetooth_off(). using the BT_bluetooth_on() API.h” API_RESULT BT_bluetooth_off ( void ). The profiles should be initialized from the Application above only after the BT_bluetooth_on() API succeeds. The HCI-Transport interface is closed. IN Parameters OUT Parameters None None MindTree Limited 7 April 2011 Page 75 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . #include “BT_common. Internal protocol modules provide a “Bluetooth OFF” shutdown handler. For all practical purpose. states and variables of various stack modules. The HCI Callback event indication callback function can be registered later also by calling an HCI API BT_hci_register_event_indication_callback(). The naming convention for this shutdown handler is as follows (unless otherwise specified): void <module_name>_bt_shutdown (void). After this call has succeeded. Write and optional Timer tasks return to their dormant state. to revive the stack (and its modules). OUT Parameters Function Return Notes None API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. the EtherMind stack returns to pre Bluetooth-ON state.Local_name This parameter is a pointer to a CHAR array. 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.

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. This API disconnects the existing profile level connection between Dev A and Dev B. SPP APIs The Serial Port Profile (SPP) APIs are listed in the table below. should be shut down prior to calling BT_Bluetooth_off() API. 7 April 2011 Page 76 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide MindTree Limited . BT_spp_init () #include ”BT_spp_api. Note:  No event is indicated through the application callback on completion of this procedure.Function Return Notes API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. Parameters: notify_cb: Application callback function pointer. Failure to do so may result in unspecified behavior by the stack modules.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. Application. SPP_ERR_MUTEX_INIT_FAILED: Indicates initialization failed due to failure to initialize mutex. Returns: API_RESULT: API_SUCCESS: Indicates Serial Port profile initialized successfully SPP_ERR_NULL_PARAMETER: Indicates application is trying to register NULL as callback. 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. 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. as well as all currently active EtherMind Profiles.h.

h” API_RESULT BT_spp_start ( IN UCHAR server_channel ) This API starts the SPP instance. server_channel : The server channel in which connection has to be initiated. Returns: API_RESULT: Result of the API. API_SUCCESS: Indicates SPP started successfully SPP_ERR_INVALID_STATE: Cannot process user request. Refer Application Callback for details on callback function. The callback function is used by SPP to report asynchronous events and to confirm completion of API requests from application. Application should activate service discovery database of SPP before calling this API. This is the first API to be called for SPP module. SPP_ERR_NO_FREE_ENTITY: Cannot Start.h” API_RESULT BT_spp_connect ( IN UCHAR* bd_addr. It enables the application to use the service of the Serial Port profile. Free entity not available to allow incoming connections.   This API should be called only once after device Power ON. Note: No event is indicated through the application callback on completion of this procedure. Events: None BT_spp_connect () #include ”BT_spp_api. Returns: API_RESULT: Result of the API. . MindTree Limited 7 April 2011 Page 77 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . SPP implementation starts listening on the RFCOMM Channel specified. Events: None BT_spp_start () #include ”BT_spp_api. Application should get the server channel to listen for connection from service discovery database. Parameters: server_channel: The RFCOMM server channel in which the SPP device will be listening for peer initiated connection. API called in wrong HS State. 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.

Returns: API_RESULT: Result of the API. SPP_ERR_MAX_CONNECT_LIMIT_REACHED: SPP already connected to maximum number of peers. Cannot initiate the SPP connection.h” API_RESULT BT_spp_send ( IN SPP_HANDLE spp_handle. Parameters: spp_handle: Handle associates a SPP connection to a remote SPP device. Note: Result of the disconnection procedure completion will be indicated through application callback Events: SPP_DISCONNECT_CNF event is indicated in the callback. Events: SPP_CONNECT_CNF event is indicated in the callback. data: Data to be sent to peer over SPP channel. API_SUCCESS: Indicates disconnection procedure initiated successfully SPP_ERR_INVALID_HANDLE: Invalid handle. IN UCHAR *data. Note: This function is called as part of appl_spp_disconnect() BT_spp_send() #include ”BT_spp_api. SPP_ERR_INVALID_STATE: Cannot process user request. The server channel to initiate connection has to be got by the doing service discovery of the remote SPP Device. BT_spp_disconnect () #include ”BT_spp_api. Data_len: Length of data to be sent to peer over SPP channel.h” API_RESULT BT_spp_disconnect ( IN SPP_HANDLE handle ) This API disconnects existing service level connection with the peer SPP device. API called in wrong SPP State. API called in wrong HS State. Returns: MindTree Limited 7 April 2011 Page 78 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . IN UINT16 data_len ) This API sends the data to remote SPP device.API_SUCCESS: Indicates connection procedure initiated successfully SPP_ERR_INVALID_STATE: Cannot process user request. Note: Result of the connection setup procedure completion will be indicated through application callback. Parameters: handle : Handle identifies a SPP connection.

Events: SPP_STOP_CNF is indicated in callback after releasing the active SPP connection. wait until event is indicated in the callback. Update_UART_HCI_Baudrate command is then sent to the CC2560 controller. Application is responsible for de-activating the service discovery database for SPP device. API_SUCCESS: Indicates successful operation. 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. Application should wait until SPP_STOP_CNF is indicated in the callback. SPP_ERR_INVALID_HANDLE: Invalid handle SPP_ERR_INVALID_STATE: Cannot process user request. After successful baud rate change.API_RESULT: Result of the API.h” API_RESULT BT_spp_stop(void) This API stops the SPP service function on the local device. This results in the HCI UART getting out-of-sync when changing the baud rate .e. Existing active SPP connection if any will be released. Note: No event is indicated through application callback for this procedure when there is no active SPP connection i. 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 . API returns API_SUCCESS immediately when there is no active SPP connection. indicating processing of the command. 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. the MSP430_CTS is asserted to “Low” state. Note: None Events: SPP_SEND_CNF event is indicated in the callback BT_spp_stop() #include ”BT_spp_api. SPP_ERR_STOP_PENDING is returned when SPP device has some active SPP connection that need to be released. The command complete events are re-enabled by routing CC2560_UART_TX back to HCI_TX. API called in wrong SPP State. CC2560 deasserts MSP430_CTS pin to “High” state. 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.

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.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(). This may be customized as required by the user.h” void sdk_set_controller_uart_baudrate(UINT32 baudrate) void sdk_set_controller_uart_baudrate ( IN UINT32 baudrate ) This API sets the controller’s 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. 7 April 2011 Page 80 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide MindTree Limited . sdk_set_controller_uart_baudrate() #include ”hci_uart. Receiving data from the remote SPP device. the event handler sdk_update_baudrate_handler() is called.

OUT SPP_EVENTS spp_event. In the callback. Data received from remote side SPP service stopped on local device and active SPP connections are released. Callback Prototype typedef API_RESULT (*SPP_APPL_EVENT_NOTIFY_CB) ( IN SPP_HANDLE spp_handle. Data is sent to the remote side upon application request. SPP connection setup by remote side. 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. events of type SPP_EVENTS will be indicated along with the parameters. 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. SPP connection released upon application request. OUT API_RESULT status. SPP connection released by remote side. 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 .  Receiving connect and disconnect events initiated from the remote device.6 MindTree Limited 7 April 2011 Page 81 of 224 . Stopping profile if it was connected when the stop API call was made.

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(). Length of BD_ADDR . Contains integer. Length of BD_ADDR ( 6) Contains the value as integer. SPP_CONNECT_IND Not Applicable the value as (UCHAR*)data data . Contains integer.Array of type "unsigned char" containing the BD_ADDR of the SPP device. of bytes SPP_RECVD_DATA_IND Not Applicable Number received.6 Contains the value as integer.values for BD_ADDR of the peer SPP device. of bytes SPP_DISCONNECT_CNF API_SUCCESS (UCHAR*)data data . (UCHAR*)data data – Pointer to the buffer containing the data received.Array of type "unsigned char" containing the values for BD_ADDR of the peer SPP device. the value as Length of BD_ADDR . SPP_STOP_CNF API_SUCCESS NULL 0 MindTree Limited 7 April 2011 Page 82 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Number written. SPP_DISCONNECT_IND Not Applicable (UCHAR*)data data .Array of type "unsigned char" containing the BD_ADDR of the SPP device.

2. Name Synopsis HCI Event Indication Callback API_RESULT (* hci_event_indication_cb) ( UCHAR event_type.h. Part E – Host Controller Interface Functional Specification. using BT_bluetooth_on() API. The code snippet is as follows: The length of the buffer containing the event_data.7. API_RESULT sdk_hci_event_indication_callback(UCHAR event_type. each event is handled independently depending on the event_type. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. UCHAR event_datalen ).2. Code snippet for registering “sdk_hci_event_indication_callback” as HCI Event indication callback retval = BT_bluetooth_on(sdk_hci_event_indication_callback. UCHAR * event_data. This HCI Callback must be registered by the Application. MindTree Limited 7 April 2011 Page 83 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . event_datalen OUT Parameters Function Return Notes None.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. the Host Controller hardware. For description of the parameters of the above-mentioned HCI Events. as received from the local Bluetooth device. In the callback. event_type The HCI “Event” Code. (CHAR *) SDK_CONFIG_DEVICE_NAME). Section 7. v1. UCHAR * event_data. sdk_bluetooth_on_complete. or. refer to the Specification of the Bluetooth System. Vol. 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.

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 .UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_CONNECTION_COMPLETE_EVENT: hci_connection_complete_event_handler(event_data). … The events handled in default application are: HCI_EVENTS HCI_CONNECTION_COMPLETE_EVENT Description New connection has been established. 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. and Sniff mode. A connection is terminated. Bluetooth device or multiple Bluetooth devices have responded so far during the current Inquiry process Remote name request has been completed. 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. break. 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. Hold mode.

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. has been LEGEND The arrow conventions followed are shown below.data.API_SUCCESS. Applications can use the enclosed MSCs as a sample to model other usage scenarios with the SPP and EtherMind HCI and SDP APIs. The MSCs describe the SPP APIs involved and corresponding events indicated in the application callback.data_len)” abbreviated to “SPP_SEND_CNF event” in the MSCs. SPP_SEND_CNF. 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 . Note:  “SPP_appl_callback(<spp_handle>. This section does not cover all the usage scenarios.

Activate SPP service discovery database. 2. 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 . 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.Initialization APP BT_ethermind_init() BT_Bluetooth_on(appl_bluetooth_on_callback.

allow_role_switch. API_SUCCESS. page_scan_mode. 6) RFCOMM Connection MindTree Limited 7 April 2011 Page 91 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . SPP_CONNECT_CNF.packet_type.SPP Connection Establishment Local SPP Remote SPP APP Bluetooth Stack BT_hci_create_connection(REMOTE _BD_ADDR. page_scan_repetition_mode.clock_offset. connection_handle) appl_hci_callback(HCI_CONNECTION_COMPLETE_EVENT for ACL) SDP Connection and Service discovery BT_spp_connect(REMOTE_BD_ ADDR. REMOTE_BD_ADDR. server_channel) Create Profile Connection spp_appl_callback(handle.

datalen) MindTree Limited 7 April 2011 Page 92 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .*data.API_SUCCESS .SPP Data Transfer APP Local SPP Bluetooth Stack Remote SPP Profile Level Connection Established BT_spp_send_data(handle. datalength) Send Data spp_appl_callback(handle. datalen) spp_appl_callback(handle. SPP_SEND_CNF. SPP_RECVD_DATA_IND. *data.API_SUCCESS. *data.

API_SUCCESS.REMOTE_BD_ADDR.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.6) Release Connection Profile MindTree Limited 7 April 2011 Page 93 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . SPP_DISCONNECT_CNF.

MindTree Limited 7 April 2011 Page 94 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. 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. 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. the characteristics of the services. and.0) Release Connection Profile NOTE   Application can do a STOP through BT_spp_stop() if the application wants to stop using SPP Service. SPP_STOP_CNF. to use SPP service. application should first call BT_spp_start() before making any connection to remote device. BT_sdp_close BT_sdp_servicesearchattributerequest The detailed description of the SPP APIs is given below. Any time after STOP.NULL. API_SUCCESS. if so. API Brief Description BT_sdp_open This API establishes the SDP connection with a remote Bluetooth device.

The application is expected to establish the ACL connection with the remote Bluetooth device prior to calling this API.h” API_RESULT BT_sdp_close ( SDP_HANDLE ).h” API_RESULT BT_sdp_open ( SDP_HANDLE ). API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. The SDP Handle for the SDP connection. #include “BT sdp api.BT_sdp_open Name Synopsis BT_sdp_open(): Establishes a SDP connection with a Bluetooth device. Description IN Parameters OUT Parameters Function Return * handle This API closes the SDP connection with a remote Bluetooth device. IN Parameters OUT Parameters Function Return Notes BT_sdp_close Name Synopsis BT_sdp_close(): To close the SDP connection with a Bluetooth device.h. identified by its Bluetooth Device Address (BD_ADDR) as specified in the supplied SDP Handle. as identified by the supplied SDP Handle. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. MindTree Limited 7 April 2011 Page 95 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . The Application can use SDP_SET_HANDLE() to populate the SDP Handle prior to calling this API. #include “BT sdp api. The SDP Response Callback is called on connection establishment or error with ‘type’ set to SDP_Open. Description * handle This API establishes the SDP connection with a remote Bluetooth device. handle None.h. The SDP Handle for the SDP connection. once the connection is established. handle None. The L2CAP channel configuration is done automatically.

UINT16 * len_attribute_data ). This parameter must be an array of UINT16 variable. num_attribute_id_range Number of Attribute ID Ranges present in the attribute_id_range parameter. and. UINT32 * attribute_id_range. UINT16 num_attribute_id_range. UCHAR * attribute_data. This parameter must be an array of S_UUID variable. Synopsis uuids The set of UUIDs to be used to limit the search for services offered by the remote Bluetooth device. Description This API is used to determine if a remote Bluetooth Device provides chosen services. The SDP Utility APIs can be used to extract the relevant service parameter values from the Service Attribute. 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. and typically specified in the associated Bluetooth Profile specification. of size num_attribute_id_range. #include “BT sdp api. num_attribute_ids parameter. UINT16 num_uuids. S_UUID * uuids. 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. num_uuids Number of UUIDs present in the uuids parameter. UINT16 * attribute_ids. IN Parameters handle The SDP Handle for the SDP connection. MindTree Limited 7 April 2011 Page 96 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . This parameter must be an array of UINT32 variable.h” API_RESULT BT_sdp_servicesearchattributerequest ( SDP_HANDLE * handle. if so. as identified by the Attribute IDs specified. containing the Attribute ID Ranges. the characteristics of the services. 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. of size num_attribute_ids. containing the UUIDs. of size num_uuids. This API returns the Service Attributes and the size of the same. containing the Attribute IDs.Notes The SDP Response Callback is called on connection establishment or error with ‘type’ set to SDP_Close. UINT16 num_attribute_ids. The format and content of the Service Attributes is service dependent.

which means Attribute IDs from 0x0000 to 0xFFFF) extracts all available Attribute values. of size len_attribute_data.h. It is recommended to use this API instead of using the APIs for the Service Search Request and the Service Attribute Request. MindTree Limited 7 April 2011 Page 97 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . allocated by the application to store the attribute data received in the response for the Service Attribute Request. Overlapping the values of attribute_ids with attribute_id_range disables that corresponding attribute_ids. if the number of records for a requested service is expected to be few. The SDP Response Callback uses the same buffer as response parameter to indicate the received record handles. SDP Structures/Data Types SDP Handle Data type definition #include “BT_sdp_api. must be allocated and passed as attribute_data parameter.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. the attribute_id_range value of 0x0000FFFF. for the Attribute IDs and Ranges as specified by the application. attribute_data Buffer. and the application must not free the buffer before SDP Response Callback is called indicating completion of the Service Attribute Request. } SDP_HANDLE. The buffer for Attribute values. Attribute Ranges are used to extract one or more attribute values which are in sequence. The allocated buffer must be resident. OUT Parameters Function Return Notes See Notes. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. Parameter Description bd_addr The Bluetooth Device Address for the remote SDP connection Entity. UCHAR id. so as to reduce the number of SDP transactions and thereby reducing Bluetooth bandwidth usage and time taken to perform the search.h” typedef struct { UCHAR bd_addr[6]. and should not be modified by applications. This is assigned by SDP. SDP_CB fn_ptr. id Connection Identifier for the SDP connection. For example.

MindTree Limited 7 April 2011 Page 98 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .h” API_RESULT (* SDP_CB) ( UCHAR UCHAR UINT16 UINT16 ). DESCRIPTION IN Parameters type. if the type is SDP_Open . The SDP exports the SDP_SET_HANDLE() macro to initialize a SDP Handle with the Callback function information. which was previously provided as a parameter in the BT_sdp_servicesearchrequest() API. SDP_Close and SDP_ErrorResponse. which must be reported to the higher layer profile or applications. For the SDP_ServiceSearchResponse. SDP Callback SDP calls a callback function to inform the application of the response of certain action or SDP requests. There are two prototypes of SDP Callback and both are described in the section below. status This callback is called by RFCOMM to report various events that occur for a Server Channel. this parameter is set to a buffer containing the “record_handles”. type This indicates the type of response. The application must register the callback along with the SDP Handle before calling any SDP Request API. SDP Response Callback Name Synopsis SDP_CB: SDP Response callback #include “BT sdp api. This parameter is set to NULL.fn_ptr The SDP Response Callback function pointer. 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. length. * response. to be specified by the application.

For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse. This value is API_SUCCESS or an error code indicating the reason for failure. which was previously provided as a parameter in the BT_sdp_serviceattributerequest() and BT_sdpserviceserachattributerequest() respectively. such as. this value indicates the number of handles in the response. this parameter is set to a buffer containing the “attribute_data”. For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse. The application should not free this memory before completion of the transaction. 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). this value indicates the number of attribute bytes in the response. status This parameter indicates the result of the transaction. this SDP Callback Prototype should be used. the Bluetooth Device Address SDP_SET_HANDLE MindTree Limited 7 April 2011 Page 99 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . If the compilation flag “SDP_HAVE_HANDLE_WITH_CB” is enabled following SDP Callback prototype will be defined. 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. OUT Parameters Function Return Notes None API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. For the SDP_ServiceSearchResponse.h. In situation where the SDP application needs to perform several simultaneous SDP queries. It returns one additional parameter “SDP_HANDLE” to uniquely identify the corresponding SDP request. length This parameter represents the size of SDP response byte stream.

as received as a result of the SDP Service Attribute Request and/or SDP Service Search Attribute Request APIs. attribute_data Application allocated UCHAR buffer containing the Service Attribute data. IN Parameters OUT Parameters Function Return Notes SDP_SET_HANDLE Name Synopsis SDP_SET_HANDLE(): To populate the SDP Handle. bd_addr. such as. channel_number Pointer to a caller allocated UCHAR variable.h” API_RESULT BT_sdp_get_channel_number ( UCHAR * attribute_data. The application must provide this callback. OUT Parameters Function Return Notes None None. 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. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. which will contain the RFCOMM Server Channel attribute value on return. #include “BT sdp api. callback The SDP Response Callback which will be called to notify completion of an SDP Request. MindTree Limited 7 April 2011 Page 100 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . None. callback) Description IN Parameters This macro can be used to populate the required elements of a SDP Handle.BT_sdp_get_channel_number Synopsis #include “BT sdp spi. sdp_handle bd_addr The SDP Handle that needs to be populated.h” #define SDP_SET_HANDLE(sdp_handle. None.h. The remote Bluetooth Device Address this SDP Handle corresponds to. the Bluetooth Device Address and the SDP Response Callback.

as stored in the HCI module. This API retrieves the Bluetooth Device Address (BD_ADDR) of the local Bluetooth device.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. This API writes the current values for the Inquiry Access Code LAP(s). This API writes the Class of Device configuration parameter to the local Bluetooth device. This API writes the value of Scan Enable configuration parameter in the local Bluetooth device. 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. 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 . to be used by 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 reads the currently configured values for the Inquiry Access Code LAP(s).

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 writes the parameters for the sniff subrating for the ACL link as specified by the connection handle.of Responses. This API writes the current value for Page Scan Type configuration parameter to be stored in the local Bluetooth device. This API writes the value of the Page Timeout configuration parameter to the local Bluetooth device. which is currently in the Sniff mode. 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 current value for Inquiry Scan Type configuration parameter to be stored in the local Bluetooth device. 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_inquiry_cancel This API cancels an ongoing Bluetooth Device Inquiry/Discovery procedure. 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. and with the specified LAP (Lower Address Part).

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 reads the value for the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range. 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. This API writes the value of the Link Supervision Timeout configuration parameter in the local Bluetooth device. This API enables applications to accept/reject User Confirmation request. This API enables application to retrieve Link Key for a remote Bluetooth device. as identified by the supplied Bluetooth Device Address. 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 .BT_hci_read_transmit_power_level This API reads the value for Transmit Power Level for the specified Connection Handle. This API can be used to send vendor specific HCI commands to the local Bluetooth device. This API enables applications to furnish Bluetooth PIN for authentication procedure on outgoing link-level connection to a device. This API enables applications to furnish the Link Key for authentication procedure on the link-level connection to a device. 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. 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.

MindTree Limited 7 April 2011 Page 104 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . None. 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. Description This API reads the Version information of the local Bluetooth device. If the Application decides to reset the local Bluetooth device. and then by switching on using BT_bluetooth_on(). Re-initialization of the EtherMind Stack can be performed by switching it off first using BT_Bluetooth_off() API. The version information consists of two parameters: the version and revision parameters. 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 ).Simple Pairing procedure (Numeric Comparison association model). None. the EtherMind stack should be re-initialized. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. The detailed description of the GAP APIs is given below.h” API_RESULT BT_hci_read_local_version_information ( void ). Description IN Parameters OUT Parameters Function Return Notes This API resets the local Bluetooth device.h.

The Manufacturer Name parameter indicates the manufacturer of the local Bluetooth module as specified by the Bluetooth SIG. IN Parameters OUT Parameters Function Return Notes None. 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. and to work around various bugs in the hardware if necessary. #include “BT hci api. 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. This allows the software to determine what Bluetooth hardware is being used. The difference between this API and the BT_hci_read_bd_addr() is that an Command Complete Event is not generated for this API. The version parameter only changes when new versions of the Bluetooth hardware are produced for new Bluetooth SIG specifications. This API reads the BD_ADDR from the HCI module itself. None. 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 HCI Revision parameter should be controlled by the manufacturer and should be changed as needed. The subversion parameter should be controlled by the manufacturer and should be changed as needed. 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 .h. as stored in the HCI module. whereas the BT_hci_read_bd_addr() reads the BD_ADDR from the Bluetooth hardware.h” API_RESULT BT_hci_get_local_bd_addr ( UCHAR * bd_addr ).The HCI Version parameter defines the major hardware version of the Bluetooth hardware. IN Parameters OUT Parameters None. Description This API retrieves the Bluetooth Device Address (BD_ADDR) of the local Bluetooth device. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. The version parameter is controlled by the Bluetooth SIG.

UINT16 name_length ). Name_length bytes. IN class_of_device 7 April 2011 Value of the Class of Device for the local device. 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. Description This API writes the Class of Device configuration parameter to the local Bluetooth device.h” API_RESULT BT_hci_change_local_name ( UCHAR * name.Function Return Notes API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. 3) Controller Configuration APIs BT_hci_change_local_name Name Synopsis BT_hci_change_local_name(): To set the local name of the device. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. 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. #include “BT hci api. Description IN Parameters This API configures the name of the local Bluetooth device. OUT Parameters Function Return Notes None. name Caller allocated CHAR array of size 248 bytes.h. On embedded version of the EtherMind stack. None.h. Though Page 106 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide MindTree Limited . Length of the Name to be set. which will be used to copy the name of the remote Bluetooth device. the size of the name is limited to 12 due to memory constraints.h” API_RESULT BT_hci_write_class_of_device ( UINT32 class_of_device ).

All Bluetooth devices should support at least one IAC.h. None. None.org/assigned-numbers/.0x9E8B33). 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. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. UINT32 * iac_lap ).h” API_RESULT BT_hci_write_current_iac_lap ( UCHAR num_current_iac. the General Inquiry Access Code (GIAC. Population of Class of Device should be according to Bluetooth Assigned Numbers document – http://www. Class of Device is a 3 Byte value.Parameters represented in 4-byte UINT32 type.bluetooth. 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. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. 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. MindTree Limited 7 April 2011 Page 107 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . IN Parameters OUT Parameters Function Return Notes None.h” API_RESULT BT_hci_read_current_iac_lap ( void ).h. None.

MindTree Limited 7 April 2011 Page 108 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Description This API writes the current values for the Inquiry Access Code LAP(s). which holds the values of each LAP to be set. Page Scan enabled. 0x02: Inquiry Scan disabled. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Each IAC LAP is actually a 3-byte value represented in a 4-byte UINT32 variable. the General Inquiry Access Code (GIAC – 0x9E8B33). 0x01: Inquiry Scan enabled. which are currently to be used by the local Baseband Controller to simultaneously listen for during an Inquiry Scan. Description This API writes the value of Scan Enable configuration parameter in the local Bluetooth device. Iac_lap Pointer to a caller allocated UINT32 array of size num_current_iac. The value specified must not be greater than the number of IACs that the local Bluetooth device is capable of supporting. Range: 0x01-0x40. 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. 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. 0x03: Inquiry Scan enabled. IN Parameters scan_enable Value of the Scan Enable parameter to be set in the local Bluetooth device. as returned by the BT_hci_read_number_of_supported_iac() API. The valid values and their meanings are shown below: 0x00: No Scans enabled (Default). IN Parameters num_current_iac This parameter specifies the number of IACs.h” API_RESULT BT_hci_write_scan_enable ( UCHAR scan_enable ). OUT Parameters Function Return Notes None. Page Scan disabled. All Bluetooth devices should support at least one IAC.h. to be used by the local Bluetooth device to simultaneous listen for during an Inquiry Scan performed by other Bluetooth devices. Page Scan enabled.

the Inquiry Complete Event is received. MindTree Limited 7 April 2011 Page 109 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 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.OUT Parameters Function Return Notes None. The application is notified of the Inquiry Results in two ways: i. The local Bluetooth device starts the Bluetooth Inquiry on reception of the HCI Inquiry Command. Range: 0x00 – 0xFF. Inquiry Time = inquiry_length * 1. none.h” API_RESULT BT_hci_inquiry ( UINT32 lap. Between these two events. when one or more remote Bluetooth devices respond to the Inquiry process initiated by the local Bluetooth device. Num_responses Maximum number of responses from the Inquiry before the Inquiry is halted. 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. and with the specified LAP (Lower Address Part) from which the local Bluetooth device derives the Inquiry Access Code (IAC). 4) Device Discovery APIs BT_hci_inquiry Name Synopsis BT_hci_inquiry(): To initiate/perform Bluetooth Device Inquiry/Discovery. UCHAR inquiry_length. one or more Inquiry Results Event may be received. None. OUT Parameters None. At the end of the Inquiry process. Description This API initiates/performs the Bluetooth Device Inquiry/Discovery for the specified Inquiry Length and Number of Responses.h.28 Sec. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. #include “BT hci api. UCHAR num_responses ). A value 0f 0x00 means unlimited number of responses. Value Range: 0x01 to 0x30. and sends a Command Status Event to the HCI.

h” API_RESULT BT_hci_inquiry_cancel ( void ).h” API_RESULT BT_hci_write_inquiry_scan_type ( UCHAR inquiry_scan_type ).Function Return Notes API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. The Inquiry Scan Type configuration parameter controls whether the local Bluetooth device performs Standard Scan or Interlaces Scan (faster) during inquiry. This API can be called only if BT_hci_inquiry() API call was made before.h This API must not be called if the local Bluetooth device is in the process of establishing a connection with another Bluetooth device. 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 . BT_hci_inquiry_cancel Name Synopsis BT_hci_inquiry_cancel(): Cancels an ongoing Bluetooth Device Inquiry/Discovery procedure. 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. Description This API writes the current value for Inquiry Scan Type configuration parameter to be stored in the local Bluetooth device. inquiry_scan_type  The Inquiry Scan Type to be set. #include “BT hci api. and the application has not yet received the HCI Inquiry Complete Event for the Inquiry process.h. A remote Bluetooth device will respond to Inquiry procedure only if it has its Inquiry Scan enabled. 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.

#include “BT hci api. Bluetooth Security related events (Link Key Request Event and/or PIN Code Request Event) might be received.2.h” API_RESULT BT_hci_create_connection ( UCHAR * bd_addr. 0x01 – Interlaced Scan API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. For details on the Bluetooth ACL link establishment. UINT16 clock_offset. refer to the Specification of the Bluetooth System. Packet_type This is the ACL Packet Types to be used by the Baseband Controller for this new ACL connection. Part F – Message Sequence Charts. 2. 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. UINT16 packet_type. the Connection Complete Event is received. depending on the security settings on the local and/or remote Bluetooth device. UCHAR allow_role_switch ). v1. Before receiving the Connection Complete Event. 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 . The local Bluetooth device starts the Bluetooth Paging process to create an ACL link on reception of the HCI Create Connection Command. with or without link-level authentication procedure. and sends a Command Status Event to the HCI. Description This API is used to create an ACL connection to the specified remote Bluetooth device. At the end of the Paging process. UCHAR page_scan_repetition_mode. OUT Parameters Function Return Notes None. UCHAR page_scan_mode. One or more DHx/DMx packet types can be combined together. 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. 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.h. Vol.

The local Bluetooth device starts the Link Manager procedure to disconnect the link on reception of the HCI Disconnect Command. refer to the Specification of the Bluetooth System. and Disconnection Complete Events for each of this link will be received. For details on the Bluetooth link disconnection. MindTree Limited 7 April 2011 Page 112 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . If the Connection Handle supplied with this API refers to the ACL link with a remote Bluetooth device. Description This API initiates disconnection of an existing ACL. SCO or eSCO link with a remote Bluetooth device. OUT Parameters Function None. BT_hci_disconnect Name Synopsis BT_hci_disconnect(): To disconnect an ACL link. the Disconnection Complete Event is received. 2. as identified by the supplied Connection Handle. then all the SCO & eSCO links that may be currently active with the same remote device will also be disconnected. Part F – Message Sequence Charts. Establishment of ACL link depends to the Page Scan mode of the remote Bluetooth device. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. At the end of the link disconnection process. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Vol.h. #include “BT hci api. Reason This specifies the reason for disconnection. SCO or eSCO connection to be disconnected.h There can only be one ACL connection between a pair of Bluetooth devices. OUT Parameters Function Return Notes None.h” API_RESULT BT_hci_disconnect ( UINT16 connection_handle. v1.procedure. and sends a Command Status Event to the HCI.2. 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. IN Parameters connection_handle Connection Handle for the existing ACL. UCHAR reason ). The reason parameter is delivered along with the Disconnection Complete Event.

#include “BT hci api. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. 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 . Value Range: 0x0001 – 0xFFFF. IN Parameters OUT Parameters Function Return Notes page_timeout The value of Page Timeout to be set. None.h” API_RESULT BT_hci_write_page_timeout ( UINT16 page_timeout ).625 msec. The actual timeout is calculated as follows: Time = page_timeout * 0.Return Notes None. None.h” API_RESULT BT_hci_write_page_scan_type ( UCHAR page_scan_type ). 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. Description This API writes the value of the Page Timeout configuration parameter to the local Bluetooth device. 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. Description This API writes the current value for Page Scan Type configuration parameter to be stored in the local Bluetooth device.h. 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.

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. Link_policy_settings The Link Policy Settings to be set.h.during paging. (Default) Value 0x0001: Enable Master-Slave switch. Sniff. Value 0x0004: Enable Sniff Mode. 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. Description This API writes the Link Policy Setting configuration parameter to the local Bluetooth device for a specified ACL Connection Handle. The valid values are:   OUT Parameters Function Return Notes None. 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. #include “BT hci api. Value 0x0000: Disable all LM modes. IN Parameters page_scan_type The Page Scan Type to be set. or Park mode. 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 . Value 0x0008: Enable Park Mode. MindTree Limited 7 April 2011 Page 114 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Value 0x0002: Enable Hold Mode.h” API_RESULT BT_hci_write_link_policy_settings ( UINT16 connection_handle. UINT16 link_policy_settings ).

API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. and sends a Command Status Event to the HCI. UINT16 sniff_attempt. Sniff_mode_max_interval This parameter specifies the maximum acceptable number of Baseband time slots to wait in Sniff mode. At the end of this process. UINT16 sniff_mode_max_interval. UINT16 sniff_mode_min_interval.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 . Value Range = 0x0002 to 0xFFFE. Only even values are valid Sniff time = sniff_mode_min_interval * 0.h” API_RESULT BT_hci_sniff_mode ( UINT16 connection_handle.OUT Parameters Function Return Notes None.9 sec sniff_mode_min_interval This parameter specifies the maximum acceptable number of Baseband time slots to wait in Sniff mode.625 msec Time Range = 1. Only even values are valid Sniff time = sniff_mode_max_interval * 0. IN Parameters connection_handle The Connection Handle of the ACL connection with a remote Bluetooth device that needs to be placed into Sniff mode.h.625 msec Time Range = 1. BT_hci_sniff_mode Name Synopsis BT_hci_sniff_mode():To place an ACL Connection with a remote Bluetooth device to Sniff mode. the Mode Change Event is received. #include “BT hci api. None. 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. UINT16 sniff_timeout ). The local Bluetooth device starts the Sniff mode process on reception of the HCI Sniff Mode Command.25 msec to 40.25 msec to 40. Value Range = 0x0002 to 0xFFFE.

the Mode Change Event is received. None. 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.625 msec to 40. and sends a Command Status Event to the HCI. Time Range = 0 msec to 40. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Value Range = 0x0001 to 0x7FFF. Time = (2 * sniff_timeout Otherwise. Time = (2 * sniff_attempt .1) * 0.9 sec sniff_timeout Sniff timeout. which is currently in the Sniff mode. This parameter specifies the number of Baseband receive slots for Value Range = 0x0000 to 0x7FFF.9 sec OUT Parameters Function Return Notes None.h.625 msec. MindTree Limited 7 April 2011 Page 116 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . #include “BT hci api. Time = 0. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.625 msec Time Range = 0. Description This API can be used to end the Sniff mode for an ACL Connection.h. At the end of this process. The local Bluetooth device starts the exit from the Sniff mode process on reception of the HCI Exit Sniff Mode Command. BT_hci_exit_sniff_mode Name Synopsis BT_hci_exit_sniff_mode(): To end/cancel the Sniff mode.h” API_RESULT BT_hci_exit_sniff_mode ( UINT16 connection_handle ).1) * 0.Sniff attempt. None. . If sniff_timeout > 0.

Only even values are valid.h” API_RESULT BT_hci_sniff_subrating ( UINT16 connection_handle. The Maximum Latency parameter shall define the maximum allowed sniff subrate of the remote device. The Connection Handle shall be the primary Connection Handle between the two devices.BT_hci_sniff_subrating (Bluetooth v2. Default = 0x0000 Latency = maximum_latency * 0.1+EDR) Name Synopsis BT_hci_sniff_subrating(): To specify the parameters for sniff subrating for a given link. MindTree Limited 7 April 2011 Page 117 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Setting both subrate values to zero is equivalent to sniff mode without subrating enabled. Only even values are valid. UINT16 minimum_local_timeout ). 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.625 msec Time Range = 0 sec to 40. If this command is used on a link in sniff mode this shall cause sniff subrating to be negotiated at the Link Manager. #include “BT hci api. The link may have smaller subrates and therefore lower latencies and longer timeouts than those specified. The interval shall be determined from the sniff interval and the maximum subrate latency parameters from the command. Description This API writes the parameters for the sniff subrating for the ACL link as specified by the connection handle. UINT16 minimum_remote_timeout. UINT16 maximum_latency. 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.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. otherwise sniff subrating shall be negotiated only after the device has entered the sniff mode.

#include “BT hci api. Only even values are valid. The valid values and their meanings are shown below: Value Range = 0x0000 to 0xFFFE. The valid values are: Value 0x00: Read current Transmit Power Level.625 msec Time Range = 0 sec to 40. MindTree Limited 7 April 2011 Page 118 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Default = 0x0000 Latency = maximum_latency * 0. 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.h. Value 0x01: Read maximum Transmit Power Level. 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. Default = 0x0000 Latency = maximum_latency * 0.625 msec Time Range = 0 sec to 40. OUT Parameters None. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Power_type This parameter specifies whether the current or maximum power level to read.9 sec OUT Parameters Function Return Notes None.9 sec minimum_local_timeout The minimum base sniff subrate timeout that the local device may use. None. UCHAR power_type ).h” API_RESULT BT_hci_read_transmit_power_level ( UINT16 connection_handle. connection_handle The Connection Handle corresponding to the ACL connection with the remote Bluetooth device. for which the transmit power level to be read.

6 dB.Function Return Notes API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. The value zero indicates that the RSSI is inside the Golden Receive Power Range. None.h” API_RESULT BT_hci_write_link_supervision_timeout ( UINT16 connection_handle. BT_hci_read_rssi Name Synopsis BT_hci_read_rssi(): To retrieve the RSSI value for an ACL connection. Any positive RSSI value returned by the local Bluetooth device indicates how many dB the RSSI is above the upper limit. The lower threshold level corresponds to a received power between -56 dBm and 6 dB above the actual sensitivity of the receiver. The RSSI measurement compares the received signal power with two threshold levels. 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. #include “BT hci api. UINT16 link_supervision_timeout ). API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h. None. Description This API writes the value of the Link Supervision Timeout configuration parameter in the local Bluetooth device.h.h” API_RESULT BT_hci_read_rssi ( UINT16 connection_handle ). IN Parameters OUT Parameters Function Return Notes connection_handle reading the RSSI. The upper threshold level is 20 dB above the lower threshold level to accuracy of +/. any negative value indicates how many dB the RSSI is below the lower limit. 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. 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 . which define the Golden Receive Power Range.

The same timeout value is used for both Synchronous (SCO/eSCO) and ACL connections for the device specified by the Connection Handle. Link_supervision_timeout The value of Link Supervision Timeout parameter to be set. MindTree Limited 7 April 2011 Page 120 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . as identified by the supplied Bluetooth Device Address. These parameters are returned by BT_hci_inquiry) API. Setting the Link Supervision Timeout to 0x0000 will disable the Link Supervision Timeout check for the specified Connection Handle.625 msec.h” API_RESULT BT_hci_remote_name_request ( UCHAR * bd_addr. 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. Description This API is used to get the Name of a remote Bluetooth device. This makes it unnecessary for the Bluetooth Master of the Piconet to unpark and then park each Bluetooth Device every ~40 seconds. Actual Time = link_supervision_timeout * 0. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. the scalability of the Park state is not limited. IN Parameters bd_addr Bluetooth Device Address of the remote Bluetooth device.parameter to monitor link loss.h. Page_scan_repetition_mode page_scan_mode clock_offset The Page Scan Modes and the Clock Offset for the remote Bluetooth device. 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. #include “BT hci api. By using a value of 0x0000 for the Link Supervision Timeout setting. At the end this process. OUT Parameters Function Return Notes None. The local Bluetooth device starts the name retrieval process on reception of the HCI Remote Name Request Command. UCHAR page_scan_mode. no Baseband packets are received from a Connection Handle for duration longer than the Link Supervision Timeout. and sends a Command Status Event to the HCI. UCHAR page_scan_repetition_mode. the Remote Name Request Complete Event is received. If. Value Range = 0x0001 – 0x07FF. A value of 0x0000 means No Link Supervision Timeout at all. UINT16 clock_offset ). for any reason. the connection is disconnected.

None. For details on the Device Under Test Mode. To retrieve the name. Section 7. if the remote device does not have Page Scan enabled. A temporary ACL connection is made if it does not exist.3. an ACL connection is required between the devices. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. Hence this API can fail. Part E – Host Controller Interface Functional Specification. #include “BT hci api. v1. IN Parameters OUT Parameters Function Return Notes None. MindTree Limited 7 April 2011 Page 121 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Vol.2. 2. Description This API enables the local Bluetooth device to enter Device Under Test (DUT) mode via the LMP test Commands. BT_hci_vendor_specific_command Name Synopsis BT_hci_vendor_specific_command(): To send a vendor specific HCI command to the local Bluetooth device. please refer to the Specification of the Bluetooth System.OUT Parameters Function Return Notes None. 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.h. UCHAR * params.h” API_RESULT BT_hci_vendor_specific_command ( UINT16 ocf. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h.h” API_RESULT BT_hci_enable_device_under_test_mode ( void ).6. UCHAR params_length ). This API is available only if HCI_TESTING_COMMANDS compilation flag is enabled during compilation. #include “BT hci api.

The HCI Opcode and parameters are specific to the vendor specific command.h. Refer to the documentation of the Bluetooth device to find out the details of available vendor specific commands. UCHAR reason ). UCHAR accept. ocf Opcode Command Field for the vendor specific Opcode. This parameter must be set to one of the Host Controller Error Codes as described in the Specification of the Bluetooth System. OUT None. 0x01 – accept the incoming link-level (ACL) connection. The valid values are: 0x00 – reject the incoming link-level (ACL) connection. Part D – Error Codes. API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error. reason This parameter specifies the reason for rejecting a connection. Description This API enables applications to accept/reject an incoming link-level connection from a “Untrusted” remote Bluetooth device.h” API_RESULT BT_sm_connection_request_reply ( UCHAR * bd_addr. v1.2. Vol. OUT Parameters Function Return Notes None.Description This API can be used to send vendor specific HCI commands to the local Bluetooth device. 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. 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. None. 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. IN Parameters Params Parameters to be framed for the vendor specific HCI command Params_length Total length of the parameters passed. MindTree Limited 7 April 2011 Page 122 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 2.

the application must call this API with pin_length as 0.h” API_RESULT BT_sm_pin_code_request_reply ( UCHAR * bd_addr. #include “BT sm api. The application can send either a positive or a negative reply to a PIN Code request from the local Bluetooth device (controller).h. None. UCHAR pin_length ). To send a PIN Code Negative Reply. pin This parameter holds the Bluetooth PIN. pin_length This parameter specifies the length of the PIN Code – size of the UCHAR buffer as specified in the parameter pin. Description This API enables applications to furnish Bluetooth PIN for authentication procedure on outgoing link-level connection to a device. but must not be more than 16 octets. 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. IN Parameters bd_addr The Bluetooth Device Address of the remote device.h” API_RESULT BT_sm_get_device_link_key ( UCHAR * bd_addr.h. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. BT_sm_get_device_link_key Name Synopsis BT_sm_get_device_link_key(): To get Bluetooth Link Key for a remote Bluetooth 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 length of PIN Code can be Zero. None. MindTree Limited 7 April 2011 Page 123 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. UCHAR * pin_code. Application can pass NULL only if the pin_length is Zero. and it must be a pointer to an UCHAR buffer. OUT Parameters Function Return Notes None.

h. this flag must be set to 1.h. link_key Caller allocated UCHAR array of 16 octets onto which the device’s Link Key will be copied. None. UCHAR link_key_present ). Description * link key This API enables application to retrieve Link Key for a remote Bluetooth 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. link_key This parameter holds the Bluetooth Link Key. OUT Parameters Function Return None.h” API_RESULT BT_sm_link_key_request_reply ( UCHAR * bd_addr. 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. NULL is an acceptable value. for the specified remote Bluetooth device. to generate the Link Key Request Negative Reply message to the local Bluetooth device. IN Parameters bd_addr The Bluetooth Device Address of the remote (un-trusted) device. if the Bluetooth Link Key. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. UCHAR * link_key. only if the link_key_present is 0. NULL is not an acceptable parameter. If link key is available. is not available. MindTree Limited 7 April 2011 Page 124 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .UCHAR ). link_key_present The application can set this flag to 0. The application can send either a positive or a negative reply to a Link Key request from the local Bluetooth device (controller). which is be used by the Security Manager for authentication procedure during link-level or servicelevel connection to the specified remote device. It must be a pointer to an UCHAR buffer of size 16 octets. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. bd_addr The Bluetooth Device Address of the remote device for which Bluetooth Link Key to be get. Description This API enables applications to furnish the Link Key for authentication procedure on the link-level connection to a device.

API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. authorizing a device for service-level connection etc. 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.Notes None. accept This parameter specifies whether the User Confirmation request for the specified remote Bluetooth device needs to be accepted or rejected. 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.h. during link authentication using Secure Simple Pairing procedure (Numeric Comparison association model). 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. Name Synopsis SM UI Notification Callback #include “BT_sm_api. 0x01 – accept the User Confirmation request. The application can send either accept or reject to a User Conf request from the local Bluetooth device (controller). OUT Parameters Function Return Notes None. UCHAR accept ).h” 7 April 2011 Page 125 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide MindTree Limited . Description This API enables applications to accept/reject User Confirmation request. IN Parameters bd_addr The Bluetooth Device Address of the remote device. None. The valid values are: 0x00 – reject the User Confirmation request.

Detailed description of this parameter is given below. 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. This SM Callback is usually called from the context of EtherMind Read or Write Task. UCHAR * bd_addr. from the local Bluetooth controller. API_RESULT: API_SUCCESS or one of the error codes defined in BT_error. such as calling functions that can block for indefinite period. or. The defined event types are given in SM UI Notification Callback Event Identifiers. UCHAR * bd_addr. from the local Bluetooth controller.h. bd_addr Bluetooth Device Address of the remote device for which this event notification is being raised. and hence any blocking operation in the handling of the callback may seriously hamper the stack’s performance.API_RESULT (* sm_ui_notify_cb) ( UCHAR event_id. IN Parameters event_id This parameter specifies the event that has occurred in the Security Manager module that needs manual user interaction. as identified by its Bluetooth Device Address (BD_ADDR) and Service Identifier Reception of Link Key Request for a remote Bluetooth device. must be performed in the callback function. void * data ). 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 . as identified by remote Bluetooth Device Address (BD_ADDR) Reception of PIN Code Request for a remote Bluetooth device. void * data ). No blocking operations. OUT Parameters Function Return Notes None. typedef API_RESULT (* SM_UI_NOTIFY_CB) ( UCHAR event_id. takes considerable amount of time. data This parameter contains information specific to the event_id being notified.

while the Security Mode of the SM is either 1 or 3. SDK_DEBUG_PRINT_STRING("Bluetooth turned ON\n". This code snippet is shown below: API_RESULT sdk_bluetooth_on_complete(void) { API_RESULT retval. (const UCHAR *)"Registering UI Notification Callback .. /* Register SM callback handler */ sdk_display(SDK_MSG_AREA.20). A passkey is required.. as identified by its Bluetooth Device Address (BD_ADDR) and Service Identifier User confirmation of a numeric value is required. 0). 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 . retval = BT_sm_register_user_interface(sdk_sm_ui_notify_cb). 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”. ".Device Address (BD_ADDR) SM_AUTHORIZATION_REQUEST_NTF_MODE_1_3 Incoming service-level connection request received from a remote Bluetooth device. 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 Numeric Comparison association model is being used during Secure Simple Pairing (SSP).

mode of operation (read . The Security Manager invokes the sm_storage_read() function during Bluetooth ON [BT_bluetooth_on()] procedure. These functions are present as part of BT_SDK_DIR\bluetooth\export\common_appl\sm_storage_pl. The sm_storage_write() is responsible for writing various Security Manager configuration parameters to the persistent storage media.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 . UINT16 nb) Description: Function to write to the persistent storage IN parameters: p . void sm_ps_read(UCHAR * p. void sm_ps_close(void) Description: Function to close the operations on persistent storage IN parameters: None OUT parameters: None 3. void sm_ps_open(SDK_SM_PS_OPEN_MODES mode) Description: Function to initialize the persistent storage for reading or writing IN parameters: mode . This signature is 4 bytes in length and is set to 0xCAFEBEDA.PS_READ or write .PS_WRITE) OUT parameters: None 2.c 1.Address of buffer OUT parameters: nb .Number of bytes to be written to persistent storage 4.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.Address of buffer OUT parameters: nb . Interface functions to open and close the persistent storage are defined as sm_ps_open() and sm_ps_close(). 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. are present as part of The functions listed below need to customized by the end user.c. The sm_storage_read() and sm_storage_write() functions BT_SDK_DIR\bluetooth\export\common_appl\sm_storage_pl. UINT16 nb) Description: Function to read from the persistent storage IN parameters: p . EEPROM or equivalent). The SM adds a signature to the start of the persistent storage location. void sm_ps_write(UCHAR * p.

/** Newly Allocated / Existing / Unallocated ? */ UCHAR valid.Unused * Bit 3-4: whether Encryption is performed for this device * * * * 00 . 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.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 .The sm_storage_open().Pt-to-Pt Encrypted 10 .Not Encrypted 01 .h. which is an array of SM_DEVICE_ENTITY. The Security Manager Device Database can be accessed by referencing the ‘sm_devices’ global variable.Pt-to-Pt & Broadcast Encrypted (Unused) 11 .Authentication in progress 11 . This structure is defined in sm_internal.Authenticated 10 . sm_storage_read() and sm_storage_write() are used by the EtherMind library to implement the persistent storage. * Bit 1-2: whether Authentication is performed for this device * * * * 00 .Not Authenticated 01 . /** ACL Connection Handle for the Device */ UINT16 acl_handle. /** * Device Attributes of this Device Database entry: * Bit 0: Trusted or Untrusted. sm_storage_close().

} SM_DEVICE_ENTITY. /** BD_ADDR of the Device */ UCHAR bd_addr [BT_BD_ADDR_SIZE]. #ifdef BT_SSP /** Last received IO Capability of Remote Device */ SM_IO_CAPS remote_io_cap. /** Type of Link Key */ UCHAR link_key_type.* Bit 6: whether ACL connection is locally or remotely originated * Bit 7: whether ACL connection initiated and completion is awaited */ UCHAR device_attr. /** PIN Code for the Device */ UCHAR pin_code [BT_PIN_CODE_SIZE]. #endif /* BT_SSP */ /** Link Key for the Device */ UCHAR link_key [BT_LINK_KEY_SIZE]. MindTree Limited 7 April 2011 Page 130 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . Normally they are not populated. which is an array of SM_DEVICE_ENTITY. /** Length of Device's Name */ UCHAR name_length. PIN Code and their respective lengths in the sm_devices structure are not mandatory fields. Device Name. /** Length of Device's PIN Code */ UCHAR pin_length. 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. /** Name of the Device */ UCHAR name [SM_DEVICE_NAME_SIZE]. Device Name.

/** To get Bluetooth PIN (Passkey) for a remote Bluetooth device */ API_RESULT BT_sm_get_device_pin_code(UCHAR * bd_addr. /** To set Bluetooth PIN (Passkey) for a remote Bluetooth device */ API_RESULT BT_sm_set_device_pin_code(UCHAR * bd_addr. the services peer device support etc.The name field is not mandatory. b. Moreover. d. 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 . /** To get name for a remote Bluetooth device */ API_RESULT BT_sm_get_device_name(UCHAR * bd_addr. 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 name of the remote device. EtherMind stack also provides following related interfaces: a. UCHAR * pin. UCHAR name_length). along with may be Class Of Device. UCHAR * name. UCHAR * pin_length). UCHAR * name.. can be used to identify the peer device and not the name of the device. UCHAR pin_length). for the security manager functionality. /** To set name for a remote Bluetooth device */ API_RESULT BT_sm_set_device_name(UCHAR * bd_addr. c. UCHAR * name_length). Apart from that applications many times wants to save Name of a peer device. only the Bluetooth Device Address BD_ADDR. In case the application wants to set/access these PIN and name related fields of the sm_devices structure.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. The single common PIN code used for all the devices is maintained separately and not as part of the sm_devices structure). as not all the devices have capability to display (or tell .using Text to Speech etc. . UCHAR * pin. in different structures.

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

from ‘sm_devices’ (2) For each trusted device. The ‘sm_devices’ is defined in sm_extern.UCHAR Bluetooth PIN Code can have a maximum of 16 octets. it is advisable to write always 16 octets for the device’s PIN Code. SM Device Name is an array of size SM_DEVICE_NAME_SIZE (defined in BT_limits. Device’s PIN Code Length – UCHAR h. only BT_PIN_CODE_SIZE (or. The ‘Trusted’ Devices will be remembered and re-configured in the SM Device Database next time when Bluetooth ON is called. The Security Manager Device Database can be accessed by referencing the ‘sm_devices’ global variable. sm_ps_read() and sm_ps_write() functions to save the required information to the flash. the Security Manager does not provide a mechanism to count number of devices that are marked to be ‘trusted’. shutdown of the system. when reading. if any. Device’s PIN Code – UCHAR array of BT_PIN_CODE_SIZE octets i. sm_ps_close(). As of now. with 0x00.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.h) to be less than 16. write/read the following information: a. Device’s Link Key Type – UCHAR d. 16 octets should be read from the persistent storage. Device’s Name Length – UCHAR f. however. Device’s Link Key – UCHAR array of 16 octets c. Device’s Trust – UCHAR e. and pad the remaining octets.h.h) The library utilizes the sm_ps_open(). Device’s Rank .h under bluetooth\private\protocols\sm subdirectory) of size SM_MAX_DEVICES (defined in BT_limits. Similarly.UCHAR array of SM_DEVICE_NAME_SIZE octets g. whichever is less) number of octets should be copied to device’s PIN Code. and/or. This can be customized by the user as needed. which is an array of SM_DEVICE_ENTITY (defined in sm_internal. device’s PIN Code length.h). SM Device Database needs to be scanned to find this information. Device’s Name . Procedure for writing/reading trusted device information is described below: (1) Write/read the number of trusted devices. When the BT_PIN_CODE_SIZE is configured (in BT_limits. Hence. Device’s BD_ADDR – UCHAR array of 6 octets b. MindTree Limited 7 April 2011 Page 133 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .

com/litv/pdf/slau208f and several code examples to show how it is done are available at http://www.com/lit/zip/slac375 MindTree Limited 7 April 2011 Page 134 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .ti.Writing to the MSP430F5438A flash is fully documented as part of the 5xx user’s guide available at http://www.ti.

0x80. 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. 0x34. 0x5F. 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. 0x80. 0x00. /** * UUID Index 02 : * ( 0x1000 ) -> ServiceDiscoveryServerServiceClassID */ {0x00.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. 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. 0x03. The provided db_gen. 0x80. 0xFB}. 0x5F. 0x80. 0x00. Each entry corresponds to an SDP Service Record. 0x00. as defined in the Bluetooth SPP specification. 0x00. 0x10.h files. 0x01. 0x00. 0x00. 0xFB}. 0x00. 0x34. By default. 0x00. 0x00. All are 128-bit UUID. There are two records. 0x00. 0x00. 0x00. 0x80. 0x10. one for SDP Server itself and other one for SPP All the UUIDs used in the SDP database are defined in this array. 0x9B. 0x10. 0x00. 0x9B.c file contains the definition of the SPP SDP Service Database Record. 0x00. 0x00. 0x5F. 0x00. 0x00. 0x9B. 0x80. 0x00. 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 . 0x34. 0x10. /** * UUID Index 01 : * ( 0x0100 ) -> L2CAP */ {0x00. 0x00. 0x00.

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

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

0x01 is the SPP server channel. 0x00. To change the server channel value to 0x05. 0x0C. 0x50. 0x65. 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). 0x4D. 0x30. 0x00 Interpretation of the attribute value 0x25 -> Represents Text String whose data size is contained in the additional 8-bits. 0x03. 0x19. 0x50. 0x65. 0x42. 0x0B. 0x35. ‘value_arr[]’ as explained above stores all the attribute values and the 0x0014. 0x76. By default. 0x65. 0x63. 0x33. 0x65. 0x05. 0x30. 0x69. 0x00. is the start index of ServiceClassIDList attribute value in ‘value_arr[]’. 0x08. How do I change the SPP Server Channel? SPP Server channel is part of the ‘ProtocolDescriptorList’ attribute In the value_arr[]. 0x19.The first element 0x0001 represents ServiceClassIDList Attribute. 0x0B -> Text String Length 0x0B (i. These are interpreted as an unsigned integer. 11 in decimal) 0x42. 0x35. 0x00 MindTree Limited 7 April 2011 Page 138 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 0x03. 0x6C. 0x4D. 0x72. along with the actual text string of length 0x0B] To change the ServiceName attribute value to say. 0x03. 0x00 -> Text String “BlueMSP430” Corresponding. attribute ids are listed in ascending order. 0x33. 0x53.e. 0x00. 0x34. 0x75. 0x05. After the change the ‘ProtocolDescriptorList’ attribute value in value_arr[] will become /* ProtocolDescriptorList */ 0x35. 0x35. 0x4D. 0x00. 0x79. 0x53. 0x01. “MyService” Change the length from 0x0B to 0x0A The modified ServiceName attribute value in value_arr[] will be as follows /* ServiceName */ 0x25. 0x19.‘ProtocolDescriptorList’ attribute value is defined as follows /* ProtocolDescriptorList */ 0x35. 0x01. 0x0C. 0x19. 0x6C. The third element ‘value_arr + 0x0014’ points to the location where the corresponding attribute value is stored. 0x75. entry in the attr_arr[] is /* ServiceName */ {0x0100. 0x35. 0x03. The second element 0x0005 represents the attribute value length. replace 0x01 with 0x05. 0x000D. 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. 0x0A. 0x53. 0x08. 0x05. 0x34. 0x01. For each SDP service record.

0x00. 0x80. 0x66. 0xFB}. 0x00. 0x22. 0x34. 0x5F. 0x00. 0x80. 0x01. /* ServiceName */ {0x0100. 0xCC. 0x00. 0x34. 0x10. 0x11. 0x80. 0x00. 0x00. 0x00. 0x99. 0x00. 0x00. 0x9B. 0xFB}. 0x34. 0x9B. 0x33. /** * UUID Index 04 : * ( 0x1101 ) -> SerialPort */ {0x00. 0x9B. 0x00. 0xBB. 0x00. 0x00. 0x00. 0x00. 0x00. 0x00. 0xFB}. 0x00. /** * UUID Index 01 : * ( 0x0100 ) -> L2CAP */ {0x00. 0x00. 0xFB}. 0x34. 0x00. 0x01. 0x00. 0x9B. as shown below /** List of all required UUIDs */ const UCHAR uuid_128_arr[DB_MAX_UUIDS][16] = { /** * UUID Index 00 : * ( 0x0003 ) -> RFCOMM */ {0x00. 0x80. /** * UUID Index 02 : * ( 0x1000 ) -> ServiceDiscoveryServerServiceClassID */ {0x00. 0x00. 0x00. 0x10. 0x88. 0x80. as the text string length has reduced from x0B to 0x0A. 0x34. 0x5F. 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[][]. 0x5F. 0x00. 0x00. 0x5F. /** * UUID Index 05 : * ( 0x00112233445566778899AABBCCDDEEFF ) -> Custom 128-bit UUID */ {0x00. 0x5F. 0xFB}. 0x02. 0x11. 0x80. 0xFF} MindTree Limited 7 April 2011 Page 139 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 0x00. 0x10. 0x44. 0x80. 0x10. 0x10. 0xDD. 0x00. 0x00. 0x80. 0xEE. 0x9B. 0x00. 0x00. 0x00. 0x00. 0x55. /** * UUID Index 03 : * ( 0x1002 ) -> PublicBrowseGroup */ {0x00. 0x00. 0xAA.Corresponding. 0x00. 0x77. 0x000C. 0x80. 0x10. 0x10. entry in the attr_arr[] also should be changed to update the length from 0x000D to 0x000C. 0x80. 0x03.

Update the value of num_128_ids from 5 to 6 num_128_ids = 6. 5 MindTree Limited 7 April 2011 Page 140 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .}.e. dbase[1].num_uuids = 4. /** Service Record 1 */ 0. dbase[1].active = DB_RECORD_INACTIVE. dbase[1].num_uuids = 5.num_attrs = 6.rec_handle = 0x00090001. dbase[1]. dbase[1]. dbase[1]. 5) to the SPP Record /* UUID indices array */ const UCHAR uuid_indices_arr[] = { /** Service Record 0 */ 2.rec_handle = 0x00090001.active = DB_RECORD_INACTIVE. dbase[1].h file #define DB_MAX_UUIDS 6 Associate the index of the new UUID (i. 1. Modified definition /* * SDP Record * Of * SPP Profile */ dbase[1]. 4.num_attrs = 6.attr_offset = 3. 3. Change the definition of DB_MAX_UUIDS from 5 to 6 in db_gen. dbase[1]. Update the number of UUIDs for SPP Service record from 4 to 5 Default value /* * SDP Record * Of * SPP Profile */ dbase[1].attr_offset = 3.

0xCC. 0x99. 0x11. 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. 0x77. 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 . which are interpreted as an unsigned integer. 0x19. 0x0005. 0x44. 0x11.e. 0x00. 0x03 -> Length 0x03 (i. 0x01. value_arr + 0x0014}. 0x14.}. 033. as defined in the Assigned Number Corresponding. 0x03. 0x66. To include the custom UUID 0x00112233445566778899AABBCCDDEEFF in the ServiceClassIDList update the ServiceClassIDList of the SPP Record in value_arr[] as follows /* ServiceClassIDList */ 0x35. 0xDD. 3 in decimal) of the attribute value 0x19 -> 16-bit UUID 0x11 0x01 -> SPP 16-bit UUID (0x1101). 0xBB. 0x1C. Currently the ServiceClassIDList of the SPP Record is defined in value_arr[] as follows /* ServiceClassIDList */ 0x35. 0x14 -> Length 0x14 (i.e. 0x88. 0xAA. 0x0005 is the length of the corresponding attribute value [which includes the Data Element Sequence type (0x35) and the length (0x03). 0x01. entry in the attr_arr[] is /* ServiceClassIDList */ {0x0001. 0x22. 20 in decimal) of the attribute value 0x19 -> 16-bit UUID 0x11 0x01 -> SPP 16-bit UUID (0x1101). 0x11. 0x19. 0xFF Interpretation of the attribute value 0x35 -> Represents SDP Data Element Sequence data structure whose data size is contained in the additional 8 bits. 0xEE. along with the UUID (0x1101). 0x55.

/* VersionNumberList */ {0x0200. value_arr + 0x0027}. entry in the attr_arr[] also should be changed to update the length from 0x0005 to 0x0016. 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 . as a new 128-bit UUID is added. 0x0005. value_arr + 0x0014}. /* ServiceClassIDList */ {0x0001.0x00 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF-> Custom 128-bit UUID Corresponding. 0x0005. value_arr + 0x000F}. value_arr + 0x002C}. /* BrowseGroupList */ {0x0005. 0x0005. 0x000B. 0x0005. 0x0016. Current default definition /* Attribute structure array */ const struct attr attr_arr[] = { /** Service Record 0 */ /* ServiceRecordHandle */ {0x0000. value_arr + 0x000A}. This additional 17 bytes offset has to be added in all sub-sequent attributes in the attr_arr[]. value_arr + 0x0014}. /* ProtocolDescriptorList */ {0x0004. 0x0005. /* ServiceClassIDList */ {0x0001. value_arr + 0x0005}. /* ServiceName */ {0x0100. in the ServiceClassIDList attribute value. /* ServiceClassIDList */ {0x0001. With this change there is addition of 17 bytes. /* LanguageBaseAttributeIDList */ {0x0006. 0x000D. value_arr + 0x0000}. 0x000E. /** Service Record 1 */ /* ServiceRecordHandle */ {0x0000. value_arr + 0x0019}. value_arr + 0x0037} }. 0x0005.

/** Service Record 0 */ /* ServiceRecordHandle */ {0x0000. value_arr + 0x000A}. 0x0005. 0x000D. /* VersionNumberList */ {0x0200. 0x0005. value_arr + 0x0037 + 17} }. /* LanguageBaseAttributeIDList */ {0x0006. value_arr + 0x0005}. /* ServiceName */ {0x0100. 0x0005. /** Service Record 1 */ /* ServiceRecordHandle */ {0x0000. 0x0005. value_arr + 0x0000}. /* ServiceClassIDList */ {0x0001. /* ServiceClassIDList */ {0x0001. 0x000E. value_arr + 0x000F}. /* ProtocolDescriptorList */ {0x0004. value_arr + 0x002C + 17}. value_arr + 0x0027 + 17}. value_arr + 0x0014}. value_arr + 0x0019 + 17}. MindTree Limited 7 April 2011 Page 143 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 0x0005. 0x0016. 0x000B. /* BrowseGroupList */ {0x0005.

UART1 . The snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on(). Once the BT “ON” is notified on the registered call back (sdk_bluetooth_on_complete ) inquiry scan type is changed to interlaced scanning. In case of the EZ430-RF2560. The steps to do this are documented at http://FreeRTOS. } 2.org Explanation of the Sample Temperature Application The following are the important steps involved in sending temperature data over SPP Connection: 1.UART2 for interfacing with the CC2560 controller Optional Resources The other resources used by the sample applications are optional. 0). These resources are . 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). The software is completely interrupt driven and does not rely on software ticks. Once the inquiry scan is completed. In case software ticks are required. 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 . this may be introduced by adding an extra timer. Bluetooth is turned “ON” by invoking the function “BT_bluetooth_on”. if (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS.Timer1_A3 – To implement LPM . the ADC is used to read the data from the accelerometer or temperature sensor. change write page scan mode to interlaced scanning. } 3. the I2C interface is used to read the data from the accelerometer. if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA.To send the accelerometer data to the PC over the USB interface In case of the MSP-EXP430F5438+PAN1315EMK. (const UCHAR *)"Failed to set inquiry scan type\n".MSP430 resources used by the Sample SPP applications Mandatory Resources The EtherMind Bluetooth SDK needs only the following MSP430 resources to work .

(const UCHAR *) "Failed to initiate Inquiry\n". } page scan 4. sdk_print_message((const UCHAR *) "Error:Failed to initiate Inquiry\0"). } 5. The code segment for handling HCI inquiry result event handler is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type. Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned “ON”.. UCHAR * event_data. if (API_SUCCESS == retval) { sdk_bt_visible = SDK_DISC_ON.Wait for Completion\n". page scan repetition mode and clock offset of each device that is indicated with “HCI_INQUIRY_RESULT_EVENT” event. In the hci event callback note the peer Bluetooth device address. 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). } return API_SUCCESS. Inquiry is initiated to discover the peer Bluetooth devices.. SDK_NUM_RESPONSES). The code segment for performing  inquiry process is as shown below:  retval = BT_hci_inquiry(SDK_INQUIRY_LAP. UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_RESULT_EVENT: hci_inquiry_result_event_handler(event_data). } else { sdk_display(SDK_MSG_AREA. 0)./* Change write Page Scan mode (Interlaced scanning = 0x01)*/ retval = BT_hci_write_page_scan_type(scan_type). break. } MindTree Limited 7 April 2011 Page 145 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .(const UCHAR *)"Failed to set type\n". 0). (const UCHAR *) "Inquiry Started. if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. SDK_INQUIRY_LEN. 0). if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. } 6.

UCHAR * event_data. The code segment for handling HCI inquiry complete event is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type. break. UCHAR * event_data. page scan repetition mode and clock offset. Once the required peer Bluetooth device is found during inquiry. retval). }   10. “HCI_INQUIRY_COMPLETE_EVENT” event is received in the hci event indication callback.  HCI remote name request is issued with the peer Bluetooth Device address.7. } 8. After Inquiry is completed. } 9. clock_offset). if (retval != API_SUCCESS) { printf("Remote Name Request FAILED !! Error Code = 0x%04x\n". 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. } return API_SUCCESS. ACL Connection to this device is initiated with its bluetooth address. Remote Bluetooth device name is indicated in with hci event indication callback with “HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT” event . MindTree Limited 7 April 2011 Page 146 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . event_datalen). packet_type. break. UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_COMPLETE_EVENT: hci_inquiry_complete_event_handler (event_data). } return API_SUCCESS. 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. page_scan_mode. page_scan_rep_mode. The code segment for initiating ACL connection is as shown below:  ret_val = BT_hci_create_connection(&bd_addr. 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.

Remote Server Channel Number is obtained in the SDP Callback registered during SDP Open. printf("Getting SPP Server Channel . 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. UINT8 * data. In the SPP callback registered during SPP Initialization.  Successful ACL connection is handled as part of appl_acl_connection_complete_event (). fflush(stdout). The code segment for obtaining the remote server channel number in SDP is as shown below: void appl_spp_sdp_callback(UINT8 command. num_attribute_id_range. &attribute_ids. The code segment for initiating SPP connection is as shown below:    retval = BT_spp_connect(&bd_addr. } MindTree Limited 7 April 2011 Page 147 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .\n"). clock_offset. IN API_RESULT result. &attribute_id_range.. The code segment for handling “SPP_CONNECT_CNF” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. SPP Connection is initiated using the remote server channel number and peer Bluetooth Device address. } } 13.page_scan_repetition_mode. &uuids.   14..   11. SPP_CONNECT_CNF event is received. 12. ret_val = BT_sdp_servicesearchattributerequest (&handle. allow_role_switch). &server_ch). "). &attribute_data. IN SPP_EVENTS event_type. The code segment for opening SDP channel and performing SDP service search request as shown below:  ret_val = BT_sdp_open (&sdp_handle). num_attribute_ids. server_ch). num_uuids. UINT16 length. &len_attribute_data). retval = BT_sdp_get_channel_number(data. UINT16 status) { switch (command) { case SDP_ServiceSearchAttributeResponse: printf("Received Response for SDP SSA Request for SPP. page_scan_mode.

IN UINT16 datalen) { switch (event_type) { case SPP_SEND_CNF: printf("SPP_SEND_CNF -> Sent successfully\n"). IN SPP_EVENTS event_type. When the SPP is disconnected. On the peer device. in the SPP callback registered during SPP initialization. in the SPP call back. IN void *data. SPP_CONNECT_IND” is received. } }   18. IN void *data. IN API_RESULT result.   17. “SPP_DISCONNECT_CNF” is received in the SPP callback registered during SPP initialization. IN API_RESULT result. IN void *data. MindTree Limited 7 April 2011 Page 148 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . } }   16. The code segment for handling “SPP_CONNECT_IND” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN UINT16 datalen) { switch (event_type) { case SPP_RECVD_DATA_IND: printf("SPP_RECVD_DATA_IND -> Data received successfully\n"). IN API_RESULT result. SPP_SEND_CNF event is received on transmitting a data packet.}   15. In the SPP callback registered during SPP Initialization. The code segment for handling “SPP_SEND_CNF” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN API_RESULT result. 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. SPP_RECVD_DATA_IND is received. SPP data read from the temperature sensor is sent on the created SPP channel. } }   19. The code segment for handling “SPP_DISCONNECT_CNF” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. The code segment for sending the thermometer data over SPP is as shown below: appl_send_spp_data(dev_index). On the peer device. IN SPP_EVENTS event_type. IN SPP_EVENTS event_type. IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle.

IN void *data. IN API_RESULT result. “SPP_DISCONNECT_IND” is received on SPP disconnect. } }   20. IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"). IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_CNF: printf("SPP_DISCONNECT_CNF -> Disconnection Successful\n"). 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 void *data. On the peer device. } }   MindTree Limited 7 April 2011 Page 149 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .

if (API_SUCCESS == retval) { sdk_bt_visible = SDK_DISC_ON. 0). (const UCHAR *) "Failed to initiate Inquiry\n". 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. } 3.(const UCHAR *)"Failed to set page scan type\n". (const UCHAR *)"Failed to set inquiry scan type\n". } 4. Once the inquiry scan is completed.the snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on(). Bluetooth is turned “ON” by invoking the function “BT_bluetooth_on”. The code segment for performing inquiry process is as shown below: retval = BT_hci_inquiry(SDK_INQUIRY_LAP. 0). } 5. if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. change write page scan mode to interlaced scanning. } 2. MindTree Limited 7 April 2011 Page 150 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. 0). if (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS. Inquiry is initiated to discover the peer Bluetooth devices. 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). 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).  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. SDK_NUM_RESPONSES). Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned “ON”. SDK_INQUIRY_LEN.

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. } 7. UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_COMPLETE_EVENT: hci_inquiry_complete_event_handler (event_data). “HCI_INQUIRY_COMPLETE_EVENT” event is received in the hci event indication callback. 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. In the hci event callback note the peer Bluetooth device address. UCHAR * event_data. UCHAR * event_data. UCHAR event_datalen) MindTree Limited 7 April 2011 Page 151 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . page scan repetition mode and clock offset of each device that is indicated with “HCI_INQUIRY_RESULT_EVENT” event. page_scan_rep_mode. } 6. UCHAR * event_data. } else { sdk_display(SDK_MSG_AREA. After Inquiry is completed. HCI remote name request is issued with the peer Bluetooth Device address. break. UCHAR event_datalen) { /* Switch on the Event Code */ switch (event_type) { case HCI_INQUIRY_RESULT_EVENT: hci_inquiry_result_event_handler(event_data).Wait for Completion\n". The code segment for handling HCI inquiry result event handler is as shown below: API_RESULT sdk_hci_event_indication_callback(UCHAR event_type.. 0). break. The code segment for handling HCI inquiry complete event is as shown below:  API_RESULT sdk_hci_event_indication_callback(UCHAR event_type. clock_offset). } return API_SUCCESS. (const UCHAR *) "Inquiry Started.sdk_print_message((const UCHAR *) "Error:Failed to initiate Inquiry\0"). } 9.. } 8. } return API_SUCCESS. retval). if (retval != API_SUCCESS) { printf("Remote Name Request FAILED !! Error Code = 0x%04x\n". Remote Bluetooth device name is indicated in with hci event indication callback with “HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT” event . page_scan_mode.

ACL Connection to this device is initiated with its bluetooth address.\n"). event_datalen). }   10. UINT16 length. 12. } return API_SUCCESS. The code segment for obtaining the remote server channel number in SDP is as shown below: void appl_spp_sdp_callback(UINT8 command. The code segment for opening SDP channel and performing SDP service search request as shown below:  ret_val = BT_sdp_open (&sdp_handle).{ /* Switch on the Event Code */ switch (event_type) { case HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT: hci_remote_name_request_complete_event_handler(event_data. fflush(stdout). The code segment for initiating ACL connection is as shown below: ret_val = BT_hci_create_connection(&bd_addr. server_ch). break. Once the required peer Bluetooth device is found during inquiry. clock_offset. &attribute_ids. num_uuids. &attribute_data. page_scan_repetition_mode. UINT16 status) { switch (command) { case SDP_ServiceSearchAttributeResponse: printf("Received Response for SDP SSA Request for SPP. &uuids. packet_type. &len_attribute_data). retval = BT_sdp_get_channel_number(data..   MindTree Limited 7 April 2011 Page 152 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .   11. "). page scan repetition mode and clock offset. num_attribute_id_range. &server_ch). printf("Getting SPP Server Channel .  Successful ACL connection is handled as part of appl_acl_connection_complete_event (). num_attribute_ids. } } 13. page_scan_mode. The code segment for initiating SPP connection is as shown below:   retval = BT_spp_connect(&bd_addr. UINT8 * data.. &attribute_id_range. Remote Server Channel Number is obtained in the SDP Callback registered during SDP Open. ret_val = BT_sdp_servicesearchattributerequest (&handle. allow_role_switch). SPP Connection is initiated using the remote server channel number and peer Bluetooth Device address.

On the peer device. The code segment for handling “SPP_RECVD_DATA_IND” is as shown below:  API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. } }   15. IN void *data. The code segment for sending the accelerometer data over SPP is as shown below: appl_send_spp_data(dev_index).   17. SPP data read from the accelerometer sensor is send on the created SPP channel. 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 . The code segment for handling “SPP_SEND_CNF” is as shown below:  API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN API_RESULT result. } }   18. The code segment for handling “SPP_CONNECT_CNF” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. In the SPP callback registered during SPP Initialization. SPP_SEND_CNF event is received on transmitting a data packet.14. IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_CNF: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle. IN SPP_EVENTS event_type. On the peer device. IN SPP_EVENTS event_type. IN API_RESULT result. IN void *data. IN SPP_EVENTS event_type. SPP_RECVD_DATA_IND is received. IN UINT16 datalen) { switch (event_type) { case SPP_SEND_CNF: printf("SPP_SEND_CNF -> Sent successfully\n"). in the SPP callback registered during SPP initialization. IN void *data. IN API_RESULT result. in the SPP call back. 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. SPP_CONNECT_CNF event is received. SPP_CONNECT_IND” is received. In the SPP callback registered during SPP Initialization. } }   16. IN API_RESULT result. IN UINT16 datalen) { switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle.

“SPP_DISCONNECT_CNF” is received in the SPP callback registered during SPP initialization.case SPP_RECVD_DATA_IND: printf("SPP_RECVD_DATA_IND -> Data received successfully\n"). IN API_RESULT result. The code segment for handling “SPP_DISCONNECT_IND” is as shown below:  API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN void *data. “SPP_DISCONNECT_IND” is received on SPP disconnect. IN SPP_EVENTS event_type. The code segment for handling “SPP_DISCONNECT_CNF” is as shown below:  API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_CNF: printf("SPP_DISCONNECT_CNF -> Disconnection Successful\n"). } }   MindTree Limited 7 April 2011 Page 154 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . } }   20. IN SPP_EVENTS event_type. } }   19. IN void *data. IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"). When the SPP is disconnected. IN API_RESULT result. On the peer device.

0).Explanation of the Simple Application Important steps involved in sending data over SPP Connection: 1. The code segment for handling ACL connection complete event is shown below: appl_acl_connection_complete_event(bd_addr. } 2. IN void *data. Once the inquiry scan is completed. Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be established is turned “ON”. Once the BT “ON” is notified on the registered call back (sdk_bluetooth_on_complete) inquiry scan type is changed to interlaced scanning. IN UINT16 datalen) { MindTree Limited 7 April 2011 Page 155 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . IN SPP_EVENTS event_type. } 3. In the SPP call back. status. The code segment for handling “SPP_CONNECT_IND” is as shown below: API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. IN API_RESULT result. if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. } 5. (const UCHAR *)"Failed to set inquiry scan type\n". SPP_CONNECT_IND” is received. ACL Connection complete event handler is triggered bluetooth address.the snap shot of the code segment is as shown below: /* Turn ON the bluetooth */ retval = sdk_bluetooth_on().(const UCHAR *)"Failed to set page scan type\n". change write page scan mode 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 (API_SUCCESS == retval) { sdk_bt_power = SDK_BT_ON_IN_PROGRESS. if (retval != API_SUCCESS) { sdk_display(SDK_MSG_AREA. 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. } 4. 0). connection_handle). status and connection handle. Bluetooth is turned “ON” by invoking the function “BT_bluetooth_on”. 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). Once the peer Bluetooth device initiates the SPP connection. 6.

switch (event_type) { case SPP_CONNECT_IND: /* SPP is successfully connected */ /* Note the SPP Connection handle */ spp_connection_handle = handle. SPP data is sent on the created SPP channel. 8. } } 7. IN SPP_EVENTS event_type. The code segment for handling “SPP_DISCONNECT_IND” is as shown below:  API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle. “SPP_DISCONNECT_IND” is received on SPP disconnect. IN UINT16 datalen) { switch (event_type) { case SPP_DISCONNECT_IND: printf("SPP_DISCONNECT_IND -> Disconnection Successful\n"). IN void *data. If the peer device initiates SPP disconnection. IN API_RESULT result. The code segment for sending the data over SPP is as shown below: appl_send_spp_data(dev_index). } } 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

r43. Define the macros to write some information to a predefined area in the memory to trace the functionality.r43 and libTI_init_script_BT_CC2567.r43.Macros for debugging The following macros have been declared for debugging purposes as part of sdk_bluetooth_common_config. The four libraries corresponding to these silicon versions are supplied as part of the SDK. They are named as libTI_init_script_BT_CC2560. The macros then have to be inserted at appropriate points in the code to help with the debugging. The CC2560 silicon will report a value of 0x1F02. The screen shot for this is shown below: MindTree Limited 7 April 2011 Page 165 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . The following are some possibilities: 1. libTI_init_script_BT_CC256x. exclusion or inclusion is done by right clicking on the specific library and using the “Exclude from build” option. Support for CC2560. while building the application. With IAR. These silicons are supported by choosing the appropriate vendor specific library and excluding the other vendor specific libraries related to other silicon. Define the macros such that they can output characters to the PC using the USB connection. CC2564 and CC2567 devices The EtherMind SDK supports the following silicon versions of the Bluetooth controller: 1.h SDK_DEBUG_PRINT_STRING SDK_DEBUG_PRINT_CHAR SDK_DEBUG_MODULE_INIT The macros have no action defined against them. CC2567 (BT + ANT) The silicon version is displayed on the Temperature package in the Bluetooth > Diagnostics menu. Define the macros such that they can toggle some GPIO lines that can be used to trace the functionality 3. CC256x. CC256x (BT only) 3. 2. The user can customize these macros as needed to help in debugging the application built using the SDK.r43. libTI_init_script_BT_CC2564. CC2564 (BT + LE) 4. CC2560 (BT only – deprecated silicon version) 2.

3. Download the image on to the target board 2. 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 . The PAN1315 datasheet contains detailed info on these powering options. Turn ON the Bluetooth device visibility on the target board.1 dongle to the PC 5. Full-DC2DC and mixed VBAT and DC2DC.Support for CC256x Power Circuitry The CC256x supports three power circuitries: Full-VBAT. 4. This SDK supports only Full-VBAT and Full-DC2DC options. Turn ON Bluetooth on the target board. Open Device Manager. 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. Connect the Bluetooth 2.

This screen shot is shown below: 7. Change the name of the device in the Advance tab to match the selection defined as part of sdk_bluetooth_config. 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 . Search for remote devices using the PC and add the required device 8.h under the #define SDK_REM_DEV_NAME_PREFIX.6.

It is calculated by setting a GPIO at the start of Bluetooth ON sequence and resetting at the successful completion of Bluetooth ON sequence. 4. It is calculated with a GPIO signal using an oscilloscope. 3. 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. 5.225 NOTE: Only one frequency has been chosen for calculating the BT initialization time since the change in frequency does not affect it significantly. 7. Change in frequency (8/12/18/25MHz) results only in a change in the order of milliseconds with respect to the initialization times. The initialization time is in the order of seconds. 2. MindTree Limited 7 April 2011 Page 168 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .38 with embedded LPS and EHCILL commands.85 0.575 0. 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. The high time of the GPIO signal indicates the Bluetooth initialization time. 9. 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. 6. 8.00 0.Performance Analysis 1. The initialization time is defined as the time taken for turning ON the Bluetooth device using the following commands: 1.

CPU Utilization Calculation CPU utilization is the time spent by the processor in executing Bluetooth related tasks. Time spent is calculated using the below mentioned formula: Time spent = Counter Value / Counter’s input clock frequency In the current setup.2 115.2 921.2 115.16 12.27 MindTree Limited 7 April 2011 Page 169 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .37 10. This is sent continuously over a single SPP connection in active mode.42 10. To do this. a sample application is created with the static payload size set to 110 bytes. % 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. a hardware counter is used.70 9.2.2 115. To calculate the time spent in the block of code.6 %CPU Utilization 14. Counter is started before the start of code and stopped just after the completion of execution of code.

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 .3. Information on Code & Data sizes The code and data sizes were calculated based on IAR EW430 MSP tool chain version 5.

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

      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.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 .0 Air sniffer (Basic) software with FTS dongle connected to the PC.2 Kbps 25MHz @ 115. Data transfer is sniffed for a period of 2 minutes.   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 18MHz @ 115. Details:  Frontline FTS4BT 7. Throughput measurements Throughput is the expression of how much amount of data is sent or transacted during a definite period of time.12. FTS is used to sniff the data being transferred between the PTS dongle and the MSP430 device. is used for measuring throughput. SPP data is sent from master to slave in active mode. This is a static buffer and is continuously sent on a confirmation event. SPP Packet payload length for data transfer is 110 bytes.2 Kbps 25MHz @ 921.2 Kbps 12MHz @ 115.4.1 dongle on the PC and the MSP430 device.15.

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 .

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 . Click on the required project tab in the workspace window.

   MindTree Limited 7 April 2011 Page 175 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.

     The debugger should connect to the target.   MindTree Limited 7 April 2011 Page 176 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . loads the image and open the debugger view.

MindTree Limited 7 April 2011 Page 177 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.

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 .

     MindTree Limited 7 April 2011 Page 179 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .     Connect the EZ430 target board and load the binary image by clicking the debug Icon shown in the screenshot. The build results will be displayed in the messages window.

 The debugger should connect to the target. loads the image and open the   Debugger        MindTree Limited 7 April 2011 Page 180 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.  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 4: Select Empty project and click OK then you will see the following window:.Step 3: Select the Create New Project as shown in the above snap shot then you will get the following window. MindTree Limited 7 April 2011 Page 183 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .

d43) to the created project as shown below: MindTree Limited 7 April 2011 Page 184 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 (*.

MindTree Limited 7 April 2011 Page 185 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 186 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Step 8: Right click on the project and select Options from the list.

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 .

MindTree Limited 7 April 2011 Page 188 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Step 10: Click on OK to confirm the device type.

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 .

Create project workspace. right click on the project and select Make. MindTree Limited 7 April 2011 Page 191 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Step 13: Once binary file is added to the project.

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 .

MindTree Limited 7 April 2011 Page 193 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .Step 15: Click on the Skip tab (multiple times) to continue downloading process.

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
IAR Embedded Workbench can be obtained by choosing the option Help  About  Product Info     IAR IDE includes multiple tools that are versioned individually. These versions are given below:  
  NOTE: $IAR_INSTALL_PATH refers to the path where the IAR tools are installed.     === Install subdirectory: 430 ===      IAR Assembler for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\a430.exe    12/1/2010 12:36:52 PM, 2081280 bytes      IAR C/C++ Compiler for MSP430    5.20.2 (5.20.2.50216)    $IAR_INSTALL_PATH\430\bin\icc430.exe    1/12/2011 1:27:50 PM, 16783360 bytes      IAR Library Builder    5.0.2.5 (5.0.2.5)    $IAR_INSTALL_PATH\430\bin\xar.exe    11/5/2010 5:48:26 PM, 148992 bytes      IAR XLIB    5.0.2.5 (5.0.2.5)    $IAR_INSTALL_PATH\430\bin\xlib.exe    11/5/2010 5:48:26 PM, 538112 bytes      IAR Universal Linker    5.0.2.5 (5.0.2.5)    $IAR_INSTALL_PATH\430\bin\xlink.exe    11/5/2010 5:48:26 PM, 2316288 bytes      IAR C‐SPY Batch Simulator Driver for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\430bat.dll    12/1/2010 12:15:14 PM, 505344 bytes     
MindTree Limited 7 April 2011 Page 195 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

IAR C‐SPY Emulator Driver for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\430fet.dll    12/1/2010 12:20:20 PM, 2467840 bytes      IAR C‐SPY Library Support Plug‐in for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\430libsupport.dll    12/1/2010 12:14:54 PM, 588288 bytes      IAR LibSupport Plug‐in Language Specific Resources    6.1.2.1748 (6.1.2.1748)    $IAR_INSTALL_PATH\430\bin\430LibSupport.ENU.dll    11/23/2010 5:05:32 AM, 10240 bytes      IAR LibSupport Plug‐in Language Specific Resources    6.1.2.1748 (6.1.2.1748)    $IAR_INSTALL_PATH\430\bin\430LibSupport.JPN.dll    11/23/2010 5:05:32 AM, 9216 bytes      IAR C‐SPY Processor Descriptor for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\430proc.dll    12/1/2010 12:17:12 PM, 1895936 bytes      IAR C‐SPY Simulator Driver for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\430sim.dll    12/1/2010 12:21:50 PM, 4061184 bytes      CP210x    1.2 (1.2.0.0)    $IAR_INSTALL_PATH\430\bin\CP210xManufacturing.dll    1/14/2010 5:19:52 PM, 69632 bytes      IAR Project File Converter for MSP430    V3.21A/W32 (3.21.1.9)    $IAR_INSTALL_PATH\430\bin\cwtd430.dll    1/14/2010 5:21:20 PM, 352256 bytes      FTD2XX library    3.01.06 (3.1.6.1)    $IAR_INSTALL_PATH\430\bin\FTD2XX.dll    1/14/2010 5:19:52 PM, 81920 bytes      HIL    1, 2, 6, 0 (1.2.6.0)    $IAR_INSTALL_PATH\430\bin\hil.dll    11/3/2010 2:36:22 PM, 32768 bytes      SEGGER J‐Link MSP430 interface DLL    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/2010 5:19:52 PM, 114688 bytes      MSP430.dll for USB‐MSP430‐FPA 4v61 based on TI's ver.2.4.6.1    2, 4, 6, 1 (2.4.6.1)    $IAR_INSTALL_PATH\430\bin\MSP430‐FPA.dll    11/26/2010 5:19:50 PM, 585728 bytes      MSP430 JTAG Interface Driver    2.4.7.001 (2.4.7.1)    $IAR_INSTALL_PATH\430\bin\msp430.dll    11/8/2010 9:51:12 AM, 352256 bytes      MSP430    1, 0, 4, 0 (1.0.4.0)    $IAR_INSTALL_PATH\430\bin\olimex.dll    11/29/2010 9:44:14 AM, 1138688 bytes      SBMSP430_DLL DLL    2, 3, 3, 3 (2.3.3.3)    $IAR_INSTALL_PATH\430\bin\sbmsp430.dll    1/14/2010 5:19:52 PM, 262144 bytes      SiUSBXp    3.1 (3.1.0.0)    $IAR_INSTALL_PATH\430\bin\SiUSBXp.dll    11/18/2010 10:26:50 AM, 90112 bytes      MSP430    Version (2.3.3.1)    $IAR_INSTALL_PATH\430\bin\SoftBaugh.dll    1/14/2010 5:19:52 PM, 32768 bytes      IAR Workbench Target Descriptor for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\swtd430.dll    12/1/2010 12:15:48 PM, 1005056 bytes      IAR Workbench Target Descriptor, Emulator, for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\swtd430fet.dll    12/1/2010 12:14:42 PM, 587264 bytes      IAR Workbench Target Descriptor, Simulator, for MSP430    5.20.1 (5.20.1.50215)    $IAR_INSTALL_PATH\430\bin\swtd430sim.dll    12/1/2010 12:14:48 PM, 540672 bytes      Driver Installation Utility    2.1 (2.1.0.0)    $IAR_INSTALL_PATH\430\drivers\Olimex\USBXpressInstaller.exe    9/9/2009 4:49:02 AM, 290816 bytes      $IAR_INSTALL_PATH\430\drivers\TIUSBFET\InstallDriver32.exe 
MindTree Limited 7 April 2011 Page 197 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

0. 199048 bytes      FTDI USB Serial Converter Property Page Provider    1. 49152 bytes      Driver Package Installer    2.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftbusui. 61440 bytes      $IAR_INSTALL_PATH\430\drivers\TIUSBFET\eZ430‐UART\preinstalCDC.2.exe    1/14/2010 5:20:08 PM.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win7‐32\DPinst.exe    1/14/2010 5:21:40 PM. 143688 bytes      FT2232 VCP CoInstaller    2. 51528 bytes      MindTree Limited 7 April 2011 Page 198 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .1 (2. 552528 bytes      Driver Package Installer    2.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP32\DPinst.1.2.exe    1/14/2010 5:20:08 PM.0.1.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftcserco.0. 1047632 bytes      FTD2XX Dynamic Link Library    3. 61440 bytes      $IAR_INSTALL_PATH\430\drivers\TIUSBFET\InstallDriver64.exe    1/14/2010 5:20:08 PM.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista64\DPinst64.1 (2.02 (3.2.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista32\DPinst.exe    1/14/2010 5:20:08 PM.00.1 (2.0.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP64\DPinst64.0)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win7‐64\DPinst64.0. 552528 bytes      Driver Package Installer    2. 1047632 bytes      Driver Package Installer    2.1.dll    10/22/2009 2:11:20 PM.dll    11/16/2010 8:54:24 AM.1.1 (2.0)    $IAR_INSTALL_PATH\430\drivers\Olimex\FTD2XX.  1/14/2010 5:21:40 PM.02.00.exe    1/14/2010 5:19:36 PM.exe    1/14/2010 5:20:08 PM.1.2.1. 552528 bytes      Driver Package Installer    2.1 (2.exe    1/14/2010 5:20:08 PM.0.1 (1.dll    10/22/2009 2:17:04 PM.1 (2.0. 1047632 bytes      Driver Package Installer    2.0.0.1 (2.0.

16385 (win7_rtm.00.dll    10/22/2009 2:17:18 PM. 55112 bytes      FTDI USB Serial Converter Property Page Provider    1.dll    10/22/2009 2:11:26 PM.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista64\WdfCoInstaller01009.dll    10/22/2009 2:16:52 PM.1. 0.16385 (win7_rtm.6.2.1.dll    10/22/2009 2:08:46 PM.19 (3.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Vista32\WdfCoInstaller01009.01.7600.0)    $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftd2xx64. 54088 bytes      FTD2XX library    3.0.01. 1721576 bytes      WDF Coinstaller    1.0.0.0. 284992 bytes      FTDI Virtual COM Port Property Page Provider    2. 206144 bytes      FTDI Multi‐Lingual Property Page Text Library    1.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftlang.9. 197952 bytes      FTDI Virtual COM Port Property Page Provider    2.19.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftlang.9.16385 (win7_rtm.090713‐1255) (1. 4.0.2. 1461992 bytes      WDF Coinstaller    1.9.00. 1 (1.0.dll    10/22/2009 2:17:26 PM.9.7600.0)    $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftd2xx.1 (1.06.dll    10/22/2009 2:17:10 PM. 120136 bytes      FT2232 VCP CoInstaller    2.FTD2XX library    3. 1 (1. 4.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftbusui.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\amd64\ftserui2.0.090713‐1255) (1.4.090713‐1255) (1.4.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftcserco.19 (3.0.dll  MindTree Limited 7 April 2011 Page 199 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 0. 330056 bytes      FTDI Multi‐Lingual Property Page Text Library    1.9.1  built by: WinDDK (2.dll    1/14/2010 5:20:08 PM.6.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win7‐32\WdfCoInstaller01009.7600.7600.7600.06.7600.9.00.dll    1/14/2010 5:20:06 PM.1  built by: WinDDK (2.dll    10/22/2009 2:16:56 PM.1 (2.19.dll    10/22/2009 2:08:36 PM.1)    $IAR_INSTALL_PATH\430\drivers\Olimex\i386\ftserui2. 52552 bytes      WDF Coinstaller    1.00.

0.0 (2.6.0.0)    $IAR_INSTALL_PATH\430\plugins\rtos\uCOS‐II\uCOS‐II‐KA‐CSpy.0)    $IAR_INSTALL_PATH\430\plugins\simulation\PspWatchdogPlugin.  1/14/2010 5:20:06 PM.dll    11/4/2010 2:23:26 PM. 413696 bytes      SEGGER embOS IAR‐Plugin    6.9. 1721576 bytes      WDF Coinstaller    1.psp.9.7600.0.0.7600.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP64\WdfCoInstaller01009.090713‐1255) (1.5.dll    1/14/2010 5:20:08 PM. 572416 bytes      PowerPac RTOS Plugin    6. 1461992 bytes      WDF Coinstaller    1.9. 1461992 bytes      WDF Coinstaller    1.5.dll    11/3/2010 8:25:58 PM. 0.dll    3/12/2010 11:18:04 AM.0 (2.exe  MindTree Limited 7 April 2011 Page 200 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .dll    11/2/2010 9:40:42 PM.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\Win7‐64\WdfCoInstaller01009.0.0.87 KA Plug‐in for C‐SPY DLL    2.dll    11/3/2010 8:25:58 PM.6.16385 (win7_rtm.5.16385 (win7_rtm.7600.0)    $IAR_INSTALL_PATH\430\plugins\simulation\PspPort1LED. 1721576 bytes      LCD Plugin for EW430    3.dll    1/14/2010 5:20:06 PM. 452096 bytes      $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\Echo1.0)    $IAR_INSTALL_PATH\430\plugins\rtos\embOS\embOSPlugin. 0.0)    $IAR_INSTALL_PATH\430\plugins\rtos\PowerPac\PowerPacRTOSPlugin.dll    12/1/2010 12:15:48 PM.42.090713‐1255) (1. 664576 bytes      PspUtil1Plugin DLL    2.7600.9.42A (3.1.7600. 594944 bytes      µC/OS‐II <= 2.9.dll    3/12/2010 11:16:56 AM.5.dll    1/14/2010 5:20:08 PM. 0 (6.9. 659456 bytes      µC/OS‐II >= 2.1. 6.1 (2.090713‐1255) (1.0)    $IAR_INSTALL_PATH\430\plugins\rtos\uCOS‐II\uCOS‐II‐286‐KA‐CSpy.7600.psp.0 (2.86 KA Plug‐in for C‐SPY DLL    2.0. 6. 0 (6. 464384 bytes      CSPY PspWatchdogPlugin DLL    2.16385 (win7_rtm.16385)    $IAR_INSTALL_PATH\430\drivers\TIUSBFET\XP32\WdfCoInstaller01009.9)    $IAR_INSTALL_PATH\430\plugins\Lcd\lcd.

10.1.24)    $IAR_INSTALL_PATH\arm\bin\ielftool.1. 4645376 bytes      IAR Object File Manipulator    9.7.7.1. 49152 bytes      $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\EchoFast.52143 (6.1.1.1.exe    10/29/2010 12:09:10 PM.10.exe    11/4/2010 2:00:32 PM.exe    10/29/2010 12:09:18 PM.exe    12/1/2010 1:44:16 PM. 53248 bytes      === Install subdirectory: arm ===      $IAR_INSTALL_PATH\arm\bin\het470.exe    10/29/2010 12:09:14 PM. 1529856 bytes      IAR Assembler for ARM    6.7.10. 25134080 bytes      IAR ELF Dumper for ARM    6. 45056 bytes      $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\Bulk\Example\Exe\Test.52143)    $IAR_INSTALL_PATH\arm\bin\ilinkarm.1.10.exe    10/29/2010 12:09:20 PM.10.24 (9.52143)    $IAR_INSTALL_PATH\arm\bin\ielfdumparm. 212992 bytes      IAR Archive Tool    9.1.7.52143 (6.10.24 (9.  12/1/2010 1:44:18 PM.10.7.1. 1038336 bytes      IAR Absolute Symbol Exporter    9.52143 (6.52143 (6.1.24)    $IAR_INSTALL_PATH\arm\bin\iobjmanip.exe    10/29/2010 12:09:14 PM. 2629632 bytes      IAR ELF Tool    9.1. 333312 bytes      IAR ELF Linker for ARM    6.1.7.52143)    $IAR_INSTALL_PATH\arm\bin\iccarm.exe    10/29/2010 12:09:16 PM.exe    10/29/2010 12:09:12 PM.1.7.24)    $IAR_INSTALL_PATH\arm\bin\iarchive.10. 2451456 bytes      IAR C/C++ Compiler for ARM    6.24)  MindTree Limited 7 April 2011 Page 201 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .1.7. 45056 bytes      $IAR_INSTALL_PATH\430\PowerPac\USB\Windows\HID\Example\Exe\HIDEcho1.52143)    $IAR_INSTALL_PATH\arm\bin\iasmarm.exe    12/1/2010 1:44:18 PM.exe    12/1/2010 1:44:18 PM.24 (9.1.24 (9.1.

dll    11/3/2010 11:51:08 AM.  $IAR_INSTALL_PATH\arm\bin\isymexport.52170 (6.10.52170)    $IAR_INSTALL_PATH\arm\bin\armbat.10.1.52170 (6.10.exe    11/4/2010 2:24:26 PM.1.52170)    $IAR_INSTALL_PATH\arm\bin\armgdbserv.1.52170)    $IAR_INSTALL_PATH\arm\bin\armbat.10.exe    11/4/2010 2:24:26 PM. 77824 bytes      IAR C‐SPY Angel Driver for ARM    6. 92672 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6.10.52170 (6.1. 160768 bytes      IAR C‐SPY Angel Driver for ARM    6.exe    10/29/2010 12:09:16 PM.1. 53248 bytes      $IAR_INSTALL_PATH\arm\bin\JLinkSTR91x. 72704 bytes      IAR C‐SPY GDB Server Driver for ARM    6.exe    11/4/2010 2:24:26 PM.52170 (6. 965632 bytes      $IAR_INSTALL_PATH\arm\bin\jlink.dll    11/3/2010 11:50:14 AM.ENU.10.10.52170)    $IAR_INSTALL_PATH\arm\bin\armbat.52170)    $IAR_INSTALL_PATH\arm\bin\armgdbserv.1. 143360 bytes      $IAR_INSTALL_PATH\arm\bin\JLinkSTM32.1.1.1.10.dll    11/3/2010 11:59:40 AM.dll  MindTree Limited 7 April 2011 Page 202 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 61440 bytes      $IAR_INSTALL_PATH\arm\bin\JLinkTCPIPServer.1.52170)    $IAR_INSTALL_PATH\arm\bin\armangel.1.exe    11/4/2010 2:24:26 PM.1.1.1.dll    11/3/2010 11:50:02 AM.52170)    $IAR_INSTALL_PATH\arm\bin\armangel.JPN. 515584 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6.52170)    $IAR_INSTALL_PATH\arm\bin\armangel.10.10.ENU.52170 (6.ENU.10. 127488 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6.10.10.52170 (6.JPN.10.dll    11/3/2010 11:59:28 AM.dll    11/3/2010 11:51:06 AM.52170 (6.10.dll    11/3/2010 11:50:04 AM.1. 1724416 bytes      IAR C‐SPY Angel Driver for ARM    6. 1667584 bytes      IAR C‐SPY GDB Server Driver for ARM    6.10.1.52170 (6.

1. 174592 bytes      IAR C‐SPY JLink Driver for ARM    6.52170)    $IAR_INSTALL_PATH\arm\bin\armjtag.1.JPN.10.52170)    $IAR_INSTALL_PATH\arm\bin\armjtag. 143872 bytes      IAR C‐SPY JTAG Driver for ARM    6.10.1.52170 (6.1.52170 (6.1.52170 (6.dll    11/3/2010 11:58:50 AM.1. 157696 bytes      IAR C‐SPY JTAG Driver for ARM    6.1.52170)    $IAR_INSTALL_PATH\arm\bin\armjlink.dll    11/3/2010 11:49:34 AM.10.10.10.10.10.52170)    $IAR_INSTALL_PATH\arm\bin\armgdbserv.1. 612864 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6. 165888 bytes      IAR C‐SPY GDB Server Driver for ARM    6.52170 (6.52170)    $IAR_INSTALL_PATH\arm\bin\armjtag.10.10.1.ENU.1.52170 (6.10.JPN.JPN.ENU.52170)    $IAR_INSTALL_PATH\arm\bin\armLibSupport.52170 (6.dll    11/3/2010 11:48:38 AM.dll    11/3/2010 11:49:56 AM.1.1. 4087808 bytes      IAR C‐SPY JLink Driver for ARM    6.10.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armLibSupport.10.10.1.dll    11/3/2010 11:49:04 AM.1.dll    11/3/2010 11:48:40 AM.52170 (6.52170 (6. 1597952 bytes      IAR C‐SPY JTAG Driver for ARM    6.dll    11/3/2010 11:48:48 AM.52170)    $IAR_INSTALL_PATH\arm\bin\armjlink.dll    11/3/2010 11:49:10 AM.1. 128000 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6.1.  11/3/2010 11:49:58 AM.10. 131584 bytes      IAR C‐SPY JLink Driver for ARM    6.ENU.10.52170 (6.52170 (6.1.10.1.dll    11/3/2010 11:58:08 AM.1.10.52170)    $IAR_INSTALL_PATH\arm\bin\armjlink. 78848 bytes      IAR C‐SPY Library Support Plug‐In for ARM    6. 58880 bytes      IAR C‐SPY TI Stellaris FTDI Driver for ARM  MindTree Limited 7 April 2011 Page 203 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .JPN.dll    11/3/2010 11:49:30 AM.10.52170)    $IAR_INSTALL_PATH\arm\bin\armLibSupport.10.

  6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armlmiftdi.dll    11/3/2010 12:00:14 PM, 2524672 bytes      IAR C‐SPY TI Stellaris FTDI Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armlmiftdi.ENU.dll    11/3/2010 11:48:58 AM, 174080 bytes      IAR C‐SPY TI Stellaris FTDI Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armlmiftdi.JPN.dll    11/3/2010 11:48:54 AM, 139776 bytes      IAR C‐SPY PE Micro Driver for ARM    6, 10, 1, 0 (6.10.1.0)    $IAR_INSTALL_PATH\arm\bin\armpemicro.dll    11/3/2010 9:00:54 AM, 892808 bytes      IAR C‐SPY Processor Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armproc.dll    11/3/2010 11:49:02 AM, 955392 bytes      IAR C‐SPY Processor Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armproc.ENU.dll    11/3/2010 11:48:36 AM, 71680 bytes      IAR C‐SPY Processor Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armproc.JPN.dll    11/3/2010 11:48:34 AM, 52736 bytes      IAR C‐SPY RDI Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrdi.dll    11/3/2010 12:01:46 PM, 2252288 bytes      IAR C‐SPY RDI Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrdi.ENU.dll    11/3/2010 11:48:34 AM, 154624 bytes      IAR C‐SPY RDI Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrdi.JPN.dll    11/3/2010 11:48:30 AM, 124928 bytes      IAR C‐SPY ROM‐Monitor Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrom.dll    11/3/2010 11:57:08 AM, 1600512 bytes 
MindTree Limited 7 April 2011 Page 204 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

    IAR C‐SPY ROM‐Monitor Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrom.ENU.dll    11/3/2010 11:48:16 AM, 157696 bytes      IAR C‐SPY ROM‐Monitor Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armrom.JPN.dll    11/3/2010 11:48:12 AM, 124416 bytes      IAR C‐SPY Simulator Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armsim2.dll    11/3/2010 12:02:32 PM, 4782080 bytes      IAR C‐SPY Simulator Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armsim2.ENU.dll    11/3/2010 11:47:42 AM, 145408 bytes      IAR C‐SPY Simulator Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armsim2.JPN.dll    11/3/2010 11:47:42 AM, 116224 bytes      IAR C‐SPY ST‐LINK Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armstlink.dll    11/3/2010 11:48:04 AM, 876032 bytes      IAR C‐SPY ST‐LINK Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armstlink.ENU.dll    11/3/2010 11:48:52 AM, 132608 bytes      IAR C‐SPY ST‐LINK Driver for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\armstlink.JPN.dll    11/3/2010 11:51:12 AM, 108032 bytes      IAR Workbench Project file converter for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\cwtdarm.dll    11/3/2010 11:45:30 AM, 968192 bytes      IAR Workbench Project file converter for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\cwtdarmlib.dll    11/3/2010 11:45:30 AM, 582656 bytes      $IAR_INSTALL_PATH\arm\bin\FTCJTAG.dll    11/3/2010 9:01:36 AM, 81920 bytes 
MindTree Limited 7 April 2011 Page 205 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

    FTD2XX library    3.01.19 (3.1.19.0)    $IAR_INSTALL_PATH\arm\bin\ftd2xx.dll    11/3/2010 9:01:38 AM, 206144 bytes      FTD2XX library    3.01.19 (3.1.19.0)    $IAR_INSTALL_PATH\arm\bin\ftd2xx64.dll    11/3/2010 9:01:38 AM, 330056 bytes      SEGGER J‐Link interface DLL    4.20m (4.20.13.0)    $IAR_INSTALL_PATH\arm\bin\jlinkarm.dll    11/4/2010 2:24:26 PM, 3231744 bytes      2.0.2.0 (2.0.2.0)    $IAR_INSTALL_PATH\arm\bin\jtag_bb.dll    10/22/2010 12:57:18 PM, 60416 bytes      $IAR_INSTALL_PATH\arm\bin\jtag_raven.dll    10/22/2010 12:57:44 PM, 13824 bytes      2.0.0.2 (2.0.0.2)    $IAR_INSTALL_PATH\arm\bin\jtag_usb.dll    10/22/2010 12:57:18 PM, 435712 bytes      JTAG_USB2    2, 0, 0, 8 (2.0.0.8)    $IAR_INSTALL_PATH\arm\bin\JTAG_USB2.dll    10/22/2010 12:57:44 PM, 172032 bytes      2.0.0.3 (2.0.0.3)    $IAR_INSTALL_PATH\arm\bin\jtag_wig.dll    10/22/2010 12:57:18 PM, 98816 bytes      mac_conn.dll    2.0.0.0 (2.0.0.0)    $IAR_INSTALL_PATH\arm\bin\mac_con.dll    10/22/2010 12:57:18 PM, 40960 bytes      mac_enet.dll    2.0.0.0 (2.0.0.0)    $IAR_INSTALL_PATH\arm\bin\mac_enet.dll    10/22/2010 12:57:18 PM, 49152 bytes      2.0.0.2 (2.0.0.2)    $IAR_INSTALL_PATH\arm\bin\mac_lpt.dll    10/22/2010 12:57:18 PM, 426496 bytes      Oki Usb DLL    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/2010 10:08:02 PM, 28672 bytes      4.0.1.2 (4.0.1.2)    $IAR_INSTALL_PATH\arm\bin\STLinkIIIUSBDriver.dll    12/1/2009 3:20:06 PM, 389632 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm.dll    11/3/2010 11:47:04 AM, 1146368 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm.ENU.dll    11/3/2010 11:46:30 AM, 110080 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm.JPN.dll    11/3/2010 11:46:28 AM, 101888 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.dll    11/3/2010 11:46:40 AM, 576000 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.ENU.dll    11/3/2010 11:46:28 AM, 8704 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_angel.JPN.dll    11/3/2010 11:46:26 AM, 7168 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.dll    11/3/2010 11:46:38 AM, 562176 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.ENU.dll    11/3/2010 11:46:26 AM, 8704 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_gdbserv.JPN.dll    11/3/2010 11:46:24 AM, 7168 bytes      IAR Workbench Target Descriptor for ARM    6.10.1.52170 (6.10.1.52170) 
MindTree Limited 7 April 2011 Page 207 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide

52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.1.1.10.JPN.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom. 8192 bytes      IAR Workbench Target Descriptor for ARM    6.1. 595968 bytes      IAR Workbench Target Descriptor for ARM    6.ENU.1. 6656 bytes      IAR Workbench Target Descriptor for ARM    6. 10752 bytes      IAR Workbench Target Descriptor for ARM    6.10.dll    11/3/2010 11:46:06 AM.1.52170 (6.1.10.1.ENU.dll    11/3/2010 11:46:26 AM. 8704 bytes      IAR Workbench Target Descriptor for ARM    6.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.52170 (6. 567808 bytes      IAR Workbench Target Descriptor for ARM    6.52170 (6.10.52170 (6.1.10.dll    11/3/2010 11:46:24 AM.1.dll    11/3/2010 11:46:22 AM.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom.1.10.10.52170 (6.10.dll    11/3/2010 11:46:36 AM.dll    11/3/2010 11:46:10 AM. 6656 bytes      IAR Workbench Target Descriptor for ARM    6.52170 (6. 9216 bytes      IAR Workbench Target Descriptor for ARM    6.1.dll    11/3/2010 11:45:48 AM.dll    11/3/2010 11:46:06 AM.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.ENU.10.10.10.dll    11/3/2010 11:45:50 AM.1.JPN.52170 (6.1.  $IAR_INSTALL_PATH\arm\bin\swtdarm_iarrom. 587776 bytes      IAR Workbench Target Descriptor for ARM    6.10.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.52170 (6.ENU.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_jlink.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_lmiftdi.10.1.10.10.10.1.dll    11/3/2010 11:45:50 AM.JPN.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.1.10.1. 9728 bytes      MindTree Limited 7 April 2011 Page 208 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .52170 (6. 445440 bytes      IAR Workbench Target Descriptor for ARM    6.dll    11/3/2010 11:46:10 AM.10.52170 (6.10.1.1.

52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.52170 (6.ENU.10. 9216 bytes      IAR Workbench Target Descriptor for ARM    6. 576512 bytes      IAR Workbench Target Descriptor for ARM    6. 8704 bytes      IAR Workbench Target Descriptor for ARM    6.10.10.1.dll    11/3/2010 11:46:38 AM.1.dll    11/3/2010 11:46:24 AM.10.10.ENU.10.10.JPN.1.10. 437248 bytes      IAR Workbench Target Descriptor for ARM    6.10.10.10.dll  MindTree Limited 7 April 2011 Page 209 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .dll    11/3/2010 11:45:48 AM.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.52170 (6.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.10.1.dll    11/3/2010 11:45:48 AM.1.52170 (6.1.dll    11/3/2010 11:46:06 AM.1. 433664 bytes      IAR Workbench Target Descriptor for ARM    6.JPN.1.dll    11/3/2010 11:46:04 AM.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.52170 (6.1.52170 (6.10.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.10.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi.1.IAR Workbench Target Descriptor for ARM    6.dll    11/3/2010 11:46:22 AM.52170 (6.10.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_macraigor.10.1.dll    11/3/2010 11:46:20 AM.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi.1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_rdi. 6656 bytes      IAR Workbench Target Descriptor for ARM    6.10.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_stlink.1.52170 (6. 7168 bytes      IAR Workbench Target Descriptor for ARM    6.52170 (6. 8192 bytes      IAR Workbench Target Descriptor for ARM    6.1.ENU.1.1.1.10.10.52170 (6.52170 (6. 7168 bytes      IAR Workbench Target Descriptor for ARM    6.JPN.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_PEMicro.dll    11/3/2010 11:45:48 AM. 8192 bytes      IAR Workbench Target Descriptor for ARM    6.1.52170 (6.JPN.10.dll    11/3/2010 11:46:08 AM.10.1.1.

dll    11/3/2010 9:00:52 AM. 2487688 bytes      2.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.0)    $IAR_INSTALL_PATH\arm\drivers\Jlink\x86\DPInst. 26. 0.exe    11/4/2010 2:24:28 PM.01 (2.0)    $IAR_INSTALL_PATH\arm\drivers\Jlink\x64\DPInst.0.0)    $IAR_INSTALL_PATH\arm\bin\pemicro\peosbdmv1.0.52170 (6. 661504 bytes      OSBDM Dynamic Link Library    1.8)    $IAR_INSTALL_PATH\arm\bin\template.0.5)    $IAR_INSTALL_PATH\arm\bin\pemicro\pemicro_serialcm2.0.0.dll    11/3/2010 11:45:48 AM.0.6)    $IAR_INSTALL_PATH\arm\bin\unit_ngs_arm.0.34.0.1.dll    11/3/2010 11:46:08 AM.5 (2.0000                                        (16.34.  11/3/2010 11:46:06 AM.dll    11/3/2010 9:00:54 AM.0.1.2 (1.dll    3.exe    11/4/2010 2:24:28 PM.1.3. 1233800 bytes      2.1.5)    $IAR_INSTALL_PATH\arm\bin\wigglers.JPN.5 (2.1.0. 123904 bytes      1. 432128 bytes      IAR Workbench Target Descriptor for ARM    6.10. 2179072 bytes      1.0.10.01 (2.26. 6656 bytes      template.3.0.0.0.58.52170 (6.2)    $IAR_INSTALL_PATH\arm\bin\pemicro\icdarmcortex_dll_v101.exe    11/4/2010 2:24:26 PM.0.0.10.10.1.1. 845736 bytes      Driver Package Installer    2. 8192 bytes      IAR Workbench Target Descriptor for ARM    6.dll    10/22/2010 12:57:18 PM.435)  MindTree Limited 7 April 2011 Page 210 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 105472 bytes      $IAR_INSTALL_PATH\arm\drivers\Jlink\InstDrivers.1. 51816 bytes      Driver Package Installer    2.0.6 (1.52170)    $IAR_INSTALL_PATH\arm\bin\swtdarm_thirdparty.1.dll    11/3/2010 9:00:54 AM.dll    11/3/2010 9:00:54 AM.dll    10/22/2010 12:57:44 PM. 0 (1. 521128 bytes      Setup Launcher                                            2.ENU.8 (3.1.

1  (2.2.dll    11/3/2010 9:01:38 AM.dll    11/3/2010 9:01:38 AM.0.00.0. 0.dll    11/3/2010 9:01:38 AM.01.dll    11/3/2010 9:01:38 AM.0. 176128 bytes      FTLang    1.1)    $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\ftserui2.0. 1 (1.06.00.19 (3.1  built by: WinDDK (2.0.01. 143688 bytes      FT2232 VCP CoInstaller    2.00. 33360 bytes      FTDI USB Serial Converter Property Page Provider    1.400)    $IAR_INSTALL_PATH\arm\drivers\pemicro\drivers_osjtag_multilink_cyclone_install. 51528 bytes      FTD2XX library    3. 8751216 bytes      Setup Launcher                                            3. 0. 5531408 bytes      FTD2XX library    3.0                                              (16.dll    11/3/2010 9:01:38 AM.2.exe    11/3/2010 9:00:56 AM. 120136 bytes      MindTree Limited 7 April 2011 Page 211 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .0.dll    11/3/2010 9:01:38 AM.0)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftd2xx64.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftserui2. 55112 bytes      FTDI USB Serial Converter Property Page Provider    1.00.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftlang. 330056 bytes      FTDI Multi‐Lingual Property Page Text Library    1.08 (3.1)    $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\ftd2xx.0. 1 (1. 0.1.1)    $IAR_INSTALL_PATH\arm\drivers\STComstickFTDI\FTLang.  $IAR_INSTALL_PATH\arm\drivers\Macraigor\ocd_cmdr.dll    11/3/2010 9:01:38 AM.exe    10/22/2010 12:57:46 PM.19.2.8.0.dll    11/3/2010 9:01:38 AM.dll    11/3/2010 9:01:38 AM. 284992 bytes      FTDI Virtual COM Port Property Page Provider    2.0.6. 4.1 (1.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftbusui.2.00.0.0.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\amd64\ftcserco.1 (1.0.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftbusui.0.4. 102400 bytes      FTDI Ports Class Installer    2.0.1.1 (2.

10.0.1.1.dll    11/3/2010 9:01:38 AM.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin. 52552 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6.0.1.52170 (6.1.6.dll  MindTree Limited 7 April 2011 Page 212 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 206144 bytes      FTDI Multi‐Lingual Property Page Text Library    1.1.10.0.1.dll    11/3/2010 11:51:56 AM.1.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.dll    11/3/2010 9:01:38 AM.1  built by: WinDDK (2.4.06.10.dll    11/3/2010 11:51:58 AM.0.dll    11/3/2010 11:52:44 AM. 10240 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6.0. 10240 bytes      SEGGER embOS IAR‐Plugin    6. 197952 bytes      FTDI Virtual COM Port Property Page Provider    2.00.1.dll    11/3/2010 9:01:38 AM. 1 (1.0)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftd2xx.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.dll    11/3/2010 9:01:36 AM.10.00.10. 0 (6. 0.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.10.dll    11/3/2010 11:52:14 AM.19.10.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftlang.JPN.52170 (6.FT2232 VCP CoInstaller    2.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftserui2.10.1 (2.1.dll    11/3/2010 11:53:00 AM.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxArmPlugin.01. 11776 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6. 6.52170 (6.52170 (6.6.52170 (6.10.1.1. 553984 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6.1.1.dll    11/3/2010 11:52:12 AM.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\embOS\embOSPlugin. 54088 bytes      FTD2XX library    3.ENU.10.10.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\CMX\CmxTinyArmPlugin. 4.JPN.52170 (6.10. 557056 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6. 11776 bytes      IAR C‐SPY RTOS/CMX Plugin for ARM    6.1)    $IAR_INSTALL_PATH\arm\drivers\StellarisFTDI\i386\ftcserco.00. 0.19 (3.

0.0.dll    11/3/2010 11:52:10 AM.10.dll    11/2/2010 11:28:02 AM.10.  11/4/2010 2:23:26 PM. 619008 bytes      IAR C‐SPY RTOS/THREADX Plugin for ARM    6. 6.0. 0 (2.1.dll    11/2/2010 9:40:42 PM. 640000 bytes      IAR C‐SPY RTOS/THREADX Plugin for ARM    6. 664576 bytes      $IAR_INSTALL_PATH\arm\PowerPac\BoardSupport\Atmel\AT91CAP9\Setup\IP_FS\FS_RO\Tool\Bin2C.154)    $IAR_INSTALL_PATH\arm\plugins\rtos\Quadros\Quadros_EWB6_Plugin. 1340928 bytes      OpenRTOSPlugin DLL    2.1.52170 (6.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\OpenRTOS\OpenRTOSPlugin.dll    11/3/2010 8:25:58 PM. 0.0.4.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.0. 659456 bytes      µC/OS‐II >= 2. 0.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.1.1 (2.1.0.52170)    $IAR_INSTALL_PATH\arm\plugins\rtos\ThreadX\ThreadXArmPlugin.1. 10752 bytes      µC/OS‐II <= 2.5.0 (2. 0.52170 (6.1.0. 0. 0 (2.86 KA Plug‐in for C‐SPY DLL    2.6. 0. 154 (1.dll    10/22/2010 12:36:06 PM.10.0. 0.87 KA Plug‐in for C‐SPY DLL    2.dll    11/4/2010 1:34:06 PM. 630272 bytes      PowerPac RTOS Plugin    6.dll    11/3/2010 11:51:16 AM.dll    11/4/2010 1:34:06 PM.ENU.5.1 (4. 572416 bytes      C‐SPY 6.10.1.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\uCOS‐II\uCOS‐II‐286‐KA‐CSpy.10.5.5.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\uCOS‐II\uCOS‐II‐KA‐CSpy.1.x MQX RTOS Plugin DLL    4. 786432 bytes      SafeRTOSPlugin DLL    2. 12288 bytes      IAR C‐SPY RTOS/THREADX Plugin for ARM    6.4.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\SafeRTOS\SafeRTOSPlugin.dll    11/3/2010 8:25:58 PM.dll    11/3/2010 11:51:14 AM.exe  MindTree Limited 7 April 2011 Page 213 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .0)    $IAR_INSTALL_PATH\arm\plugins\rtos\PowerPac\PowerPacRTOSPlugin. 0.52170 (6.10. 0 (6. 594944 bytes      RTXC_K3_Plugin DLL    1.JPN.0)    $IAR_INSTALL_PATH\arm\plugins\rtos\MQX\MQXRtosPluginARM.

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

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

 735232 bytes      IAR Build Utility    6.1748)    $IAR_INSTALL_PATH\common\bin\IarIdePm.1.ENU.1.dll    11/23/2010 5:04:30 AM.    $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Echo1.1.1.2.2.1.1.2.2.1748 (6.1748)    $IAR_INSTALL_PATH\common\bin\CSpyBat.1748 (6.1.exe    11/23/2010 5:06:30 AM. 49152 bytes      $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Test. 45056 bytes      $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\Performance.2.exe    11/23/2010 5:07:30 AM. 45056 bytes      $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\HID\SampleApp\Exe\HIDEcho1.1748 (6. 4096 bytes      IAR C‐SPY Debugger GUI    6.2.1748 (6.2.1748)    $IAR_INSTALL_PATH\common\bin\CSpyBat.1.1.1748 (6.exe    10/27/2010 7:15:00 PM.exe    10/27/2010 7:15:00 PM.exe    11/23/2010 5:08:22 AM.1748 (6.2.exe    10/27/2010 7:15:00 PM.2.exe    10/27/2010 7:15:00 PM.2. 5632 bytes      IAR CSpyBat Language Specific Resources    6.2. 97280 bytes      IAR Embedded Workbench IDE    6.dll    11/23/2010 5:04:34 AM.2.1. 147456 bytes      === Install subdirectory: common ===      IAR CSpyBat    6. 53248 bytes      $IAR_INSTALL_PATH\arm\RTOS\SEGGER\Util\embOSView.1748)    $IAR_INSTALL_PATH\common\bin\DebuggerGui.exe    10/27/2010 7:15:00 PM. 504320 bytes      IAR CSpyBat Language Specific Resources    6.dll    11/23/2010 5:08:30 AM.1748 (6.exe    11/4/2010 2:24:18 PM.JPN. 49152 bytes      $IAR_INSTALL_PATH\arm\PowerPac\USB\Windows\Bulk\SampleApp\Exe\EchoFast.2.1748)    $IAR_INSTALL_PATH\common\bin\IarBuild.1.2.1.1. 1877504 bytes      IAR C‐SPY Debugger GUI Language Specific Resources    6.1748)  MindTree Limited 7 April 2011 Page 216 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .1.1748)    $IAR_INSTALL_PATH\common\bin\CSpyBat.

2.ENU.2.ENU.JPN.dll    11/23/2010 5:07:44 AM.1.1748 (6.2.1.1.1748 (6.1.dll    11/23/2010 5:07:24 AM.1.2.1748)    $IAR_INSTALL_PATH\common\bin\FindInFiles.1748 (6.1.2.1. 65536 bytes      IAR C‐SPY Debugger GUI Language Specific Resources    6. 56832 bytes      IAR Find In Files    6.1748)    $IAR_INSTALL_PATH\common\bin\FindInFiles.dll    11/23/2010 5:05:48 AM.1.1748)    $IAR_INSTALL_PATH\common\bin\IdeFramework.1748 (6. 3072 bytes      IAR Build Utility Language Specific Resources    6.dll    11/23/2010 5:05:46 AM.1748)    $IAR_INSTALL_PATH\common\bin\FindInFiles.dll    11/23/2010 5:05:56 AM.1.2.1748)    $IAR_INSTALL_PATH\common\bin\IdeFramework.2.1748)    $IAR_INSTALL_PATH\common\bin\IarIdePm.  $IAR_INSTALL_PATH\common\bin\DebuggerGui.JPN.dll    11/23/2010 5:05:38 AM.1.1.2. 472064 bytes      IAR Embedded Workbench IDE Language Specific Resources    6. 1022976 bytes      IAR IDE Framework Language Specific Resources    6.2.1.ENU.dll    11/23/2010 5:05:50 AM.2.1.2. 467456 bytes      IAR IDE Framework    6.1748 (6.2.dll    11/23/2010 5:07:46 AM.1.1748)    $IAR_INSTALL_PATH\common\bin\IarBuild.1.1748 (6. 4608 bytes      MindTree Limited 7 April 2011 Page 217 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 3072 bytes      IAR Embedded Workbench IDE Language Specific Resources    6.JPN. 4608 bytes      IAR Find In Files Language Specific Resources    6.1748)    $IAR_INSTALL_PATH\common\bin\IarBuild.1748 (6.1748 (6.1.1748)    $IAR_INSTALL_PATH\common\bin\DebuggerGui.1748)    $IAR_INSTALL_PATH\common\bin\IarIdePm.dll    11/23/2010 5:05:46 AM.2.2.2.ENU.2.dll    11/23/2010 5:05:46 AM.dll    11/23/2010 5:05:46 AM.1.2.1748 (6.2.1.1.2.2.1748 (6.1.ENU.JPN. 4096 bytes      IAR Build Utility Language Specific Resources    6. 302080 bytes      IAR Find In Files Language Specific Resources    6.

 3584 bytes      IAR C‐SPY Debugger Kernel    6.JPN.2.2.dll    11/23/2010 5:05:04 AM.1748)    $IAR_INSTALL_PATH\common\bin\LogWindow. 14336 bytes      IAR C‐SPY Debugger Kernel Language Specific Resources    6.1.1748 (6.1748 (6.1748 (6. 13312 bytes      IAR Project Manager Engine Language Specific Resources    6.1748)    $IAR_INSTALL_PATH\common\bin\kernel.1.1748 (6.1748 (6.ENU.1.dll    11/23/2010 5:04:48 AM.1. 9728 bytes      IAR Project Manager Engine    6.1.1748 (6.1.ENU. 10240 bytes      IAR Log Window    6.2.1.IAR IDE Framework Language Specific Resources    6.1748 (6.1.1.1.2. 1216512 bytes      IAR Project Manager Engine Language Specific Resources    6.JPN. 254464 bytes      IAR Log Window Language Specific Resources    6.2.dll    11/23/2010 5:08:00 AM.2.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.1.2.1748)    $IAR_INSTALL_PATH\common\bin\IdeFramework.1.2.2.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.1.2.2.2.1.2.dll    11/23/2010 5:08:52 AM.1.1.2.1.1748 (6. 9216 bytes      IAR Project Manager Gui    6.1748)    $IAR_INSTALL_PATH\common\bin\kernel. 9728 bytes      IAR Log Window Language Specific Resources    6.dll    11/23/2010 5:04:50 AM.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerGui.2.dll    11/23/2010 5:08:00 AM.dll    11/23/2010 5:08:00 AM.1. 2305024 bytes      IAR C‐SPY Debugger Kernel Language Specific Resources    6.1.2.dll  MindTree Limited 7 April 2011 Page 218 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .2.2.JPN.1748)    $IAR_INSTALL_PATH\common\bin\kernel.1748 (6.1748)    $IAR_INSTALL_PATH\common\bin\LogWindow.1.ENU.dll    11/23/2010 5:05:04 AM.2.JPN.dll    11/23/2010 5:06:42 AM.2.2.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerEngine.1.1748 (6.1748)    $IAR_INSTALL_PATH\common\bin\LogWindow.1748 (6.1.dll    11/23/2010 5:05:38 AM.2.

2. 156672 bytes      IAR Project Manager Gui Language Specific Resources    6.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerGui.2.JPN.1.dll    11/23/2010 5:05:48 AM.1748 (6.1748)    $IAR_INSTALL_PATH\common\bin\TextEditor.2.dll    11/23/2010 5:04:28 AM.2.1748)    $IAR_INSTALL_PATH\common\bin\ProjectManagerGui. 10240 bytes      IAR ORTI RTOS Plug‐in  MindTree Limited 7 April 2011 Page 219 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .2.1.1. 147968 bytes      IAR Text Editor    6.1748 (6. 1 (1.2.1. 1197056 bytes      IAR XmlLib    6. 451584 bytes      IAR Code Coverage Plug‐in Language Specific Resources    6.ENU. 745984 bytes      IAR Text Editor Language Specific Resources    6.1.0)    $IAR_INSTALL_PATH\common\bin\xerces‐c_1_5_1.2.JPN.1.2.dll    11/1/2010 8:16:26 PM.1.  11/27/2010 12:10:06 AM.1748 (6.1748)    $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage.1.dll    11/23/2010 5:04:06 AM.2.ENU.1.dll    11/23/2010 5:08:26 AM.5.1.2. 25600 bytes      IAR Text Editor Language Specific Resources    6.5.2.1748 (6. 10752 bytes      IAR Code Coverage Plug‐in Language Specific Resources    6.1.2.2.2.1748 (6.1.ENU.1.1.1    1.1.dll    11/23/2010 5:08:12 AM.1. 807424 bytes      IAR Project Manager Gui Language Specific Resources    6.2.JPN.1748 (6.2.dll    11/23/2010 5:04:44 AM.1. 5.2.1748 (6.2.1748)    $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage. 87040 bytes      IAR Code Coverage Plug‐in    6.dll    11/23/2010 5:07:56 AM.dll    11/23/2010 5:08:22 AM.1748)    $IAR_INSTALL_PATH\common\bin\XmlLib.1748 (6.1.1748 (6.1.dll    11/23/2010 5:04:40 AM.1748)    $IAR_INSTALL_PATH\common\bin\TextEditor.1748)    $IAR_INSTALL_PATH\common\bin\TextEditor. 23552 bytes      Shared Library for Xerces‐C Version 1.1748)    $IAR_INSTALL_PATH\common\plugins\CodeCoverage\CodeCoverage.

2.1748)    $IAR_INSTALL_PATH\common\plugins\Stack\Stack.2.1.1748)    $IAR_INSTALL_PATH\common\plugins\SymList\SymList.1.1748 (6.dll    11/23/2010 5:05:00 AM.2.2.2. 486400 bytes      IAR Stack Plug‐in Language Specific Resources    6.1.1748 (6.  6.ENU.JPN.1748 (6.ENU.1.dll    11/23/2010 5:05:00 AM.1.1.2.dll    11/23/2010 5:06:16 AM.2.1748 (6. 7168 bytes      IAR Stack Plug‐in Language Specific Resources    6.1.1748 (6.2. 6144 bytes      IAR Symbols Plug‐in    6.dll    11/23/2010 5:05:02 AM.1748)    $IAR_INSTALL_PATH\common\plugins\Orti\Orti.2.1.1748 (6.1. 7680 bytes      IAR Stack Plug‐in    6.1.1748 (6.dll    11/23/2010 5:04:24 AM.1748)    $IAR_INSTALL_PATH\common\plugins\SymList\SymList. 8704 bytes      IAR ORTI RTOS Plug‐in Language Specific Resources    6.1748)    $IAR_INSTALL_PATH\common\plugins\Orti\Orti.2.1748)    $IAR_INSTALL_PATH\common\plugins\Stack\Stack.1.1.1.1.JPN.JPN.2.1.2.2.1.1.1748 (6.1.2.2.dll    11/23/2010 5:07:00 AM.dll    11/23/2010 5:05:02 AM.dll    11/23/2010 5:04:52 AM.2.1748)    $IAR_INSTALL_PATH\common\plugins\Orti\Orti. 3072 bytes      IAR Symbols Plug‐in Language Specific Resources    6. 563200 bytes      IAR ORTI RTOS Plug‐in Language Specific Resources    6. 431616 bytes      IAR Symbols Plug‐in Language Specific Resources    6.ENU.dll    11/23/2010 5:06:08 AM.1748)    $IAR_INSTALL_PATH\common\plugins\Stack\Stack.1748 (6.2.1748)    $IAR_INSTALL_PATH\common\plugins\SymList\SymList.2. 2560 bytes         MindTree Limited 7 April 2011 Page 220 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .

8. 4. This can be done using the “INFO MENU” screen.com/lit/er/slaz071a/slaz071a. 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”.h 7. Can the JFET be used as a power source for MSP-EXP430F5438+PAN1315ETU? No.pdfhttp://focus. What could be wrong? Windows has a max path length limit and does not accept paths that are too long. Why does the MSP-EXP430F5438 reset after few minutes of use? Check if the package is being run in evaluation mode.com/lit/an/slaa470/slaa470. Can I build my application with the different IAR version. This indicates that the package is being run in evaluation mode. then you should not expect this limitation.0. 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.pdf MindTree Limited 7 April 2011 Page 221 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide .31 6. 3. I’m unable to build the package due to path length related issues. temperature and evaluation packages? The version of the EtherMind stack used is 8. Compiling with Data Model setting at “Small” or “Medium” does not work The library has been built with the Data Model setting at “Large”.ti. When MSP430BT5190 is mounted. Check if the “DEV TYPE” value has either “F5438” or "F5438A" against it. Move the project higher in your directory structure – towards the C:\ directory – and the project should compile without error. 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. What is the version of the EtherMind stack used for the MSP430 SPP accelerometer. 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. 2.ti. 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. 9. The FET cannot power-up the MSP-EXP430F5438+PAN1315ETU Bluetooth solution. Only USB or battery modes will need to be used. 5.Frequently asked Questions 1.

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

1 2 Reference EtherMind Stack API Documents. Part I & II. No. EtherMind SPP API Document MindTree Limited 7 April 2011 Page 223 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.

Contact: Bluetooth@mindtree. © 2010 MindTree Limited The MindTree logo design is a trademark of MindTree Limited. MindTree Limited 7 April 2011 Page 224 of 224 MSP430BT5190+CC2560 EtherMind Bluetooth SDK Developer Guide . 52. services.com United States MindTree Limited Suite #105 #2855 Kifer Road. All other products. Bluetooth is a trademark owned by Bluetooth SIG. India. Tel: +1 408 986 1000 Fax: +1 408 986 0005 Japan Yurakucho Building 11th Floor 1-10-1. 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. USA. Inc.com www.560 070 Karnataka. 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. Yurakucho. ChiyodaKu Tokyo.mindtree. and licensed to MindTree Ltd. and company names are trademarks. 53 Fax: +65 232 2888 India #42 27th Cross Banashankari II Stage Bangalore . Tel: +65 232 2751. Santa Clara CA 95051. Tel: +91 80 671 1777 Fax: +91 80 671 4000 Information disclosed in this document is preliminary in nature and subject to change. registered trademarks or service marks of their respective owners. Tel: +44 (0) 1793 441418 Fax: +44 (0) 1793 441618 Singapore Suite #12 Level 15. Prudential Tower 30 Cecil Street Singapore 049712.