You are on page 1of 141

MSP430BT5190+CC2560

EtherMind Bluetooth SDK


Developer's Guide

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

MindTree Limited 17-June-2010 Page 1 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Table of Contents
ABSTRACT .................................................................................................................... 7

Revision History ............................................................................................................. 8

Introduction ................................................................................................................. 9

Requirements...............................................................................................................11

Hardware .................................................................................................................11

Software..................................................................................................................14

Software Architecture ....................................................................................................14

Software tasks ...........................................................................................................15

Semaphores ...........................................................................................................16

Flow Diagrams ........................................................................................................17

Considerations to be taken while customizing the application..................................................19

Creating additional tasks............................................................................................19

Creating additional semaphores ...................................................................................19

Handling ISRs..........................................................................................................19

Memory Management...................................................................................................20

Directory Structure .....................................................................................................21

Building Bluetooth SDK Components for MSP430 .....................................................................22

Installation of Bluetooth SDK Components ............................................................................23

EtherMind Stack API & Profile Libraries for MSP430 with IAR .................................................23

Configuring EtherMind Stack API Library ...............................................................................24

Setup for the Temperature Application ................................................................................36

Navigating the menu on the LCD ........................................................................................40

Examples of Menu Navigation .........................................................................................40

BLUETOOTH MENU ...................................................................................................40

SETTINGS MENU.......................................................................................................41

INFO MENU ............................................................................................................41

LCD status indications ....................................................................................................41

MindTree Limited 17-June-2010 Page 2 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
LED status indications.....................................................................................................42

LCD backlight control .....................................................................................................42

Low power mode configurations ........................................................................................42

LPM implementation in sample SPP application ...................................................................43

LPM and Bluetooth stack considerations ............................................................................44

Maximum output power configurations for CC2560 Bluetooth Controller ........................................44

sdk_set_max_output_power ().....................................................................................44

Flight Mode for CC2560 Bluetooth controller .........................................................................44

eHCILL mode ...............................................................................................................44

Sniff mode ..................................................................................................................47

Sequence chart for Sniff Mechanism: ................................................................................47

APIs........................................................................................................................47

APIs for controlling the SPP application ...............................................................................49

General Stack APIs ......................................................................................................49

EtherMind Stack Initialization ......................................................................................49

Switching Bluetooth On .............................................................................................50

Switching Bluetooth Off .............................................................................................51

SPP APIs ..................................................................................................................52

BT_spp_init ().........................................................................................................52

BT_spp_start () .......................................................................................................53

BT_spp_connect () ...................................................................................................53

BT_spp_disconnect () ................................................................................................54

BT_spp_send() ........................................................................................................54

BT_spp_stop().........................................................................................................55

Application Callback....................................................................................................55

Callback Prototype...................................................................................................56

Possible Events Received (Possible Values for parameter SPP_EVENTS) ....................................56

Interpretation of parameters of application callback ..........................................................56

MindTree Limited 17-June-2010 Page 3 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Handle ...............................................................................................................57

SPP Scenarios – Message Sequence Chart (MSC)....................................................................58

Initialization ..........................................................................................................59

SPP Connection Establishment .....................................................................................60

SPP Connection Release .............................................................................................62

SPP Shutdown with active connection ............................................................................63

SDP APIs ..................................................................................................................63

BT_sdp_open ..........................................................................................................64

BT_sdp_close..........................................................................................................64

BT_sdp_servicesearchattributerequest ...........................................................................65

SDP Structures/Data Types ............................................................................................66

SDP Handle ............................................................................................................66

SDP Callback .............................................................................................................67

SDP Response Callback ..............................................................................................67

SDP Utility APIs ..........................................................................................................69

BT_sdp_get_channel_number ......................................................................................70

SDP_SET_HANDLE.....................................................................................................70

GAP APIs ..................................................................................................................71

1) Device Setup APIs .................................................................................................74

BT_hci_reset ..........................................................................................................74

2) Controller Information APIs .....................................................................................74

BT_hci_read_local_version_information..........................................................................74

BT_hci_get_local_bd_addr..........................................................................................75

3) Controller Configuration APIs ...................................................................................76

BT_hci_change_local_name ........................................................................................76

BT_hci_write_class_of_device .....................................................................................76

BT_hci_read_current_iac_lap ......................................................................................77

BT_hci_write_current_iac_lap .....................................................................................78

MindTree Limited 17-June-2010 Page 4 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_hci_write_scan_enable .........................................................................................78

4) Device Discovery APIs ............................................................................................79

BT_hci_inquiry ........................................................................................................79

BT_hci_inquiry_cancel ..............................................................................................80

BT_hci_write_inquiry_scan_type ..................................................................................81

5) Connection Setup APIs ...........................................................................................81

BT_hci_create_connection..........................................................................................81

BT_hci_disconnect ...................................................................................................83

BT_hci_write_page_timeout........................................................................................83

BT_hci_write_page_scan_type .....................................................................................84

6) Connection State APIs ............................................................................................85

BT_hci_write_link_policy_settings ................................................................................85

BT_hci_sniff_mode...................................................................................................86

BT_hci_exit_sniff_mode.............................................................................................87

BT_hci_sniff_subrating (Bluetooth v2.1+EDR) ...................................................................88

7) LINK INFORMATION APIs..........................................................................................89

BT_hci_read_transmit_power_level...............................................................................89

BT_hci_read_rssi .....................................................................................................90

BT_hci_write_link_supervision_timeout ..........................................................................90

8) REMOTE INFORMATION APIs .....................................................................................91

BT_hci_remote_name_request.....................................................................................91

9) Testing and Vendor Specific APIs ...............................................................................92

BT_hci_enable_device_under_test_mode ........................................................................92

BT_hci_vendor_specific_command ................................................................................93

10) AUTHENTICATION AND ENCRYPTION APIs ....................................................................93

BT_sm_connection_request_reply.................................................................................93

BT_sm_pin_code_request_reply ...................................................................................94

BT_sm_get_device_link_key........................................................................................95

MindTree Limited 17-June-2010 Page 5 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_sm_link_key_request_reply ....................................................................................95

BT_sm_user_conf_request_reply ..................................................................................96

Security Manager Callbacks ...........................................................................................97

SM User Interface Notification Callback ..........................................................................97

SM UI Notification Callback Event Identifiers....................................................................98

Porting Security Manager Persistent Storage..........................................................................98

MSP430 resources used by the EtherMind SPP application ........................................................ 102

Commonly used vendor specific API commands .................................................................... 102

Explanation of the Sample Application (Accelerometer Data) ................................................... 103

Flow Diagram for Establishing SPP connection...................................................................... 108

Flow Diagram for SPP Disconnection ................................................................................. 109

Flow Diagram for SPP Disconnection ................................................................................. 110

Flow Diagram for SPP Disconnection ................................................................................. 111

Flow Diagram for sending SPP Data................................................................................... 111

Flow Diagram for sending SPP Data................................................................................... 112

Performance Analysis ................................................................................................... 113

1. Bluetooth Initialization Time ................................................................................ 113

2. CPU Utilization Calculation .................................................................................. 114

3. Information on Code & Data sizes........................................................................... 115

4. Throughput measurements ................................................................................... 117

5. LPM Measurements ............................................................................................ 118

APPENDIX.................................................................................................................. 119

How to build pre-existing project using IAR ...................................................................... 119

IAR Version Information.............................................................................................. 122

Frequently asked Questions ......................................................................................... 139

Abbreviations .......................................................................................................... 140

References ................................................................................................................ 140

MindTree Limited 17-June-2010 Page 6 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
ABSTRACT
This document gives an overview of the following:

 Hardware & software requirements needed to build the EtherMind Bluetooth SDK

 Overview of the software architecture.

 System requirements of the Bluetooth stack (Timers, Interrupts, API interfaces, Tasks etc.)

 Procedure to integrate the Bluetooth stack with the end user application.

 Minimum information on accessing the vendor specific API commands.

 Installation procedure and how to use EtherMind Bluetooth SDK.

 Explanation of sample application to send temperature data over SPP

 Performance analysis data related to related to Bluetooth initialization time, CPU utilization and
Code & Data sizes

MindTree Limited 17-June-2010 Page 7 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Revision History
Owner contact: ethermind_support@mindtree.com

Version Change Description Date

1 Initial Version 11th March 2010

Changes based on Feedback from TI. Additional information


2 20th March 2010
added based on changes in GUI

Updates to description of software architecture, LPM


3 21st April 2010
measurements and data throughput measurements

Added flow diagrams, aligned documentation for sdk config


parameters with source code, Updated code and data sizes for
4 temperature application, BT initialization times, LPM 14th May 2010
measurements, Diagram showing connection between
MSP430 and PAN1315ETU,

5 Updated based on additional feedback from TI. 21st May 2010

6 Refer to Issue id 30 for list of modifications 11th June 2010

Updates to throughput calculations, Incorporated other


7 14th June 2010
changes on feedback from TI

MindTree Limited 17-June-2010 Page 8 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Introduction
The EtherMind Bluetooth SDK provides a platform for end system designers to quickly evaluate EtherMind
Bluetooth Software Protocol Stack and Profiles, and implement applications using it. The SDK is available
for TI MSP430BT5190 processor. The reference applications and the development tool included in the kit
help implementers to quickly develop customized Bluetooth prototype applications on the
MSP430BT5190+CC2560 platform.

This document provides step-by-step procedures for installation of EtherMind Bluetooth SDK, and also
instructions for running the included reference applications.

For simplicity and documentation purpose, the BT_SDK_DIR will be used to denote the directory where
released EtherMind Bluetooth SDK components are unzipped. All directory paths in this document are
relative to BT_SDK_DIR.

The picture below shows the MSP430F5438 experimenter's board plugged in with the PAN1315ETU
Bluetooth connectivity board.

MindTree Limited 17-June-2010 Page 9 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
The picture of the PAN1315ETU Bluetooth connectivity board is shown below

MindTree Limited 17-June-2010 Page 10 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Requirements
Hardware
The following hardware is required to run evaluation/full package

 MSP-EXP430F5438 (AEC14718U). This can be obtained from http://www.ti-


estore.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=MSP-EXP430F5438.

 PAN1315ETU CC2560 Development board. This can be obtained from


http://www.panasonic.com/industrial/electronic-components/rf-
modules/bluetooth/pan1315etu.aspx

 USB Debug Interface (JFET)

The MSP430F5438 experimenter's board supports MSP430F5438, MSP430F5438A and the MSP430BT5190
chips. The MSP430BT5190 is the recommended chip for Bluetooth operation since the MSP430F5438 and
MSP430F5438A parts are subject to a timeout value during Bluetooth operation.

MindTree Limited 17-June-2010 Page 11 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
The following picture shows some of the connections available on the MSP430F5438 experimenter's board.

JP2 JP1 JTAG USB


Power JP3 Connector Connector Switch S3
Selector
switch

RF3  
 

RF2

LCD

RF1

Joystick Switch S2
Switch S1
LED1 & 2

MindTree Limited 17-June-2010 Page 12 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

The interface signals between the MSP430BT5190 and PAN1315 are as shown below:

MindTree Limited 17-June-2010 Page 13 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Software
The following software is required for installation of EtherMind Bluetooth SDK:

 IAR Embedded Workbench for MSP430. Click here to know the IAR Version Information.

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

Application

SPP Security
Manager
RFCOMM SDP

L2CAP GAP

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:

Application

Command & Data Queue

Write Task Read Task

Transport Driver

OS, HAL, Boot code

MindTree Limited 17-June-2010 Page 14 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Software tasks
The MSP430BT5190+CC2560 software solution uses FreeRTOS as the underlying OS. The source files for
FreeRTOS can be obtained from http://www.freertos.org.

FreeRTOS v6.0.2 is used in EtherMind Bluetooth SDK.

The software solution provides two packages:

1. Temperature package

2. Accelerometer package

Both the accelerometer and temperature packages link to the same set of libraries to build the final
application. The accelerometer package differs only at the application level. This developer guide focuses
mainly on the temperature package to explain the software architecture and provides a brief description
of the software flow for the accelerometer package.

The temperature application has four tasks – Read & Write tasks implemented by the EtherMind Bluetooth
SDK, User task implemented as part of the application and the default idle task created by the FreeRTOS.
The task priorities in the order of highest to lowest are read task, write task, user task and finally the idle
task. FreeRTOS is configured to be used in the pre-emptive scheduler mode.

The tasks implement the following functionality:

Read Task – Used to process the data received from the HCI UART. Depending upon the received packet
type, this is used to de-multiplex the incoming packet and call the appropriate handler

Write Task – Used to process the data packets from application layer and send them to HCI transport.

User Task – Used to handle the events generated by switch buttons and Timer1_A3 of MSP430BT5190.

The table below provides more detailed information about the different tasks:

Task Task Handler Name Filename Priority Task size


name (bytes)

ReadTask Not available to the Bluetooth Platform Library 3* 700


user

WriteTask Not available to the Bluetooth Core Library 2 600


user

UserTask user_task_routine() BT_SDK_DIR 1 550


\bluetooth\private\platforms\spp\temp_a
rch\msp430\user_task.c

IdleTask*** vApplicationIdleHook() BT_SDK_DIR 0 256


\bluetooth\export\temp_appl\appl_spp.c

MindTree Limited 17-June-2010 Page 15 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
* The greater the number higher the task priority

** xReadSemaphore is created as part of the library. However, it is visible as part of the UART ISR.
This should not be modified by the user.

*** Idle task is created by default as part of FreeRTOS scheduler

Semaphores
Tasks are created in a blocked state. Semaphores are used to synchronize the activities between the tasks
and ISRs.

Read semaphore moves the read task to ready state on receiving expected bytes of data from the UART.
After processing the received data, the read task is moved back to the blocked state.

User semaphore moves the user task to ready state on generating the events from switch buttons or
Timer1_A3. After processing these events, the user task is moved to blocked state.

Few other semaphores are used internally as part of the Bluetooth core library but are not exposed to the
end user.

The table below shows the semaphores that are exposed to the end user:

Semaphore name Blocking condition Name of source file Release condition Name of source file
where blocking Is where releasing is
done done

When expected BT_UART_ISR in


After processing the BT_SDK_DIR
Bluetooth Platform number of bytes are
xReadSemaphore required number of \bluetooth\private\p
Library received on BT latforms\arch\msp43
received bytes
UART
0\msp430_uart.c

TIMER1_A0_ISR in
BT_SDK_DIR
\bluetooth\private\p
TIMER1_A0_ISR in When any event are latforms\spp\temp_
After processing the BT_SDK_DIR generated either arch\msp430\user_t
events generated \bluetooth\private\p from Timer1_A3 or
xUserSemaphore ask.c and
from Timer1_A3 and latforms\spp\temp_ switches buttons
PORT2_VECTOR_ISR
switch buttons. arch\msp430\user_t (SW1, SW2 and in BT_SDK_DIR
ask.c Joystick)
\bluetooth\export\te
mp_appl\appl_menu
_pl.c

MindTree Limited 17-June-2010 Page 16 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

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

BT_UART_ISR ReadTask

If expected number No No If required number


of bytes received
of received bytes is
from UART? processed?

Yes Yes

Release Read Semaphore


Block Read Semaphore

Return from interrupt

MindTree Limited 17-June-2010 Page 17 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

TIMER1_A0_ISR PORT2_VECTOR_ISR

Have any menu No Is any button No


related timeouts pressed?
occurred?

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 17-June-2010 Page 18 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

Creating additional tasks


New tasks can be created by calling the function xTaskCreate() of FreeRTOS. A corresponding entry needs
to be made in bt_os_thread_property[] structure. This structure is used to describe the task name,
priority and task stack size as the parameters. The order of task creation call in the code has to match
the entries in bt_os_thread_property[] structure. The stack size of the task will be allocated from
heap_memory variable of heap_bt.c. Hence OS_MAX_HEAP_MEMORY needs to be increased accordingly.

The type of stack size is defined as 16-bits. So, if the stack size of a task needs to be 256 bytes, the
configuration of the task stack size needs to be specified as 128 and the OS_MAX_HEAP_MEMORY will need
to be increased by 256 bytes.

Creating additional semaphores


New semaphores can be created by calling the FreeRTOS APIs. Accordingly, the OS_MAX_HEAP_MEMORY
definition has to be increased accordingly based on the type and number of semaphore that need to be
added

Handling ISRs
The user application may have additional interrupts that may need to be handled. While handling these
ISRs, the user will need to ensure that the Bluetooth UART does not overflow. Additional ISRs also mean
that the read and write tasks can get interrupted by more sources. In these cases, if interrupts are being
nested, the corresponding task stack sizes will also have be increased accordingly.

MindTree Limited 17-June-2010 Page 19 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Memory Management
FreeRTOS provides three sample RAM allocation schemes (heap1.c, heap2.c, heap3.c) as part of its source
code. The application uses heap2.c for task and semaphore management. FreeRTOS API calls related to
memory management are documented extensively at
http://www.freertos.org/index.html?http://www.freertos.org/a00111.html

In addition, EtherMind Bluetooth SDK uses a customized scheme for managing the buffers and the source
code is part of heap_bt.c. The buffer management module is based on the multiple fixed size buffer
pools. The buffer pools are configurable in the terms of size and number of buffers. The buffer pools are
created from static heap_memory of heap_bt.c at the time of initialization and only managed henceforth.
This is used exclusively for Bluetooth related functionality and is not expected to be changed by the user.

MindTree Limited 17-June-2010 Page 20 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

+---bluetooth
+---build
| +---msp430
| +---spp
| +---accl
| | +---iar
| | +---release
| +---lib [EtherMind Stack, Profile and Platform Library]
| | +---iar
| +---temp
| | +---iar
| | +---release
| +---workspace [IAR workspace files]
| +---iar
+---export
| +---accl_appl [contains accelerometer application files]
| +---common_appl [contains common application files]
| +---FreeRTOS [contains FreeRTOS related files]
| | +---Demo
| | | +---msp430_IAR
| | +---License
| | +---Source
| | +---include
| | +---portable
| | +---IAR
| | | +---MSP430
| | +---MemMang [Memory management related files]
| +---include [Contains EtherMind Stack Header files ‘BT_*_api.h’]
| +---temp_appl [contains temperature package application files]
+---private
+---platforms [contains platform abstraction source code]
+---arch [architecture files]
| +---common
| +---msp430 [msp related architecture files]
| +---msp430F5438
| +---msp430f5438_hal [HAL Files]
+---spp [Files Specific to SPP]
+---accl_arch
| +---msp430
+---temp_arch
+---msp430

MindTree Limited 17-June-2010 Page 21 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Building Bluetooth SDK Components for MSP430
Follow the steps below to build the required binary components for the EtherMind Bluetooth SDK:

1. Configure following parameters in BT_SDK_DIR\bluetooth\export\temp_appl\sdk_config.h

o UART baud rate for communication between MSP430BT5190 and CC2560

o UART Port and pins related configurations

o Sniff mode, eHCILL mode related parameters configuration.

o System Clock and Low Power mode for MSP430Launch IAR MSP430 EW IDE

2. Open the workspace placed in BT_SDK_DIR\bluetooth\build\msp430\spp\workspace\iar\ SPP.eww

The workspace shows two projects accl and temp as shown below

o To build temperature package choose temp tab

o For the accelerometer package, choose accl tab

MindTree Limited 17-June-2010 Page 22 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
3. Then right click on the project name which needs to be built and chose “Make”. This will build
the required binary file that needs to be downloaded to the target. This is shown in the picture
below:

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.

Component Remarks

libspp_core.r43 EtherMind Stack API Library for


 EtherMind Initialization & Shutdown APIs
 EtherMind HCI APIs & Callback Management
 EtherMind SDP APIs & Callback Management, including SDP
Database APIs
 EtherMind RFCOMM APIs & Callback Management
 EtherMind Serial Port Profile (SPP) Library
libspp_pl.r43 Platform related Library
libs_TI_init_script.r43 Contains the TI initialization scripts for the Bluetooth controller

MindTree Limited 17-June-2010 Page 23 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuring EtherMind Stack API Library
The EtherMind configuration file “BT_SDK_DIR\bluetooth\export\temp_appl\sdk_config.h” can
be customized before building the temp/evaluation/accl applications using the EtherMind Stack API
library.

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

Important configurable parameters for MSP430 are given below:

Configuration Remarks

SDK_CONFIG_DEVICE_NAME 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

MindTree Limited 17-June-2010 Page 24 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

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 This parameter determines the behavior of the local


link manager when it receives a request from a
remote device or it determines itself to change the
master-slave role or to enter park state, hold, or sniff
mode
Default: 0x0005 (Enable Role Switch and Enable Sniff
Mode)
Example: 0x0002 (To Enable Hold mode only)
SDK_INQUIRY_LAP This is the LAP from which the inquiry access code is
derived when the inquiry procedure is made
Default: BT_LIAC (Limited Inquiry Access Code :
0x9e8b00)
Example: To perform Inquiry using General Inquiry
Access Code,this parameter has to be set to BT_GIAC
(0x9e8b33)
SDK_INQUIRY_LEN This parameter determines maximum amount of time
before the Inquiry is halted
Default: 0x0C (15 secs)
Example: If Inquiry has to be performed for say 9
seconds then this parameter has to be set to 0x07
which is (7 * 1.28 ~ 9 secs)
SDK_INQUIRY_SCAN_LAP This parameter determines the LAP(s) used to create
the Inquiry Access Codes (IAC) that the local
Bluetooth device is simultaneously scanning for during
Inquiry Scans.
Default: BT_GIAC, BT_LIAC (Implies local device uses
both General and Limited inquiry scan access codes)
Example: If local Bluetooth device has to use only
General Inquiry Access code then this parameter has
to be set to “BT_GIAC” only.
SDK_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_INQ_MAX_DEVICES Maximum number of remote devices (discovered
during Inquiry procedure) information stored by the
local device

MindTree Limited 17-June-2010 Page 25 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

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
(Indicated device is discoverable by limited inquiry
procedure, major device class is Toy and minor device
class is Game)
Example: If class of device needs to indicate
temperature capability then this parameter has to be
set to BT_MDC_HEALTH|BT_HMC_TEMPERATURE
SDK_IO_CAPABILITY Local Device Input Output capability.
Default: SM_IO_CAPABILITY_DISPLAY_YES_NO (Implies
Local Device has the ability to display or communicate
a 6 digit decimal number and has at least two buttons
that are mapped easily to 'yes' and 'no')
Example: If local device 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 : 0x0800 (1.2 seconds)

Example: If minimum sniff period required is 1 second


then this macro has to be set to 0x640 which is ((1 *
10 ^ 3)/0.625)

SDK_CONFIG_SNIFF_MAX_INTERVAL Maximum period in the sniff mode

Default value : 0x0800 (1.2 seconds)

Example: If maximum sniff period required is 1 secs


then this macro has to be set to 0x640 which is
((1 * 10 ^ 3)/0.625)

SDK_CONFIG_SNIFF_ATTEMPT Number of Baseband receive slots for sniff attempt

Default value: 2

Note: Using this configuration parameter sniff attempt


can be changed to say “10” baseband receive slots

MindTree Limited 17-June-2010 Page 26 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

SDK_CONFIG_SNIFF_TIMEOUT Number of Baseband receive slots for sniff timeout

Default value: 1

Note: Using this configuration parameter sniff timeout


can be changed to say “3” baseband receive slots

SDK_EHCILL_MODE Flag to enable or disable EHCILL mode.


Default: Enabled
Note: If EHCILL mode is not required then this
parameter should not be defined
SDK_EHCILL_INACTIVITY_TIMEOUT Time from UART inactivity to sending sleep_ind
packet from the controller to host. If this value = 0,
the device never sends the send sleep_ind packet.
Unit is frames (1.25 ms).

Default: 0x0960 (3 seconds)

Example: If required value is 4 seconds then this


macro has to be set to 0xC80 which is ((4 * 10 ^
3)/1.25)

SDK_EHCILL_RETRANSMISSION_TIMEOUT Time from sending WAKEUP_IND packet, to a


retransmission of this packet. If this value = 0, no
retransmission is done. Unit is frames (1.25 ms).

Default: 0x0190 (500 milli seconds)

Example: If required value is 600 milli seconds then


this macro has to be set to 0x1E0 which is ((0.6 * 10 ^
3)/1.25)

SDK_EHCILL_RTS_PULSE_WIDTH Each WAKEUP_IND packet can be accompanied by a


short pulse on the RTS pin. This parameter controls
the minimum width of this pulse. If this value = 0, no
pulse is sent.

Default: 0x0096 (150 micro seconds)

Example: If required value is 200 micro seconds then


this macro has to be set to 0x00C8.

SDK_LPS_MODE Flag to enable or disable Low Power Scan (LPS) mode.

Default: Enabled

MindTree Limited 17-June-2010 Page 27 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

Note: If LPS mode is not required then this parameter


should not be defined

SDK_LPS_DISABLE_SWEEPS_LENGTH This parameter determines the number of scans


required in order to get back into LPS mode.

Default: 0x012C (300)

SDK_LPS_POSITIVE_SWEEPS_TH This parameter determines number of consequent LPS


scans that trigger regular scan

Default: 0x0004

SDK_LPS_MIN_SCAN_INTERVAL This parameter determines minimum time between


LPS scans in frames (of length 1.25 milli secs)

Default: 0x0A (12.5 milli secs)

Example: If the minimum time between LPS scans


needed is 20 milli secs then this has to be set to 0x10

MAX_OUTPUT_POWER_LEVEL This parameter determines the maximum output


power level.

Default: OP_POWER_6_0 (Enumerated values defined


in BT_SDK_DIR/bluetooth/export/
temp_appl/appl_menu_pl.h.

Example: If the maximum output level required is


10db, then OP_POWER_10_0 has to be used

SDK_CONFIG_SPP_PEER_SERVER_CHANNEL Port address of peer SPP de-vice, to be used only if


the application needs to initiate connection with a
fixed SPP de-vice on this fixed port. It is not necessary
that if SDK_CONFIG_SPP_PEER_BD_ADDR is defined
then this configuration parameter is also defined.

Default : 0x01

Example: If the peer server channel number needed is


0x01, then 0x01 has to be set.

SDK_CONFIG_SPP_AUTHENTICATION_LEVEL This parameter determines the SPP Service


Authentication requirements.

MindTree Limited 17-June-2010 Page 28 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

Default: SM_SERVICE_SECURITY_LEVEL_3 (Which


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

Default: SM_SERVICE_AUTHORIZATION_NONE (Which


implies no authorization is needed for accessing SPP
service)

Example: If Authorization is required then this


parameter needs to be set to
“SM_SERVICE_AUTHORIZATION_REQUIRED”

SDK_CONFIG_SPP_BONDING_REQ This parameter determines the SPP Service Bonding


requirements.

Default: 0x00 (Implies No Bonding)

Example: If Bonding is required then this parameter


has to be set to 0x01.

SDK_SPP_ATTRIB_DATA_LEN This parameter determines the SDP query buffer


length for SPP.

Default: 48 bytes

BT_UART_CONFIG_BAUDRATE UART baud rate to be used for the communication


between MSP430 and CC2560

Default: BAUDRATE_115200

Example: Once the firmware up gradation of CC2560


is complete, UART baud rate of CC2560 will be
changed to the value defined.

BT_UART_PORT_SEL UART tx and rx port selection register

Default : P9SEL

Example : If Pin8.4 and Pin8.5 are used for HCI_TX


and HCI_RX signals on MSP430 then

MindTree Limited 17-June-2010 Page 29 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

BT_UART_PORT_SEL should be set to P8SEL

BT_UART_PORT_DIR UART tx and rx port direction register

Default: P9DIR

Example: If Pin8.4 and Pin8.5 are used for HCI_TX and


HCI_RX signals on MSP430
Then BT_UART_PORT_DIR should be set to P8DIR

BT_UART_PORT_OUT

BT_UART_TX_PIN UART tx pin

Default: BIT4

Example: if Pin 7.6 is used for HCI_TX signal then the


value should be set to BIT6

BT_UART_RX_PIN UART rx pin

Defualt:BIT5

Example: if Pin 7.7 is used for HCI_RX signal then the


value should be set to BIT7

BT_UART_RTS_PORT_DIR UART RTS port direction selection register

Defualt:P1DIR

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2DIR

BT_UART_CTS_PORT_DIR UART CTS port direction selection register

Defualt:P1DIR

Example: If pin3.2 are used as HCI_RTS signal for


MSP430 then the value should be set to P3DIR

BT_UART_CTS_PIN UART CTS pin

Defualt:BIT5

Example: If Pin 2.6 is used as HCI_CTS signal for


MSP430 then the value should be set to BIT6

BT_UART_RTS_PIN UART RTS pin

Defualt:BIT2

Example: If pin1.3 are used as HCI_RTS signal for


MSP430 then the value should be set to BIT3

MindTree Limited 17-June-2010 Page 30 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

BT_UART_CTS_PORT_IES UART CTS Port IES

Default : P1IES

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2IES

BT_UART_CTS_PORT_IFG UART CTS PORT IFG

Default : P1IFG

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2IFG

BT_UART_CTS_PORT_IE UART CTS PORT IE

Default : P1IE

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2IE

BT_UART_CTS_PORT_SEL UART CTS PORT SELECT

Default : P1SEL

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2SEL

BT_UART_RTS_PORT_SEL UART RTS PORT SELECT

Default : P1SEL

Example: If Pin 2.5 is used as HCI_RTS signal for


MSP430 then the value should be set to P2SEL

BT_UART_RTS_PORT_OUT UART RTS port output register

Default: P1OUT

Example: If pin3.2 are used as HCI_RTS signal for


MSP430 then the value should be set to P3OUT

BT_UART_CTS_PORT_OUT UART CTS port output register

Default: P1OUT

Example: If Pin 2.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P2OUT

BT_UART_CTS_PORT_IN UART CTS port input register

Default: P1IN

MindTree Limited 17-June-2010 Page 31 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

Example: If Pin 3.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P3IN

BT_UART_CTS_PORT_REN This parameter is used to define CTS Port Register


pull up enable

Default : P1REN

Example: If Pin 3.5 is used as HCI_CTS signal for


MSP430 then the value should be set to P3REN

BT_UART_REG_UCAXCTL0 UART control register 0

Default: UCA2CTL0

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2CTL0

BT_UART_REG_UCAXCTL1 UART control register 1

Default: UCA2CTL1

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2CTL1

BT_UART_REG_UCAXBR0 UART baudrate selection register 0

Default: UCA2BR0

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2BR0

BT_UART_REG_UCAXBR1 UART baudrate selection register 1

Default: UCA2BR1

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2BR1

BT_UART_REG_UCAXIV UART Interrupt vector register

MindTree Limited 17-June-2010 Page 32 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

Default: UCA2IV

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2IV

BT_UART_REG_UCAXSTAT UART output status register

Default: UCA2STAT

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2STAT

BT_UART_REG_UCAXTXBUF UART Tx buffer register

Default: UCA2TXBUF

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2TXBUF

BT_UART_REG_UCAXRXBUF UART Rx buffer register

Default: UCA2RXBUF

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2RXBUF

BT_UART_REG_UCAXMCTL UART modulation control register

Default: UCA2MCTL

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller, then the value should be set as
UCA2MCTL

BT_UART_REG_UCAXIE UART interrupt enable register

Default: UCA2IE

Example: If USCI_A2 module on MSP430 is used for

MindTree Limited 17-June-2010 Page 33 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

UART transport between MSP430 and


CC2560 controller, then the value should be set as
UCA2IE

BT_UART_REG_UCAXIFG UART interrupt flag register

Default: UCA2IFG

Example: If USCI_A2 module on MSP430 is used for


UART transport between MSP430 and
CC2560 controller,then the value should be set as
UCA2IFG

BT_UART_VECTOR This parameter defines UART interrupt vector register

Default : USCI_A2_VECTOR

Example : Example: If USCI_A2 module on MSP430 is


used for UART transport between MSP430 and
CC2560 controller,then the value should be set as
USCI_A2_VECTOR

BT_BRF_CLK_PORT_SEL BRF Clock Port Select

Default: P11SEL

Example: If Pin 11.0 is used as ACLK for MSP430 then


the value should be set to P11SEL

BT_BRF_CLK_PORT_PIN BRF Clock Port Pin

Default: BIT0

Example: If Pin 11.0 is used as ACLK for MSP430 then


the value should be set to BIT0

BT_BRF_NSHUTDOWN_PORT_DIR BRF nShutdown Port Direction

Default: P1DIR

Example: If Pin 1.6 is used as nSHUTDOWN for


CC2560 then the value should be set to P1DIR

BT_BRF_NSHUTDOWN_PORT_PIN BRF nShutdown Port Pin

Default: BIT6

Example: If Pin 1.6 is used as nSHUTDOWN for


CC2560 then the value should be set to BIT6

MindTree Limited 17-June-2010 Page 34 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Configuration Remarks

BT_BRF_NSHUTDOWN_PORT_OUT BRF nShutdown Port Out

Default: P1OUT

Example: If Pin 1.6 is used as nSHUTDOWN for


CC2560 then the value should be set to P1OUT

SYSTEM_CLK set the system clock to any value defined in


hal_board.h

Default: SYSCLK_18MHZ

Example : to configure the system clock of


MSP430BT5190 processor to 12Mhz set the value to
SYSCLK_12MHZ
The configuration values are defined in hal_board.h

INACTIVITY_TIMEOUT This parameter defines the inactivity timeout for


MSP430 to enter LPM

Default : 30 seconds

Example: If MSP430 needs to enter LPM after 15


seconds of inactivity, then it should be set to 15
seconds.

MSP430_LPM_ENABLE This parameter enables Low Power Mode feature of


MSP430

Default : Enabled

Example : To disable, comment the parameter

SDK_MSP430_LPM Define the low power mode for MSP430

Default: MSP430_LPM_3

Example: If you want to set LPM0 as Low power mode


for MSP430 then set the value to MSP430_LPM_0

MindTree Limited 17-June-2010 Page 35 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


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

Device 2 running
EtherMind stack

SPP Data SPP Data

SPP Data

Device 1 running
EtherMind stack Device 3 running
EtherMind stack

MindTree Limited 17-June-2010 Page 36 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Steps to set up:

1. Connect the PAN1315ETU module to MSP-EXP430F5438 as described in the Requirements section.


2. Make sure you have connected the ‘RF PWR’ jumper (JP3) and LED2 (red LED )on the
PAN1315ETU is ON
3. Load the SPP binary image onto the MSP-EXP430F5438 using the FET as described in the
“Appendix”
4. Power on the MSP430 board using Battery or USB. To power on using battery, place the switch
‘POWER SELECTOR (SW1)’ at ‘BATT’ position. To power on using USB, place the switch
SW1 at ‘USB’ position
5. Once powered on the following display will appear on the LCD

    MAIN MENU 
BLUETOOTH  
SETTINGS 
INFO 

6. By default Backlight of the LCD will be OFF


Refer “Controlling the backlight of LCD ” section for controlling backlight of LCD
7. The LCD is used for both as a menu selector and Status indicator.
User has three options:
BLUETOOTH, SETTINGS and INFO.
Against each option, the following sub menus and their current status are shown.

 BLUETOOTH MENU 
BLUETOOTH   : OFF  
VISIBLE     : NO 
START INQUIRY 
CONNECT     : 0 
DATASEND    : 0 
DISCONNECT 
TEMPERATURE 
DIAGNOSTICS 

  SETTINGS MENU 
SET FREQUENCY 
SET BAUDRATE 

MindTree Limited 17-June-2010 Page 37 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
    INFO MENU 
VERSION   RC2.2 
FREQUENCY 25MHz 
BAUDRATE  921600 
DEV TYPE  BT5190 
VOLTAGE   3.3V 
 

User can select the option using Joystick to do opposite of the current status
For Example:
“BLUETOOTH: ON” means the Bluetooth is powered ON and to power off Bluetooth user has to
select this option using joystick.
Please refer the section “Usage of Menu options”, “LED Status indications” and “LCD Status
indications”.
8. Select the “BLUETOOTH ON” option on LCD using the details given in “usage of menu options”
section
9. “LED1” (RED LED) on the MSP430 board starts blinking and after a few seconds becomes stable.
The LCD should indicate the status against “BLUETOOTH :” as “ON”
If LED stops blinking and the LCD status against “BLUETOOTH :” is OFF, then switching on
Bluetooth was unsuccessful. In that case, reset the board and repeat step 9
10. Make the device discoverable by selecting the “VISIBLE: ” option on LCD.
11. In the status area, the status against “VISIBLE: “changes to “YES”.

 BLUETOOTH MENU    
BLUETOOTH   : ON 
VISIBLE     : YES 
START INQUIRY 
CONNECT     : 0 
DATASEND    : 0 
DISCONNECT 
TEMPERATURE 
DIAGNOSTICS 

12. Select start inquiry which searches for the Bluetooth devices and the list gets populated with the
BD address and BT device name toggling for 3 sec.
13. After the inquiry is completed, in the Inquiry Menu screen, the status changes to “COMPLETED” .
14. Select BLUETOOTH MENU -> SPP CONNECT -> CONNECT DEVICE option. Here, the inquired device
with the name starting from “BlueMSP” gets displayed. Choose a device to get connected.

  CONNECT PEER 
BlueMSP‐5C2F 
BlueMSP‐5CA3 

MindTree Limited 17-June-2010 Page 38 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
NOTE: After it’s connected, the device will no longer be there in the connected device list. It
moves to the disconnected device list.
15. LED2 turns ON and the status against “SPP CONNECT” changes to “1” indicating that one device is
connected.
 BLUETOOTH MENU 
BLUETOOTH   : ON 
VISIBLE     : YES 
START INQUIRY 
CONNECT     : 1 
DATASEND    : 0 
DISCONNECT 
TEMPERATURE 
DIAGNOSTICS 

16. To disconnect the connected device, Select BLUETOOTH MENU -> SPP CONNECT -> DISCONNECT
DEVICE and the device to disconnect. On doing this, LED2 turns OFF and the status of “SPP
CONNECT” changes to “NO”.
17. For SPP data transfer, select BLUETOOTH MENU -> DATSEND option on the board. It lists down the
connected devices. Select the device to which the SPP temperature data has to be sent.
18. LED 2 on MSP430board starts blinking and the status against “DATASEND” changes to “1”
indicating that the SPP data is being sent to one peer device.

 BLUETOOTH MENU  
BLUETOOTH   : ON 
VISIBLE     : YES 
START INQUIRY 
CONNECT     : 1 
DATASEND    : 1 
DISCONNECT 
TEMPERATURE 
DIAGNOSTICS 

19. In DeviceB, Select BLUETOOTH MENU -> TEMPERATURE to view its own board’s temperature and
temperature sent by the peer1(DeviceA).
20. Select BLUETOOTH MENU -> DIAGNOSTICS to view the local device name, BD Address, Peer1
menu and Peer2 menu.

  DIAGNOSTICS 
BlueMSP‐9324 
ADR 9324DAD42300 
PEER1 MENU 
PEER2 MENU 

MindTree Limited 17-June-2010 Page 39 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
21. If the user wants to send SPP data to Peer2 as well, then repeat the steps from step9. Accordingly
the status change should happen.

Navigating the menu on the LCD


The joystick is used to select the various options on the menu displayed on the LCD. The joystick is be
mapped to UP, DOWN, LEFT, RIGHT and CENTER keys. This is explained below:

 Moving the joystick DOWN navigates to the next item


 Moving the joystick UP navigates to the previous menu item
 Moving the joystick LEFT navigates to the previous screen. If there is no previous screen, no
further action is performed.
 Moving the joystick RIGHT does not cause any action to take place.
 Pressing the joystick CENTER button selects an option. This is done only on items that have
been highlighted.

Examples of Menu Navigation


BLUETOOTH MENU
Select the “BLUETOOTH” option on the top level menu to perform Bluetooth related operations.

 Select “BLUETOOTH” option to toggle the ON/OFF status of Bluetooth.


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

MindTree Limited 17-June-2010 Page 40 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SETTINGS MENU
Select the “SETTINGS” option on the top level menu to change the frequency and baud rate operation.

 “SET FREQUENCY” to set the frequency


 “SET BAUDRATE” to set the baudrate

Currently, only the following combinations are supported:


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

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

LCD status indications

Line on status area Indication against it Meaning

BLUETOOTH: ON Bluetooth powered ON

OFF Bluetooth Powered OFF

VISIBLE: YES The device will respond to the inquiry by peer


device

NO The device will not respond to the inquiry by


peer device

CONNECT: 0 or 1 or 2 Number of active SPP connections.

DATA SEND: 0 or 1 or 2 No of devices to which data is getting


transmitted

MindTree Limited 17-June-2010 Page 41 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
LED status indications
There are two LEDs on the MSP430F5438A Experimenter Board. LED1 is red & LED2 is yellow. The table
below describes shows the various states of the LEDs

LED1 (Red) LED2 (Yellow) Description

OFF OFF Bluetooth powered off

OFF ON Error condition

OFF BLINKING Error condition

ON OFF Bluetooth powered ON. No active SPP connections.

ON ON SPP connection established to peer device

ON BLINKING SPP data is being transferred.

BLINKING BLINKING Error condition

BLINKING OFF Bluetooth powering on in progress

BLINKING ON Error condition

LCD backlight control


By default, the backlight of LCD will be OFF. The LCD backlight of the LCD can be toggled by pressing the
switch “S1”.

Note that the backlight is automatically switched off when MSP430 enters LPM mode.

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 Low-
Power Applications -1.5 of MSP430x5xx Family User's Guide”
 

MindTree Limited 17-June-2010 Page 42 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
LPM implementation in sample SPP 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/temp_appl/sdk_config.h to any value given in table depending on the
low power mode chosen:

Low Power mode Definition

LPM 0 MSP430_LPM_0

LPM1 MSP430_LPM_1

LPM2 MSP430_LPM_2

LPM3 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 17-June-2010 Page 43 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
 

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 “eHCILL mode” 
 

Maximum output power configurations for CC2560 Bluetooth


Controller
” sdk_set_max_output_power” API present in
BT_SDK_DIR/bluetooth/private/platforms/spp/temp_arch/msp430/sdk_pl.h is provided to set the
maximum output power at the CC2560 chip port. API Description is given below:

sdk_set_max_output_power ()
API_RESULT sdk_set_max_output_power
(
UCHAR max_power
)
Parameters:
max_power: Maximum output power in dBm. Valid values are OP_POWER_6 (6dBm) and
OP_POWER_10 (10 dBm).
Returns:
API_RESULT: API_SUCCESS or one of the error codes as defined in BT_error.h

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. 
 

eHCILL mode
After Bluetooth is turned “ON” successfully, eHCILL mode is configured based on the parameters present
in the BT_SDK_DIR/bluetooth/export/temp_appl/sdk_config.h file (Refer Configuring EtherMind Stack
API Library to configure the eHCILL mode parameters). During inactivity, controller sends deep sleep
indication based on the configured inactivity timeout value and host acknowledges it by sending deep
sleep acknowledgement. If host has any data to send and eHCILL state is “sleep” then it sends wake up

MindTree Limited 17-June-2010 Page 44 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
indication to the controller and awaits wake up acknowledgment before sending actual data. On the other
hand if controller has any data to send to host and eHCILL state is “sleep” then controller sends wake up
indication to the host and awaits wake up acknowledgement before sending the actual data to the host.
To know more refer to “Enhanced HCILL: Four-Wire Power Management Protocol”

The following table gives more information related to the implementation in the source code.

Variable name Filename Data type Decription

BT_SDK_DIR\bluetooth\e
Flag to indicate current eHCILL
deep_sleep_state xport\common_appl\appl_b UCHAR
state For Ex: Awake, Sleep etc
t_rf.c

Parameters to
BT_SDK_DIR\bluetooth\e
HCI_VS_Sleep_Protocols_Configu
sleep_enable_param xport\common_appl\appl_b static UCHAR
rations.These parameters are
t_rf.c
used to enable eHCILL mode

Parameters to
BT_SDK_DIR\bluetooth\e
HCI_VS_Sleep_Protocols_Configu
sleep_disable_param xport\common_appl\appl_b static UCHAR
rations.These parameters are
t_rf.c
used to disable eHCILL mode

Parameters to HCI_VS_
BT_SDK_DIR\bluetooth\e
HCILL_Parameters. These
sleep_config_param xport\common_appl\appl_b static UCHAR
parameters control the behavior
t_rf.c
of the deep sleep protocol

The following table lists the eHCILL related APIs:

Function name Filename Description

sdk_deep_sleep_config BT_SDK_DIR\blueto Configures deep sleep mode


oth\export\common_a
ppl\appl_bt_rf.c

sdk_deep_sleep_enable BT_SDK_DIR\blueto Enables deep sleep mode


oth\export\common_a
ppl\appl_bt_rf.c

sdk_deep_sleep_disable BT_SDK_DIR\blueto Disables deep sleep mode


oth\export\common_a
ppl\appl_bt_rf.c

ehcill_uart_handler BT_SDK_DIR\blueto Handles the Ehcill command received on the UART


oth\export\common_a
ppl\appl_bt_rf.c

MindTree Limited 17-June-2010 Page 45 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
ehcill_handle_sleep_ind BT_SDK_DIR\blueto Handles deep sleep indication received from the
oth\export\common_a controller
ppl\appl_bt_rf.c

ehcill_send_deep_sleep_ BT_SDK_DIR\blueto Function to send deep sleep acknowledgement to


ack oth\export\common_a the controller
ppl\appl_bt_rf.c

ehcill_handle_wake_up_i BT_SDK_DIR\blueto Handles wake up indication received from the


nd oth\export\common_a controller
ppl\appl_bt_rf.c

ehcill_handle_wake_up_a BT_SDK_DIR\blueto Function to handle wake up acknowledgement


ck oth\export\common_a received from the controller
ppl\appl_bt_rf.c

ehcill_send_wakeup_ack BT_SDK_DIR\blueto Function to send wake up acknowledgment to the


oth\export\common_a controller
ppl\appl_bt_rf.c

ehcill_send_wakeup_ind BT_SDK_DIR\blueto Function to send wake up indication to the controller


oth\export\common_a
ppl\appl_bt_rf.c

uart_enable_cts_interrup BT_SDK_DIR\blueto Function used to set CTS pin of UART in interrupt


t oth\export\common_a mode
ppl\appl_bt_rf.c

uart_disable_cts_interrup BT_SDK_DIR\blueto Function used to set CTS pin as normal GPIO


t oth\export\common_a
ppl\appl_bt_rf.c

PORT1_VECTOR_ISR BT_SDK_DIR\blueto The ISR is used for the eHCILL wake up from CTS
oth\export\common_a functionality. According to eHCILL implementation,
ppl\appl_bt_rf.c before going to sleep CTS pin of the host is
configured as interrupt pin. The controller issues a
pulse on the CTS signal to wake up the host. As CTS
is connected to PORT 1 pin , the pulse is detected as
PORT 1 interrupt

MindTree Limited 17-June-2010 Page 46 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Sniff mode
Sequence chart for Sniff Mechanism:

Local Device

Peer Device
Application BT Stack

Connection Establishment
BT_hci_sniff_mode(SNIFF_MAX_INTERVAL
SNIFF_MIN_INTERVAL, SNIFF_ATTEMPT, SNIFF_TIMEOUT )
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


Optional
BT_hci_sniff_mode(SNIFF_MAX_INTERVAL
SNIFF_MIN_INTERVAL, SNIFF_ATTEMPT, SNIFF_TIMEOUT )
HCI_COMMAND_STATUS_EVENT
(HCI_SNIFF_MODE_OPCODE)
Enable Sniff
HCI_MODE_CHANGE_EVENT
(SNIFF_MODE , SNIFF_INTERVAL)

Sniff Mode

BT_hci_exit_sniff_mode ( )
HCI_COMMAND_STATUS_EVENT
(HCI_EXIT_SNIFF_MODE_OPCODE)
Disable Sniff
HCI_MODE_CHANGE_EVENT
(ACTIVE_MODE)

Disconnection

APIs
1) To enter Sniff mode:

BT_hci_sniff_mode();

Note: Sniff mode shall be enabled after SPP connection (local  BT_spp_connect() or from peer).

Example in the appl_spp.c file under the appl_spp_notify_cb() [this callback is registered in the
BT_spp_init()] sniff mode is enabled under the events  SPP_CONNECT_CNF or SPP_CONNECT_IND.
Parameters for this API are configurable in sdk_config.h file.

MindTree Limited 17-June-2010 Page 47 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Events associated with sniff mode enable API:

1) HCI_COMMAND_STATUS_EVENT

Important event parameters:

Status - 0x00(Success) or 0x01-0xFF (Command Failed)

Opcode - HCI_SNIFF_MODE_OPCODE

Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback()
function [this callback is registered in the BT_bluetooth_on() function].

2) HCI_MODE_CHANGE_EVENT

Important event parameters:

Status - 0x00(Success) or 0x01-0xFF (Command Failed)

Current Mode - SNIFF_MODE (0x02)

Interval - SNIFF_INTERVAL

Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback()
function [this callback is registered in the BT_bluetooth_on() function].

2) To Exit Sniff mode:

BT_hci_exit_sniff_mode();

Note: Sniff mode shall be disabled before disconnecting SPP connection (local  BT_spp_disconnect())

Example in the appl_sdk.c file under the sdk_bluetooth_menu_handler(), in case OP_PEER_DISCONNECT


sniff mode is disabled before initiating SPP Disconnection.

Events associated with sniff mode enable API:

1) HCI_COMMAND_STATUS_EVENT

Important event parameters:

Status - 0x00(Success) or 0x01-0xFF (Command Failed)

Opcode - HCI_EXIT_SNIFF_MODE_OPCODE

Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback()
function [this callback is registered in the BT_bluetooth_on() function].

MindTree Limited 17-June-2010 Page 48 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
2) HCI_MODE_CHANGE_EVENT

Important event parameters:

Status - 0x00(Success) or 0x01-0xFF (Command Failed)

Current Mode - ACTIVE_MODE (0x00)

Example this event is handled in the appl_cb.c file under the sdk_hci_event_indication_callback()
function [this callback is registered in the BT_bluetooth_on() function].

APIs for controlling the SPP application


General Stack APIs

API Brief Description

BT_ethermind_init This API initializes the EtherMind Bluetooth stack.

BT_bluetooth_on This API Starts the Bluetooth functionality of the device.

BT_bluetooth_off This API Stops the Bluetooth functionality of the device.

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

EtherMind Stack Initialization


Name BT_ethermind_init(): To initialize the EtherMind Bluetooth stack

Synopsis #include “BT_common.h”


void BT_ethermind_init (void);
Description This is the first routine that the applications/profiles should call to initialize the entire
stack, including all its modules. During this initialization, various modules create and
initialize their respective synchronization and conditional variables and allocate any
static memory (if required). All modules perform platform level initialization during this
process. The Bluetooth level initialization is not performed here.

Internally, BT_ethermind_init() calls the initialization routine of each module, one


after the other. It follows a bottom-up approach – that is, the lower layers are initialized
before the higher layers. The Debug, Timer Libraries, and Transport modules are
initialized before others. The EtherMind tasks are created during this time – and they are
moved to a dormant state.

Internal protocol modules provide an “EtherMind INIT” initialization handler, which is


invoked from BT_ethermind_init(). The naming convention for this initialization
handler is as follows (unless otherwise specified):

void <module_name>_init ( void );

IN None

MindTree Limited 17-June-2010 Page 49 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Parameters

OUT None
Parameters

Function None
Return

Notes Application initialization routines will not be invoked by BT_ethermind_init() API.


This API only performs initialization of EtherMind Stack modules.

Switching Bluetooth On
Name BT_bluetooth_on(): Start the Bluetooth functionality of the device.

Synopsis #include “BT_common.h”

API_RESULT BT_bluetooth_on
(
API_RESULT (* hci_event_ind_cb)
(UCHAR, UCHAR *, UCHAR),
API_RESULT (* bt_on_complete_cb) (void),
CHAR * local_name
);
Description This API brings the stack alive and performs the Bluetooth level initialization – whereby
each EtherMind Stack module is initialized for their internal data structures and
variables. Once this initialization is complete (successfully), the Stack is ready for use
for Bluetooth related functionalities.

The EtherMind Read, Write and optional Timer tasks, which were created during
BT_ethermind_init() API, are signaled to wake up from their dormant state to start
servicing their respective queues.

The BT_bluetooth_on() is particularly important for the HCI module. This is the time
when the HCI-Transport interface (UART/USB/BCSP/SDIO etc) is opened and HCI sends a
number of commands, one after the other, to the Host Controller (Baseband & LMP)
hardware – such as, HCI Reset, HCI Read BD_ADDR, HCI Read Buffer Size etc. – which are
fundamental for the operation of the stack. The “HCI Reset” Command, specifically,
resets the Host Controller hardware to bring it up in initial/default state.

All EtherMind Stack protocol modules provide a “Bluetooth ON” initialization handler,
which is invoked from BT_bluetooth_on(). The naming convention for this
initialization handler is as follows (unless otherwise specified):

void <module_name>_bt_init (void);


If this API returns with API_SUCCESS, it only means that Bluetooth-ON procedures are
started, but not completed. Completion of the same will be indicated to the application
by invoking the supplied bt_on_complete_cb function.

IN hci_event_ind_cb Application registered HCI Event Indication Callback function.


Parameters This callback function is optional, and application may choose to pass NULL, if HCI Event

MindTree Limited 17-June-2010 Page 50 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Indications are not required.

Bt_on_complete_cb Application registered Callback function that is called on


completion of the Bluetooth-ON procedures. This callback function is mandatory.

Local_name This parameter is a pointer to a CHAR array, containing the name to be


set in the local Bluetooth device (Host Controller Hardware). The name string must be
null terminated.

OUT None
Parameters

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


Return

Notes Application and Profile Initialization functions will not be called from this API.

The profiles should be initialized from the Application above only after the
BT_bluetooth_on() API succeeds.

The HCI Callback event indication callback function can be registered later also by
calling an HCI API BT_hci_register_event_indication_callback().

Following HCI Commands are transmitted to Host Controller hardware, during the
execution of this API:

 HCI Reset
 HCI Read BD_ADDR
 HCI Read Buffer Size
 HCI Write Page Timeout
 HCI Change/Write Local Name

Switching Bluetooth Off


Name BT_bluetooth_off(): Start the Bluetooth functionality on the device.

Synopsis #include “BT_common.h”


API_RESULT BT_bluetooth_off ( void );
Description This routine shuts down the stack, and re-initializes data structures, states and variables
of various stack modules. The EtherMind Read, Write and optional Timer tasks return to
their dormant state. The HCI-Transport interface is closed, and it is not possible to
communicate to the Bluetooth device (Host Controller hardware).

For all practical purpose, on return of this API, the EtherMind stack returns to pre
Bluetooth-ON state. After this call has succeeded, another Bluetooth-ON can be
performed, using the BT_bluetooth_on() API, to revive the stack (and its modules).

Internal protocol modules provide a “Bluetooth OFF” shutdown handler, which is invoked
from BT_bluetooth_off(). The naming convention for this shutdown handler is as
follows (unless otherwise specified):

void <module_name>_bt_shutdown (void);


IN None

MindTree Limited 17-June-2010 Page 51 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Parameters

OUT None
Parameters

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


Return

Notes Application, as well as all currently active EtherMind Profiles, should be shut down prior
to calling BT_Bluetooth_off() API. Failure to do so may result in unspecified
behavior by the stack modules.

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

API Brief Description

BT_spp_init This API registers application callback function with the Serial
Port profile and initializes Serial Port Profile on the device.

BT_spp_start This API starts the profile by preparing the SPP device to
accept connections from peer device

BT_spp_connect This API establishes the profile level connection between Dev A
and Dev B.

BT_spp_disconnect This API disconnects the existing profile level connection


between Dev A and Dev B.

BT_spp_send This API allows user to send data to the peer SPP device.

BT_spp_stop This API switches OFF the SPP service on the local device.

The detailed description of the SPP APIs is given below.

BT_spp_init ()
#include ”BT_spp_api.h”

API_RESULT BT_spp_init
(
IN SPP_APPL_EVENT_NOTIFY_CB notify_cb
)
This API registers the application callback function with the SPP and initializes the Serial Port Profile.
Parameters:
notify_cb: Application callback function pointer.
Returns:
API_RESULT:
API_SUCCESS: Indicates Serial Port profile initialized successfully
SPP_ERR_NULL_PARAMETER: Indicates application is trying to register NULL as callback.

MindTree Limited 17-June-2010 Page 52 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP_ERR_MUTEX_INIT_FAILED: Indicates initialization failed due to failure to initialize mutex.
Note:
 No event is indicated through the application callback on completion of this procedure.
 This API should be called only once after device Power ON. This is the first API to be
called for SPP module.
 The callback function is used by SPP to report asynchronous events and to confirm
completion of API requests from application.
 Refer Application Callback for details on callback function.
Events:
None

BT_spp_start ()
#include ”BT_spp_api.h”

API_RESULT BT_spp_start
(
IN UCHAR server_channel
)
This API starts the SPP instance. , SPP implementation starts listening on the RFCOMM Channel
specified. It enables the application to use the service of the Serial Port profile.
Parameters:
server_channel: The RFCOMM server channel in which the SPP device will be listening for peer
initiated connection.
Returns:
API_RESULT: Result of the API.
API_SUCCESS: Indicates SPP started successfully
SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong HS State.
SPP_ERR_NO_FREE_ENTITY: Cannot Start. Free entity not available to allow incoming
connections.
Note:
No event is indicated through the application callback on completion of this procedure.
Application should activate service discovery database of SPP before calling this API.
Application should get the server channel to listen for connection from service discovery
database.
Events:
None

BT_spp_connect ()
#include ”BT_spp_api.h”

API_RESULT BT_spp_connect
(
IN UCHAR* bd_addr,
IN UCHAR server_channel
)
This API establishes service level connection between SPP Dev A and SPP Dev B
Parameters:

MindTree Limited 17-June-2010 Page 53 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
bd_addr : Bluetooth Device address of the remote SPP Device with which connection needs to be
established.
server_channel : The server channel in which connection has to be initiated.
Returns:
API_RESULT: Result of the API.
API_SUCCESS: Indicates connection procedure initiated successfully
SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong SPP State.
SPP_ERR_MAX_CONNECT_LIMIT_REACHED: SPP already connected to maximum number of
peers. Cannot initiate the SPP connection.
Note:
Result of the connection setup procedure completion will be indicated through application
callback.
The server channel to initiate connection has to be got by the doing service discovery of the
remote SPP Device.
Events:
SPP_CONNECT_CNF event is indicated in the callback.

BT_spp_disconnect ()
#include ”BT_spp_api.h”

API_RESULT BT_spp_disconnect
(
IN SPP_HANDLE handle
)
This API disconnects existing service level connection with the peer SPP device.
Parameters:
handle : Handle identifies a SPP connection.
Returns:
API_RESULT: Result of the API.
API_SUCCESS: Indicates disconnection procedure initiated successfully
SPP_ERR_INVALID_HANDLE: Invalid handle.
SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong HS State.
Note:
Result of the disconnection procedure completion will be indicated through application
callback
Events:
SPP_DISCONNECT_CNF event is indicated in the callback.

BT_spp_send()
#include ”BT_spp_api.h”

API_RESULT BT_spp_send
(
IN SPP_HANDLE spp_handle,
IN UCHAR *data,
IN UINT16 data_len
)
This API sends the data to remote SPP device.
Parameters:
spp_handle: Handle associates a SPP connection to a remote SPP device.

MindTree Limited 17-June-2010 Page 54 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
data: Data to be sent to peer over SPP channel.
Data_len: Length of data to be sent to peer over SPP channel.
Returns:
API_RESULT: Result of the API.
API_SUCCESS: Indicates successful operation.
SPP_ERR_INVALID_HANDLE: Invalid handle
SPP_ERR_INVALID_STATE: Cannot process user request. API called in wrong SPP State.
Note:
None
Events:
SPP_SEND_CNF event is indicated in the callback

BT_spp_stop()
#include ”BT_spp_api.h”

API_RESULT BT_spp_stop(void)
This API stops the SPP service function on the local device. Existing active SPP connection if any will
be released.
Parameters:
None
Returns:
API_RESULT: Result of the API.
API_SUCCESS: Indicates SPP switched off
SPP_ERR_STOP_PENDING: In the process of releasing active connections, wait until event is
indicated in the callback.
Note:
No event is indicated through application callback for this procedure when there is no active
SPP connection i.e. API returns API_SUCCESS immediately when there is no active SPP
connection.
SPP_ERR_STOP_PENDING is returned when SPP device has some active SPP connection that
need to be released. Application should wait until SPP_STOP_CNF is indicated in the
callback.
Application is responsible for de-activating the service discovery database for SPP device.
Events:
SPP_STOP_CNF is indicated in callback after releasing the active SPP connection.

Application Callback
Application should register a callback through the API BT_spp_init. SPP will call the registered application
callback after

 Processing the APIs called by application.

 Receiving data from the remote SPP device.

 Receiving connect and disconnect events initiated from the remote device.

MindTree Limited 17-June-2010 Page 55 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
 Stopping profile if it was connected when the stop API call was made.

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

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

Parameters:
spp_handle : Handle associates a SPP connection to a remote SPP device

spp_event : Event indicated to application by Serial Port profile

status : The status of the event.

data: Pointer to the array containing the parameters associated with the event

data_length: Length of the parameters associated with the event

Possible Events Received (Possible Values for parameter SPP_EVENTS)


SPP_EVENTS Description

SPP_CONNECT_CNF Application initiated connection to remote side has completed.

SPP_CONNECT_IND SPP connection setup by remote side.

SPP_DISCONNECT_CNF SPP connection released upon application request.

SPP_DISCONNECT_IND SPP connection released by remote side.

SPP_SEND_CNF Data is sent to the remote side upon application request.

SPP_RECVD_DATA_IND Data received from remote side

SPP_STOP_CNF SPP service stopped on local device and active SPP connections are released.

Interpretation of parameters of application callback


Value of SPP_EVENTS Value of status Interpretation of (void Value of (UINT16)
*)data data_length

SPP_CONNECT_CNF
API_SUCCESS or (UCHAR*)data Length of BD_ADDR - 6

RFCOMM Error code Array of type "unsigned


char" containing the
values for BD_ADDR of
the peer SPP device.

MindTree Limited 17-June-2010 Page 56 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Contains the value as
integer.

SPP_CONNECT_IND Not Applicable (UCHAR*)data


Length of BD_ADDR - 6
data - Array of type
"unsigned char"
containing the values for
BD_ADDR of the peer SPP
device.
Contains the value as
integer.

SPP_SEND_CNF API_SUCCESS (UCHAR*)data Number of bytes


written.
data – Pointer to the data
RFCOMM Error code: Data
sending failed with the buffer given as parameter
relevant RFCOMM error code. to the API call
BT_spp_send_data().

SPP_RECVD_DATA_IND Not Applicable (UCHAR*)data Number of bytes


received.
data – Pointer to the
buffer containing the
data received.

SPP_DISCONNECT_CNF API_SUCCESS (UCHAR*)data Length of BD_ADDR - 6


data - Array of type
"unsigned char"
containing the BD_ADDR
of the SPP device.
Contains the value as
integer.
Length of BD_ADDR (
SPP_DISCONNECT_IND Not Applicable (UCHAR*)data
6)
data - Array of type
"unsigned char"
containing the BD_ADDR
of the SPP device.
Contains the value as
integer.
SPP_STOP_CNF API_SUCCESS NULL 0

SPP Handle
typedef UCHAR SPP_HANDLE;

MindTree Limited 17-June-2010 Page 57 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Scenarios – Message Sequence Chart (MSC)
Below is the message sequence chart for some sample SPP scenarios. The MSCs describe the SPP APIs
involved and corresponding events indicated in the application callback.

This section does not cover all the usage scenarios. Applications can use the enclosed MSCs as a sample
to model other usage scenarios with the SPP and EtherMind HCI and SDP APIs.

Note:

 “SPP_appl_callback(<spp_handle>, SPP_SEND_CNF,API_SUCCESS,data,data_len)” has been


abbreviated to “SPP_SEND_CNF event” in the MSCs.

LEGEND

The arrow conventions followed are shown below.

EtherMind Bluetooth Stack API Call / Events

EtherMind Bluetooth Profile API Call / Events

Messages / Data sent to Peer Device

Events indicated by EtherMind Stack to Profiles

MindTree Limited 17-June-2010 Page 58 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Initialization

APP Local SPP Bluetooth Remote SPP


Stack
BT_ethermind_init()

BT_Bluetooth_on(appl_bluetooth_on_callback,
appl_hci_callback,device_name_string)

appl_bluetooth_on_callback()

Stack Ready
BT_spp_init(spp_appl_callback)

1. Get RFCOMM server channel


from SDDB for SPP Device to
listen for SPP connection.

2. Activate SPP service discovery


database.

BT_spp_start(server_channel)
Indicate ready to accept incoming
connections from RFCOMM

SPP Device Ready

MindTree Limited 17-June-2010 Page 59 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Connection Establishment

Local SPP Bluetooth Remote SPP


APP Stack

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

appl_hci_callback(HCI_CONNECTION_COMPLETE_EVENT for ACL)

SDP Connection and Service discovery

BT_spp_connect(REMOTE_BD_
ADDR, server_channel)

Create Profile Connection

spp_appl_callback(handle, RFCOMM Connection


SPP_CONNECT_CNF, API_SUCCESS,
REMOTE_BD_ADDR, 6)

MindTree Limited 17-June-2010 Page 60 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Data Transfer

APP Local SPP Bluetooth Remote SPP


Stack

Profile Level Connection Established

BT_spp_send_data(handle,*data,
datalength)

Send Data

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

MindTree Limited 17-June-2010 Page 61 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Connection Release

Local SPP Bluetooth Remote SPP


APP Stack

Profile Level Connection Established

BT_spp_disconnect (handle)

Close RFCOMM Connection Release Profile


spp_appl_callback(handle,
Connection
SPP_DISCONNECT_CNF,
API_SUCCESS,REMOTE_BD_ADDR,6)

MindTree Limited 17-June-2010 Page 62 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SPP Shutdown with active connection

Local SPP Remote SPP


APP Bluetooth
Stack

Profile Level Connection Established

BT_spp_stop()

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

NOTE

 Application can do a STOP through BT_spp_stop() if the application wants to stop using SPP
Service.

 Any time after STOP, to use SPP service, application should first call BT_spp_start() before
making any connection to remote device.

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

API Brief Description

BT_sdp_open This API establishes the SDP connection with a remote


Bluetooth device.

BT_sdp_close This API closes the SDP connection with a remote Bluetooth
device

BT_sdp_servicesearchattributerequest This API is used to determine if a remote Bluetooth Device


provides chosen services, and, if so, the characteristics of the
services.

The detailed description of the SPP APIs is given below.

MindTree Limited 17-June-2010 Page 63 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_sdp_open
Name BT_sdp_open(): Establishes a SDP connection with a Bluetooth device.

Synopsis #include “BT_sdp_api.h”

API_RESULT BT_sdp_open
(
SDP_HANDLE * handle
);

Description This API establishes the SDP connection with a remote Bluetooth device, identified by its
Bluetooth Device Address (BD_ADDR) as specified in the supplied SDP Handle. The L2CAP
channel configuration is done automatically, once the connection is established. The
application is expected to establish the ACL connection with the remote Bluetooth
device prior to calling this API.

IN handle The SDP Handle for the SDP connection.


Parameters

OUT None.
Parameters

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


Return

Notes The Application can use SDP_SET_HANDLE() to populate the SDP Handle prior to calling
this API.

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

BT_sdp_close
Name BT_sdp_close(): To close the SDP connection with a Bluetooth device.

Synopsis #include “BT_sdp_api.h”

API_RESULT BT_sdp_close
(
SDP_HANDLE * handle
);

Description This API closes the SDP connection with a remote Bluetooth device, as identified by the
supplied SDP Handle.

IN handle The SDP Handle for the SDP connection.


Parameters

OUT None.

MindTree Limited 17-June-2010 Page 64 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Parameters

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


Return

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

BT_sdp_servicesearchattributerequest
Name BT_sdp_servicesearchattributerequest(): To perform a SDP Service Search
Attribute Request to find the services available and the characteristics of the available
service.

Synopsis #include “BT_sdp_api.h”

API_RESULT BT_sdp_servicesearchattributerequest
(
SDP_HANDLE * handle,
S_UUID * uuids,
UINT16 num_uuids,
UINT16 * attribute_ids,
UINT16 num_attribute_ids,
UINT32 * attribute_id_range,
UINT16 num_attribute_id_range,
UCHAR * attribute_data,
UINT16 * len_attribute_data
);

Description This API is used to determine if a remote Bluetooth Device provides chosen services, and,
if so, the characteristics of the services, as identified by the Attribute IDs specified.

This API returns the Service Attributes and the size of the same. The format and content
of the Service Attributes is service dependent, and typically specified in the associated
Bluetooth Profile specification. The SDP Utility APIs can be used to extract the relevant
service parameter values from the Service Attribute.

IN handle The SDP Handle for the SDP connection.


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

num_uuids Number of UUIDs present in the uuids parameter.

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

MindTree Limited 17-June-2010 Page 65 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
num_attribute_ids Number of Attribute IDs present in the attribute_ids
parameter.

attribute_id_range The set of Attribute ID Ranges to be used to limit the query


for Service Attributes for a service (as identified by Service Record Handle) offered by
the remote Bluetooth device. This parameter must be an array of UINT32 variable, of
size num_attribute_id_range, containing the Attribute ID Ranges.

num_attribute_id_range Number of Attribute ID Ranges present in the


attribute_id_range parameter.

len_attribute_data This parameter specifies the maximum number of octets


containing the service attribute data that the remote Bluetooth device is required to
return when sending its response for the Service Attribute Request.

attribute_data Buffer, of size len_attribute_data, allocated by the application


to store the attribute data received in the response for the Service Attribute Request.

OUT See Notes.


Parameters

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


Return

Notes Overlapping the values of attribute_ids with attribute_id_range disables that


corresponding attribute_ids.

Attribute Ranges are used to extract one or more attribute values which are in sequence.
For example, the attribute_id_range value of 0x0000FFFF, which means Attribute
IDs from 0x0000 to 0xFFFF) extracts all available Attribute values.

The buffer for Attribute values, for the Attribute IDs and Ranges as specified by the
application, must be allocated and passed as attribute_data parameter.

The allocated buffer must be resident, and the application must not free the buffer
before SDP Response Callback is called indicating completion of the Service Attribute
Request. The SDP Response Callback uses the same buffer as response parameter to
indicate the received record handles.

It is recommended to use this API instead of using the APIs for the Service Search
Request and the Service Attribute Request, if the number of records for a requested
service is expected to be few, so as to reduce the number of SDP transactions and
thereby reducing Bluetooth bandwidth usage and time taken to perform the search.

SDP Structures/Data Types


SDP Handle
Data type definition

#include “BT_sdp_api.h”

typedef struct
{

MindTree Limited 17-June-2010 Page 66 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
UCHAR bd_addr[6];
UCHAR id;
SDP_CB fn_ptr;
} SDP_HANDLE;

Parameter Description

bd_addr The Bluetooth Device Address for the remote SDP connection Entity.

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

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

SDP Callback
SDP calls a callback function to inform the application of the response of certain action or SDP requests.
The application must register the callback along with the SDP Handle before calling any SDP Request API.
The SDP exports the SDP_SET_HANDLE() macro to initialize a SDP Handle with the Callback function
information.

There are two prototypes of SDP Callback and both are described in the section below.

SDP Response Callback


Name SDP_CB: SDP Response callback

Synopsis #include “BT_sdp_api.h”

API_RESULT (* SDP_CB)
(
UCHAR type,
UCHAR * response,
UINT16 length,
UINT16 status
);

DESCRIPTION This callback is called by RFCOMM to report various events that occur for a Server
Channel, which must be reported to the higher layer profile or applications.

IN type
Parameters This indicates the type of response. Response type are defined as one of the following:

 SDP_Open

 SDP_Close

MindTree Limited 17-June-2010 Page 67 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
 SDP_ServiceSearchResponse

 SDP_ServiceAttributeResponse

 SDP_ServiceSearchAttributeResponse

 SDP_ErrorResponse

response
This parameter represents the SDP response byte stream received from the remote
Bluetooth device in response to the request API called earlier by the application.

This parameter is set to NULL, if the type is SDP_Open , SDP_Close and


SDP_ErrorResponse.

For the SDP_ServiceSearchResponse, this parameter is set to a buffer containing the


“record_handles”, which was previously provided as a parameter in the
BT_sdp_servicesearchrequest() API.

For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse, this


parameter is set to a buffer containing the “attribute_data”, which was previously
provided as a parameter in the BT_sdp_serviceattributerequest() and
BT_sdpserviceserachattributerequest() respectively.

length
This parameter represents the size of SDP response byte stream.

For the SDP_ServiceSearchResponse, this value indicates the number of handles in the
response.

For the SDP_ServiceArrributeResponse and SDP_ServiceSearchAttributeResponse, this


value indicates the number of attribute bytes in the response.

status
This parameter indicates the result of the transaction. This value is API_SUCCESS or
an error code indicating the reason for failure.

OUT None
Parameters

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


Return

Notes The Application must allocate memory for the response byte stream (SDP_Open and
SDP_Close does not require any memory) and pass the same to the corresponding
request API (“rec_handles” parameter for BT_sdp_servicesearchrequest() and
“attribute_data” parameter for the other attribute request APIs). The application
should not free this memory before completion of the transaction.

If the compilation flag “SDP_HAVE_HANDLE_WITH_CB” is enabled following SDP Callback prototype will be
defined. In situation where the SDP application needs to perform several simultaneous SDP queries, this

MindTree Limited 17-June-2010 Page 68 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SDP Callback Prototype should be used. It returns one additional parameter “SDP_HANDLE” to uniquely
identify the corresponding SDP request.

SDP Utility APIs

API Brief Description

BT_sdp_get_channel_number This API can be used to extract the RFCOMM Server Channel
attribute value from the attribute data (Protocol Descriptor
List

SDP_SET_HANDLE This macro can be used to populate the required elements of a


SDP Handle, such as, the Bluetooth Device Address

MindTree Limited 17-June-2010 Page 69 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_sdp_get_channel_number
Synopsis #include “BT_sdp_spi.h”

API_RESULT BT_sdp_get_channel_number
(
UCHAR * attribute_data,
UCHAR * channel_number
);

Description This API can be used to extract the RFCOMM Server Channel attribute value from the
attribute data (Protocol Descriptor List) returned by the SDP Service Attribute Request
and/or SDP Service Search Attribute Request APIs.

IN attribute_data Application allocated UCHAR buffer containing the Service Attribute


Parameters data, as received as a result of the SDP Service Attribute Request and/or SDP Service
Search Attribute Request APIs.

OUT channel_number Pointer to a caller allocated UCHAR variable, which will contain the
Parameters RFCOMM Server Channel attribute value on return.

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


Return

Notes None.

SDP_SET_HANDLE
Name SDP_SET_HANDLE(): To populate the SDP Handle.

Synopsis #include “BT_sdp_api.h”

#define SDP_SET_HANDLE(sdp_handle, bd_addr, callback)

Description This macro can be used to populate the required elements of a SDP Handle, such as, the
Bluetooth Device Address and the SDP Response Callback.

IN sdp_handle The SDP Handle that needs to be populated.


Parameters
bd_addr The remote Bluetooth Device Address this SDP Handle corresponds to.

callback The SDP Response Callback which will be called to notify completion of an
SDP Request. The application must provide this callback.

OUT None
Parameters

Function None.
Return

MindTree Limited 17-June-2010 Page 70 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Notes None.

GAP APIs
The Generic Access Profile APIs are:

1) Device Setup APIs

API Brief Description

BT_hci_reset This API resets the local Bluetooth device.

2) Controller Information APIs

API Brief Description

BT_hci_read_local_version_information This API reads the Version information of the local Bluetooth
device.

BT_hci_get_local_bd_addr This API retrieves the Bluetooth Device Address (BD_ADDR) of


the local Bluetooth device, as stored in the HCI module.

3) Controller Configuration APIs

API Brief Description

BT_hci_change_local_name This API configures the name of the local Bluetooth device.

BT_hci_write_class_of_device This API writes the Class of Device configuration parameter to


the local Bluetooth device.

BT_hci_read_current_iac_lap This API reads the currently configured values for the Inquiry
Access Code LAP(s).

BT_hci_write_current_iac_lap This API writes the current values for the Inquiry Access Code
LAP(s), to be used by the local Bluetooth device.

BT_hci_write_scan_enable This API writes the value of Scan Enable configuration


parameter in the local Bluetooth device.

4) Device Discovery APIs

API Brief Description

MindTree Limited 17-June-2010 Page 71 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_hci_inquiry This API initiates/performs the Bluetooth Device
Inquiry/Discovery for the specified Inquiry Length and Number
of Responses, and with the specified LAP (Lower Address Part).

BT_hci_inquiry_cancel This API cancels an ongoing Bluetooth Device Inquiry/Discovery


procedure.

BT_hci_write_inquiry_scan_type This API writes the current value for Inquiry Scan Type
configuration parameter to be stored in the local Bluetooth
device.

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.

BT_hci_disconnect This API initiates disconnection of an existing ACL with a


remote Bluetooth device.

BT_hci_write_page_timeout This API writes the value of the Page Timeout configuration
parameter to the local Bluetooth device.

BT_hci_write_page_scan_type This API writes the current value for Page Scan Type
configuration parameter to be stored in the local Bluetooth
device.

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.

BT_hci_sniff_mode This API can be used to place an ACL connection between the
local and remote Bluetooth device into Sniff mode

BT_hci_exit_sniff_mode This API can be used to end the Sniff mode for an ACL
Connection, which is currently in the Sniff mode.

BT_hci_sniff_subrating This API writes the parameters for the sniff subrating for the
ACL link as specified by the connection handle.

7) LINK INFORMATION APIs

MindTree Limited 17-June-2010 Page 72 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
API Brief Description

BT_hci_read_transmit_power_level This API reads the value for Transmit Power Level for the
specified Connection Handle.

BT_hci_read_rssi 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_write_link_supervision_timeout This API writes the value of the Link Supervision Timeout
configuration parameter in the local Bluetooth device.

8) REMOTE INFORMATION APIs

API Brief Description

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

9) Testing and Vendor Specific APIs

API Brief Description

BT_hci_enable_device_under_test_mode This API enables the local Bluetooth device to enter Device
Under Test (DUT) mode via the LMP test Commands.

BT_hci_vendor_specific_command 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 This API enables applications to accept/reject an incoming


link-level connection from a “Untrusted” remote Bluetooth
device.

BT_sm_pin_code_request_reply This API enables applications to furnish Bluetooth PIN for


authentication procedure on outgoing link-level connection to
a device.

BT_sm_get_device_link_key This API enables application to retrieve Link Key for a remote
Bluetooth device, which is be used by the Security Manager for
authentication procedure during link-level or service-level
connection to the specified remote device.

BT_sm_link_key_request_reply This API enables applications to furnish the Link Key for
authentication procedure on the link-level connection to a
device.

MindTree Limited 17-June-2010 Page 73 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_sm_user_conf_request_reply This API enables applications to accept/reject User
Confirmation request, during link authentication using Secure
Simple Pairing procedure (Numeric Comparison association
model).

The detailed description of the GAP APIs is given below.

1) Device Setup APIs

BT_hci_reset
Name BT_hci_reset(): To reset the local Bluetooth device.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_reset ( void );

Description This API resets the local Bluetooth device.

IN None.
Parameters

OUT None.
Parameters

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


Return

Notes If the Application decides to reset the local Bluetooth device, the EtherMind stack should
be re-initialized. Re-initialization of the EtherMind Stack can be performed by switching it
off first using BT_Bluetooth_off() API, and then by switching on using
BT_bluetooth_on().

2) Controller Information APIs

BT_hci_read_local_version_information
Name BT_hci_read_local_version_information(): To read Version information of the
local Bluetooth device

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_read_local_version_information
(
void

MindTree Limited 17-June-2010 Page 74 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
);

Description This API reads the Version information of the local Bluetooth device. The version
information consists of two parameters: the version and revision parameters.

The HCI Version parameter defines the major hardware version of the Bluetooth hardware.
The version parameter only changes when new versions of the Bluetooth hardware are
produced for new Bluetooth SIG specifications. The version parameter is controlled by the
Bluetooth SIG.

The HCI Revision parameter should be controlled by the manufacturer and should be
changed as needed.

The Manufacturer Name parameter indicates the manufacturer of the local Bluetooth
module as specified by the Bluetooth SIG.

The subversion parameter should be controlled by the manufacturer and should be


changed as needed. The subversion parameter defines the various revisions that each
version of the Bluetooth hardware will go through as design processes change and errors
are fixed. This allows the software to determine what Bluetooth hardware is being used,
and to work around various bugs in the hardware if necessary.

IN None.
Parameters

OUT None.
Parameters

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


Return

Notes None

BT_hci_get_local_bd_addr
Name BT_hci_get_local_bd_addr(): To retrieve the BD_ADDR of the local Bluetooth device,
as stored in the HCI module.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_get_local_bd_addr
(
UCHAR * bd_addr
);

Description This API retrieves the Bluetooth Device Address (BD_ADDR) of the local Bluetooth device,
as stored in the HCI module. HCI obtains and stores this BD_ADDR using the
BT_hci_read_bd_addr() API from the Bluetooth hardware during its Bluetooth-ON
initialization.

The difference between this API and the BT_hci_read_bd_addr() is that an Command
Complete Event is not generated for this API. This API reads the BD_ADDR from the HCI
module itself, whereas the BT_hci_read_bd_addr() reads the BD_ADDR from the

MindTree Limited 17-June-2010 Page 75 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Bluetooth hardware.

IN None.
Parameters

OUT bd_addr Caller allocated UCHAR array of 6-octets which will be used to copy the
Parameters BD_ADDR from the HCI module.

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


Return

Notes None.

3) Controller Configuration APIs

BT_hci_change_local_name
Name BT_hci_change_local_name(): To set the local name of the device.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_change_local_name
(
UCHAR * name,
UINT16 name_length
);

Description This API configures the name of the local Bluetooth device.

IN name Caller allocated CHAR array of size 248 bytes, which will be used to copy the name
Parameters of the remote Bluetooth device.

Name_length Length of the Name to be set. This must be less than or equal to 248
bytes.

OUT None.
Parameters

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


Return

Notes On embedded version of the EtherMind stack, the size of the name is limited to 12 due to
memory constraints.

BT_hci_write_class_of_device
Name BT_hci_write_class_of_device(): To set the Class of Device in the local Bluetooth
device

Synopsis #include “BT_hci_api.h”

MindTree Limited 17-June-2010 Page 76 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
API_RESULT BT_hci_write_class_of_device
(
UINT32 class_of_device
);

Description This API writes the Class of Device configuration parameter to the local Bluetooth device.

The Class of Device is used to indicate the capabilities of the local Bluetooth device to the
other remote Bluetooth devices when at the time of their inquiry processes.

IN class_of_device Value of the Class of Device for the local device. Though
Parameters represented in 4-byte UINT32 type, Class of Device is a 3 Byte value. Population of Class of
Device should be according to Bluetooth Assigned Numbers document –
http://www.bluetooth.org/assigned-numbers/.

OUT None.
Parameters

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


Return

Notes None.

BT_hci_read_current_iac_lap
Name BT_hci_read_current_iac_lap(): To read the current Inquiry Access Code LAP(s)
stored in the local Bluetooth device

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_read_current_iac_lap
(
void
);

Description This API reads the currently configured values for the Inquiry Access Code LAP(s) the local
Bluetooth device can simultaneous listen for during an Inquiry Scan performed by other
Bluetooth devices.

All Bluetooth devices should support at least one IAC, the General Inquiry Access Code
(GIAC- 0x9E8B33).

IN None.
Parameters

OUT None.
Parameters

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

MindTree Limited 17-June-2010 Page 77 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Return

Notes None

BT_hci_write_current_iac_lap
Name BT_hci_write_current_iac_lap(): To write the current Inquiry Access Code LAP(s)
in the local Bluetooth device

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_write_current_iac_lap
(
UCHAR num_current_iac,
UINT32 * iac_lap
);

Description This API writes the current values for the Inquiry Access Code LAP(s), to be used by the
local Bluetooth device to simultaneous listen for during an Inquiry Scan performed by other
Bluetooth devices.

All Bluetooth devices should support at least one IAC, the General Inquiry Access Code
(GIAC – 0x9E8B33).

IN num_current_iac This parameter specifies the number of IACs, which are currently to
Parameters be used by the local Baseband Controller to simultaneously listen for during an Inquiry
Scan. Range: 0x01-0x40. The value specified must not be greater than the number of IACs
that the local Bluetooth device is capable of supporting, as returned by the
BT_hci_read_number_of_supported_iac() API.

Iac_lap Pointer to a caller allocated UINT32 array of size num_current_iac, which


holds the values of each LAP to be set. Each IAC LAP is actually a 3-byte value represented
in a 4-byte UINT32 variable.

OUT None.
Parameters

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


Return

Notes None

BT_hci_write_scan_enable
Name BT_hci_write_scan_enable(): To write the Scan Mode settings in the local Bluetooth
device.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_write_scan_enable
(

MindTree Limited 17-June-2010 Page 78 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
UCHAR scan_enable
);

Description This API writes the value of Scan Enable configuration parameter in the local Bluetooth
device.

The Scan Enable defines whether the local Bluetooth device will periodically scan for
responding to Paging attempts and/or Inquiry attempts from other remote Bluetooth
devices or not.

IN scan_enable Value of the Scan Enable parameter to be set in the local Bluetooth
Parameters device. The valid values and their meanings are shown below:

0x00: No Scans enabled (Default).

0x01: Inquiry Scan enabled, Page Scan disabled.

0x02: Inquiry Scan disabled, Page Scan enabled.

0x03: Inquiry Scan enabled, Page Scan enabled.

OUT None.
Parameters

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


Return

Notes None.

4) Device Discovery APIs

BT_hci_inquiry

Name BT_hci_inquiry(): To initiate/perform Bluetooth Device Inquiry/Discovery.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_inquiry
(
UINT32 lap,
UCHAR inquiry_length,
UCHAR num_responses
);

MindTree Limited 17-June-2010 Page 79 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Description This API initiates/performs the Bluetooth Device Inquiry/Discovery for the specified
Inquiry Length and Number of Responses, and with the specified LAP (Lower Address
Part) from which the local Bluetooth device derives the Inquiry Access Code (IAC).

The local Bluetooth device starts the Bluetooth Inquiry on reception of the HCI
Inquiry Command, and sends a Command Status Event to the HCI. At the end of the
Inquiry process, the Inquiry Complete Event is received. Between these two events,
none, one or more Inquiry Results Event may be received, when one or more remote
Bluetooth devices respond to the Inquiry process initiated by the local Bluetooth
device. The application is notified of the Inquiry Results in two ways:

i. Inquiry Result Event via the HCI Event Indication Callback

IN lap This is the Lower Address Part from which the Bluetooth Hardware should
Parameters derive Inquiry Access Code when the Inquiry procedure is made. Few of the commonly
used values are:

 BT_GIAC – The General Inquiry Access Code (0x9E8B33)

 BT_LIAC – The Limited Inquiry Access Code (0x9E8B30)

inquiry_length Maximum amount of time specified before the Inquiry is


halted. Value Range: 0x01 to 0x30. Inquiry Time = inquiry_length * 1.28 Sec.

Num_responses Maximum number of responses from the Inquiry before the


Inquiry is halted. Range: 0x00 – 0xFF. A value 0f 0x00 means unlimited number of
responses.

OUT None.
Parameters

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


Return

Notes This API must not be called if the local Bluetooth device is in the process of
establishing a connection with another Bluetooth device.

A remote Bluetooth device will respond to Inquiry procedure only if it has its Inquiry
Scan enabled.

BT_hci_inquiry_cancel
Name BT_hci_inquiry_cancel(): Cancels an ongoing Bluetooth Device Inquiry/Discovery
procedure.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_inquiry_cancel ( void );

Description This API cancels an ongoing Bluetooth Device Inquiry/Discovery procedure.

MindTree Limited 17-June-2010 Page 80 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
IN None
Parameters

OUT None
Parameters

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


Return

Notes This API can be called only if BT_hci_inquiry() API call was made before, and the
application has not yet received the HCI Inquiry Complete Event for the Inquiry process.

BT_hci_write_inquiry_scan_type
Name BT_hci_write_inquiry_scan_type(): To write the Inquiry Scan Type configuration
parameter

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_write_inquiry_scan_type
(
UCHAR inquiry_scan_type
);

Description This API writes the current value for Inquiry Scan Type configuration parameter to be
stored in the local Bluetooth device. The Inquiry Scan Type configuration parameter
controls whether the local Bluetooth device performs Standard Scan or Interlaces Scan
(faster) during inquiry.

IN inquiry_scan_type The Inquiry Scan Type to be set. The valid values are:
Parameters
 0x00 – Standard Scan

 0x01 – Interlaced Scan

OUT None.
Parameters

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


Return

Notes None

5) Connection Setup APIs

BT_hci_create_connection
Name BT_hci_create_connection(): To create an ACL connection to a specified remote
Bluetooth device.

Synopsis #include “BT_hci_api.h”

MindTree Limited 17-June-2010 Page 81 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
API_RESULT BT_hci_create_connection
(
UCHAR * bd_addr,
UINT16 packet_type,
UCHAR page_scan_repetition_mode,
UCHAR page_scan_mode,
UINT16 clock_offset,
UCHAR allow_role_switch
);

Description This API is used to create an ACL connection to the specified remote Bluetooth device.

The local Bluetooth device starts the Bluetooth Paging process to create an ACL link on
reception of the HCI Create Connection Command, and sends a Command Status Event to
the HCI. At the end of the Paging process, the Connection Complete Event is received.

Before receiving the Connection Complete Event, Bluetooth Security related events (Link
Key Request Event and/or PIN Code Request Event) might be received, depending on the
security settings on the local and/or remote Bluetooth device.

For details on the Bluetooth ACL link establishment, with or without link-level
authentication procedure, refer to the Specification of the Bluetooth System, v1.2, Vol.
2, Part F – Message Sequence Charts.

IN bd_addr This is the Bluetooth Device Address for the remote device to which an
Parameters attempt will be made to create an ACL connection.

Packet_type This is the ACL Packet Types to be used by the Baseband Controller for
this new ACL connection. One or more DHx/DMx packet types can be combined together.

Page_scan_repetition_mode
page_scan_mode These two parameters specify the Page Scan modes supported by
the remote Bluetooth device – this information must have been acquired during the
Bluetooth Inquiry procedure.

Clock_offset The clock offset between the local Baseband Controller and the
remote one – this information must have been acquired during Bluetooth Inquiry
procedure.

Allow_role_switch This parameter specified whether the local Baseband Controller


would accept or reject the request of a Master-Slave role switch during the ACL
connection establishment phase.

OUT None.
Parameters

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


Return

Notes There can only be one ACL connection between a pair of Bluetooth devices.
Establishment of ACL link depends to the Page Scan mode of the remote Bluetooth

MindTree Limited 17-June-2010 Page 82 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
device.

BT_hci_disconnect
Name BT_hci_disconnect(): To disconnect an ACL link.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_disconnect
(
UINT16 connection_handle,
UCHAR reason
);

Description This API initiates disconnection of an existing ACL, SCO or eSCO link with a remote
Bluetooth device, as identified by the supplied Connection Handle.

The local Bluetooth device starts the Link Manager procedure to disconnect the link on
reception of the HCI Disconnect Command, and sends a Command Status Event to the
HCI. At the end of the link disconnection process, the Disconnection Complete Event is
received.

For details on the Bluetooth link disconnection, refer to the Specification of the
Bluetooth System, v1.2, Vol. 2, Part F – Message Sequence Charts.

If the Connection Handle supplied with this API refers to the ACL link with a remote
Bluetooth device, then all the SCO & eSCO links that may be currently active with the
same remote device will also be disconnected, and Disconnection Complete Events for
each of this link will be received.

IN connection_handle Connection Handle for the existing ACL, SCO or eSCO


Parameters connection to be disconnected.

Reason This specifies the reason for disconnection.

The reason parameter is delivered along with the Disconnection Complete Event.

OUT None.
Parameters

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


Return

Notes None.

BT_hci_write_page_timeout
Name BT_hci_write_page_timeout(): To set the Page Timeout configuration parameter
value in the local Bluetooth device.

Synopsis #include “BT_hci_api.h”

MindTree Limited 17-June-2010 Page 83 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
API_RESULT BT_hci_write_page_timeout
(
UINT16 page_timeout
);

Description This API writes the value of the Page Timeout configuration parameter to the local
Bluetooth device.

The Page Timeout configuration parameter defines the maximum amount of time the local
Bluetooth device will wait for a response from a remote Bluetooth device for a locally
initiated connection.

IN page_timeout The value of Page Timeout to be set. The actual timeout is calculated as
Parameters follows: Time = page_timeout * 0.625 msec; Value Range: 0x0001 – 0xFFFF.

OUT None.
Parameters

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


Return

Notes None.

BT_hci_write_page_scan_type
Name BT_hci_write_page_scan_type(): To write the Page Scan Type configuration
parameter

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_write_page_scan_type
(
UCHAR page_scan_type
);

Description This API writes the current value for Page Scan Type configuration parameter to be stored
in the local Bluetooth device. The Page Scan Type configuration parameter controls
whether the local Bluetooth device performs Standard Scan or Interlaces Scan (faster)
during paging.

IN page_scan_type The Page Scan Type to be set. The valid values are:
Parameters
 0x00 – Standard Scan

 0x01 – Interlaced Scan

MindTree Limited 17-June-2010 Page 84 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
OUT None.
Parameters

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


Return

Notes None

6) Connection State APIs

BT_hci_write_link_policy_settings
Name BT_hci_write_link_policy_settings(): To write the Link Policy Settings
configuration parameter to the local Bluetooth device .

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_write_link_policy_settings
(
UINT16 connection_handle,
UINT16 link_policy_settings
);

Description This API writes the Link Policy Setting configuration parameter to the local Bluetooth
device for a specified ACL Connection Handle.

The Link Policy Settings parameter determines the behavior of the local Bluetooth device
when it receives a request from a remote Bluetooth device to change the Master-Slave
role or to enter the Hold, Sniff, or Park mode. The local Bluetooth device will
automatically accept or reject such a request from the remote device based on the value
of the Link Policy Settings parameter for the corresponding Connection Handle.

IN connection_handle The Connection Handle of the ACL connection with a remote


Parameters Bluetooth device, for which the Link Policy Settings to be written.

Link_policy_settings The Link Policy Settings to be set.

Value 0x0000: Disable all LM modes. (Default)

Value 0x0001: Enable Master-Slave switch.

Value 0x0002: Enable Hold Mode.

Value 0x0004: Enable Sniff Mode.

Value 0x0008: Enable Park Mode.

OUT None.
Parameters

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


Return

MindTree Limited 17-June-2010 Page 85 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Notes None.

BT_hci_sniff_mode
Name BT_hci_sniff_mode():To place an ACL Connection with a remote Bluetooth device to
Sniff mode.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_sniff_mode
(
UINT16 connection_handle,
UINT16 sniff_mode_max_interval,
UINT16 sniff_mode_min_interval,
UINT16 sniff_attempt,
UINT16 sniff_timeout
);

Description This API can be used to place an ACL connection between the local and remote Bluetooth
device (identified by the ACL Connection Handle) into Sniff mode.

The local Bluetooth device starts the Sniff mode process on reception of the HCI Sniff
Mode Command, and sends a Command Status Event to the HCI. At the end of this
process, the Mode Change Event is received.

IN connection_handle The Connection Handle of the ACL connection with a remote


Parameters Bluetooth device that needs to be placed into Sniff mode.

Sniff_mode_max_interval This parameter specifies the maximum acceptable


number of Baseband time slots to wait in Sniff mode.

Value Range = 0x0002 to 0xFFFE. Only even values are valid

Sniff time = sniff_mode_max_interval * 0.625 msec

Time Range = 1.25 msec to 40.9 sec

sniff_mode_min_interval This parameter specifies the maximum acceptable


number of Baseband time slots to wait in Sniff mode.

Value Range = 0x0002 to 0xFFFE. Only even values are valid

Sniff time = sniff_mode_min_interval * 0.625 msec

Time Range = 1.25 msec to 40.9 sec

Note: sniff_mode_max_interval > sniff_mode_min_interval

sniff_attempt This parameter specifies the number of Baseband receive slots for
Sniff attempt.

MindTree Limited 17-June-2010 Page 86 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Value Range = 0x0001 to 0x7FFF.

Time = (2 * sniff_attempt - 1) * 0.625 msec

Time Range = 0.625 msec to 40.9 sec

sniff_timeout This parameter specifies the number of Baseband receive slots for
Sniff timeout.

Value Range = 0x0000 to 0x7FFF.

If sniff_timeout > 0, Time = (2 * sniff_timeout - 1) * 0.625 msec.


Otherwise, Time = 0.

Time Range = 0 msec to 40.9 sec

OUT None.
Parameters

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


Return

Notes None.

BT_hci_exit_sniff_mode
Name BT_hci_exit_sniff_mode(): To end/cancel the Sniff mode.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_exit_sniff_mode
(
UINT16 connection_handle
);

Description This API can be used to end the Sniff mode for an ACL Connection, which is currently in
the Sniff mode.

The local Bluetooth device starts the exit from the Sniff mode process on reception of
the HCI Exit Sniff Mode Command, and sends a Command Status Event to the HCI. At the
end of this process, the Mode Change Event is received.

IN connection_handle The Connection Handle of the ACL connection with a remote


Parameters Bluetooth device, for which the Sniff mode needs to be cancelled.

OUT None.
Parameters

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


Return

Notes None.

MindTree Limited 17-June-2010 Page 87 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
BT_hci_sniff_subrating (Bluetooth v2.1+EDR)
Name BT_hci_sniff_subrating(): To specify the parameters for sniff subrating for a given
link.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_sniff_subrating
(
UINT16 connection_handle,
UINT16 maximum_latency,
UINT16 minimum_remote_timeout,
UINT16 minimum_local_timeout
);

Description This API writes the parameters for the sniff subrating for the ACL link as specified by the
connection handle.

The interval shall be determined from the sniff interval and the maximum subrate latency
parameters from the command. The link may have smaller subrates and therefore lower
latencies and longer timeouts than those specified.

If this command is used on a link in sniff mode this shall cause sniff subrating to be
negotiated at the Link Manager, otherwise sniff subrating shall be negotiated only after
the device has entered the sniff mode.

The Connection Handle shall be the primary Connection Handle between the two devices.

The Maximum Latency parameter shall define the maximum allowed sniff subrate of the
remote device.

If the Host does not write the sniff subrating parameters prior to sniff subrating being
initiated by the Link Manager the default values shall be used.

Setting both subrate values to zero is equivalent to sniff mode without subrating enabled.

IN connection_handle The Connection Handle of the ACL connection with a remote


Parameters Bluetooth device.

maximum_latency The Maximum Latency parameter shall be used to calculate the


maximum sniff subrate that the remote device may use. The valid values and their
meanings are shown below:

Value Range = 0x0000 to 0xFFFE. Only even values are valid.

Default = 0x0000

Latency = maximum_latency * 0.625 msec

Time Range = 0 sec to 40.9 sec

minimum_remote_timeout The minimum base sniff subrate timeout that the remote

MindTree Limited 17-June-2010 Page 88 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
device may use. The valid values and their meanings are shown below:

Value Range = 0x0000 to 0xFFFE. Only even values are valid.

Default = 0x0000

Latency = maximum_latency * 0.625 msec

Time Range = 0 sec to 40.9 sec

minimum_local_timeout The minimum base sniff subrate timeout that the local
device may use. The valid values and their meanings are shown below:

Value Range = 0x0000 to 0xFFFE. Only even values are valid.

Default = 0x0000

Latency = maximum_latency * 0.625 msec

Time Range = 0 sec to 40.9 sec

OUT None.
Parameters

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


Return

Notes None.

7) LINK INFORMATION APIs

BT_hci_read_transmit_power_level
Name BT_hci_read_transmit_power_level(): To read the value of Transmit Power Level.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_read_transmit_power_level
(
UINT16 connection_handle,
UCHAR power_type
);

Description This API reads the value for Transmit Power Level for the specified Connection Handle for
the ACL connection to a remote Bluetooth device.

IN connection_handle The Connection Handle corresponding to the ACL connection


Parameters with the remote Bluetooth device, for which the transmit power level to be read.

Power_type This parameter specifies whether the current or maximum power level to
read. The valid values are:

MindTree Limited 17-June-2010 Page 89 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Value 0x00: Read current Transmit Power Level.

Value 0x01: Read maximum Transmit Power Level.

OUT None.
Parameters

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


Return

Notes None.

BT_hci_read_rssi
Name BT_hci_read_rssi(): To retrieve the RSSI value for an ACL connection.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_read_rssi
(
UINT16 connection_handle
);

Description This API reads the value for the difference between the measured Received Signal Strength
Indication (RSSI) and the limits of the Golden Receive Power Range for a specified ACL
Connection Handle to another Bluetooth device.

Any positive RSSI value returned by the local Bluetooth device indicates how many dB the
RSSI is above the upper limit, any negative value indicates how many dB the RSSI is below
the lower limit. The value zero indicates that the RSSI is inside the Golden Receive Power
Range.

IN connection_handle The Connection Handle to be used to identify the connection for


Parameters reading the RSSI.

OUT None.
Parameters

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


Return

Notes The RSSI measurement compares the received signal power with two threshold levels,
which define the Golden Receive Power Range. The lower threshold level corresponds to a
received power between -56 dBm and 6 dB above the actual sensitivity of the receiver.
The upper threshold level is 20 dB above the lower threshold level to accuracy of +/- 6 dB.

BT_hci_write_link_supervision_timeout
Name BT_hci_write_link_supervision_timeout(): To write the value of the Link
Supervision Timeout configuration parameter in the local Bluetooth device.

Synopsis #include “BT_hci_api.h”

MindTree Limited 17-June-2010 Page 90 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
API_RESULT BT_hci_write_link_supervision_timeout
(
UINT16 connection_handle,
UINT16 link_supervision_timeout
);

Description This API writes the value of the Link Supervision Timeout configuration parameter in the
local Bluetooth device.

The Master or Slave Bluetooth device uses the Link Supervision Timeout configuration
parameter to monitor link loss. If, for any reason, no Baseband packets are received from a
Connection Handle for duration longer than the Link Supervision Timeout, the connection
is disconnected. The same timeout value is used for both Synchronous (SCO/eSCO) and ACL
connections for the device specified by the Connection Handle.

IN connection_handle The ACL Connection Handle for the connection with the remote
Parameters Bluetooth device for which the link supervision timeout to be set.

Link_supervision_timeout The value of Link Supervision Timeout parameter to be


set. Value Range = 0x0001 – 0x07FF. A value of 0x0000 means No Link Supervision Timeout
at all. Actual Time = link_supervision_timeout * 0.625 msec.

OUT None.
Parameters

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


Return

Notes Setting the Link Supervision Timeout to 0x0000 will disable the Link Supervision Timeout
check for the specified Connection Handle. This makes it unnecessary for the Bluetooth
Master of the Piconet to unpark and then park each Bluetooth Device every ~40 seconds.
By using a value of 0x0000 for the Link Supervision Timeout setting, the scalability of the
Park state is not limited.

8) REMOTE INFORMATION APIs

BT_hci_remote_name_request
Name BT_hci_remote_name_request(): To retrieve the Name of the remote Bluetooth
device.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_remote_name_request
(
UCHAR * bd_addr,
UCHAR page_scan_repetition_mode,
UCHAR page_scan_mode,
UINT16 clock_offset

MindTree Limited 17-June-2010 Page 91 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
);

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

The local Bluetooth device starts the name retrieval process on reception of the HCI
Remote Name Request Command, and sends a Command Status Event to the HCI. At the
end this process, the Remote Name Request Complete Event is received.

IN bd_addr Bluetooth Device Address of the remote Bluetooth device.


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

OUT None.
Parameters

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


Return

Notes To retrieve the name, an ACL connection is required between the devices. A temporary
ACL connection is made if it does not exist. Hence this API can fail, if the remote device
does not have Page Scan enabled.

9) Testing and Vendor Specific APIs

BT_hci_enable_device_under_test_mode
Name BT_hci_enable_device_under_test_mode(): To allow local Bluetooth device to
enter DUT mode.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_enable_device_under_test_mode ( void );

Description This API enables the local Bluetooth device to enter Device Under Test (DUT) mode via the
LMP test Commands.

For details on the Device Under Test Mode, please refer to the Specification of the
Bluetooth System, v1.2, Vol. 2, Part E – Host Controller Interface Functional Specification,
Section 7.6.3.

IN None.
Parameters

OUT None.
Parameters

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


Return

MindTree Limited 17-June-2010 Page 92 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Notes This API is available only if HCI_TESTING_COMMANDS compilation flag is enabled during
compilation.

BT_hci_vendor_specific_command
Name BT_hci_vendor_specific_command(): To send a vendor specific HCI command to the
local Bluetooth device.

Synopsis #include “BT_hci_api.h”

API_RESULT BT_hci_vendor_specific_command
(
UINT16 ocf,
UCHAR * params,
UCHAR params_length
);

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

IN ocf Opcode Command Field for the vendor specific Opcode.


Parameters
Params Parameters to be framed for the vendor specific HCI command

Params_length Total length of the parameters passed.

OUT None.
Parameters

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


Return

Notes None.

10) AUTHENTICATION AND ENCRYPTION APIs

BT_sm_connection_request_reply
Name BT_sm_connection_request_reply(): To reply to the SM Connection Request Event

Synopsis #include “BT_sm_api.h”

API_RESULT BT_sm_connection_request_reply
(
UCHAR * bd_addr,
UCHAR accept,
UCHAR reason
);

MindTree Limited 17-June-2010 Page 93 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Description This API enables applications to accept/reject an incoming link-level connection from a
“Untrusted” remote Bluetooth device.

This API must be used to reply when Security Manager calls the registered UI Notification
Callback with SM_CONNECTION_REQUEST_NTF as the event identifier.

IN bd_addr The Bluetooth Device Address of the remote “Untrusted” Bluetooth device.
Parameters
accept This parameter specifies whether the incoming link-level (ACL) connection from
the specified remote Bluetooth device needs to be accepted or rejected. The valid values
are:

0x00 – reject the incoming link-level (ACL) connection.

0x01 – accept the incoming link-level (ACL) connection.

reason This parameter specifies the reason for rejecting a connection. This parameter must
be set to one of the Host Controller Error Codes as described in the Specification of the
Bluetooth System, v1.2, Vol. 2, Part D – Error Codes.

OUT None.
Parameters

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


Return

Notes None.

BT_sm_pin_code_request_reply
Name BT_sm_pin_code_request_reply(): To reply to the SM PIN Code Request Event

Synopsis #include “BT_sm_api.h”

API_RESULT BT_sm_pin_code_request_reply
(
UCHAR * bd_addr,
UCHAR * pin_code,
UCHAR pin_length
);

Description This API enables applications to furnish Bluetooth PIN for authentication procedure on
outgoing link-level connection to a device.

This API must be used to reply when Security Manager calls the registered UI Notification
Callback with SM_PIN_CODE_REQUEST_NTF as the event identifier. The application can
send either a positive or a negative reply to a PIN Code request from the local Bluetooth
device (controller).

IN bd_addr The Bluetooth Device Address of the remote device.

MindTree Limited 17-June-2010 Page 94 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Parameters pin This parameter holds the Bluetooth PIN, and it must be a pointer to an UCHAR
buffer. Application can pass NULL only if the pin_length is Zero.

pin_length This parameter specifies the length of the PIN Code – size of the UCHAR
buffer as specified in the parameter pin. The length of PIN Code can be Zero, but must
not be more than 16 octets. To send a PIN Code Negative Reply, the application must call
this API with pin_length as 0.

OUT None.
Parameters

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


Return

Notes None.

BT_sm_get_device_link_key
Name BT_sm_get_device_link_key(): To get Bluetooth Link Key for a remote Bluetooth
device.
Synopsis #include “BT_sm_api.h”

API_RESULT BT_sm_get_device_link_key
(
UCHAR * bd_addr,
UCHAR * link_key
);

Description This API enables application to retrieve Link Key for a remote Bluetooth device, which is
be used by the Security Manager for authentication procedure during link-level or service-
level connection to the specified remote device.

IN bd_addr The Bluetooth Device Address of the remote device for which Bluetooth Link
Parameters Key to be get.

OUT link_key Caller allocated UCHAR array of 16 octets onto which the device’s Link Key
Parameters will be copied. NULL is not an acceptable parameter.

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


Return

Notes None.

BT_sm_link_key_request_reply
Name BT_sm_link_key_request_reply(): To reply to the SM Link Key Request Event

Synopsis #include “BT_sm_api.h”

API_RESULT BT_sm_link_key_request_reply

MindTree Limited 17-June-2010 Page 95 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
(
UCHAR * bd_addr,
UCHAR * link_key,
UCHAR link_key_present
);

Description This API enables applications to furnish the Link Key for authentication procedure on the
link-level connection to a device.

This API must be used to reply when Security Manager calls the registered UI Notification
Callback with SM_LINK_KEY_REQUEST_NTF as the event identifier. The application can
send either a positive or a negative reply to a Link Key request from the local Bluetooth
device (controller).

IN bd_addr The Bluetooth Device Address of the remote (un-trusted) device.


Parameters
link_key This parameter holds the Bluetooth Link Key. It must be a pointer to an
UCHAR buffer of size 16 octets. NULL is an acceptable value, only if the
link_key_present is 0.

link_key_present The application can set this flag to 0, if the Bluetooth Link Key, for
the specified remote Bluetooth device, is not available, to generate the Link Key Request
Negative Reply message to the local Bluetooth device. If link key is available, this flag
must be set to 1.

OUT None.
Parameters

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


Return

Notes None.

BT_sm_user_conf_request_reply
Name BT_sm_user_conf_request_reply(): To reply to the SM User Confirmation Request
Event
Synopsis #include “BT_sm_api.h”

API_RESULT BT_sm_user_conf_request_reply
(
UCHAR * bd_addr,
UCHAR accept
);

Description This API enables applications to accept/reject User Confirmation request, during link
authentication using Secure Simple Pairing procedure (Numeric Comparison association
model).

This API must be used to reply when Security Manager calls the registered UI Notification

MindTree Limited 17-June-2010 Page 96 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
Callback with SM_USER_CONF_REQUEST_NTF as the event identifier. The application can
send either accept or reject to a User Conf request from the local Bluetooth device
(controller).

IN bd_addr The Bluetooth Device Address of the remote device.


Parameters
accept This parameter specifies whether the User Confirmation request for the
specified remote Bluetooth device needs to be accepted or rejected. The valid values are:

0x00 – reject the User Confirmation request.

0x01 – accept the User Confirmation request.

OUT None.
Parameters

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


Return

Notes None.

Security Manager Callbacks


SM User Interface Notification Callback

This Callback mechanism is provided by the Security Manager Module to notify the application (or profile)
that a certain event has occurred like link key notification or for events that needs manual user
intervention – such as providing Bluetooth PIN, authorizing a device for service-level connection etc.

Name SM UI Notification Callback

Synopsis #include “BT_sm_api.h”

API_RESULT (* sm_ui_notify_cb)
(
UCHAR event_id,
UCHAR * bd_addr,
void * data
);

typedef API_RESULT (* SM_UI_NOTIFY_CB)


(
UCHAR event_id,
UCHAR * bd_addr,
void * data
);

MindTree Limited 17-June-2010 Page 97 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
IN event_id This parameter specifies the event that has occurred in the Security
Parameters Manager module that needs manual user interaction. The defined event types are given
in SM UI Notification Callback Event Identifiers.

bd_addr Bluetooth Device Address of the remote device for which this event
notification is being raised.

data This parameter contains information specific to the event_id being notified.
Detailed description of this parameter is given below.

OUT None.
Parameters

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


Return

Notes No blocking operations, such as calling functions that can block for indefinite period, or,
takes considerable amount of time, must be performed in the callback function. This SM
Callback is usually called from the context of EtherMind Read or Write Task, and hence
any blocking operation in the handling of the callback may seriously hamper the stack’s
performance.

SM UI Notification Callback Event Identifiers


Event Identifier Value Description
SM_ACL_CONNECT_REQUEST_NTF 0x01 Connection Request
SM_AUTHORIZATION_REQUEST_NTF 0x02 Authorization Request (Security Mode 2)
SM_PIN_CODE_REQUEST_NTF 0x03 PIN Code Request
SM_LINK_KEY_REQUEST_NTF 0x0 Link Key Request
SM_AUTHORIZATION_REQUEST_NTF_MODE_1_3 0x05 Authorization Request (Security Mode 1 or 3)
SM_USER_CONF_REQUEST_NTF 0x06 User Confirmation Request (Security Mode 4)
SM_USER_PASSKEY_REQUEST_NTF 0x07 User Passkey Request (Security Mode 4)
SM_USER_PASSKEY_NTF 0x08 User Passkey Notification (Security Mode 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, EEPROM or equivalent). This feature is available, and needs to be
ported, only if Security Manager is compiled with the SM_STORAGE compilation flag.

When SM_STORAGE is defined during compilation, the Security Manager invokes the
sm_storage_read() function during Bluetooth ON [BT_bluetooth_on()] procedure. The
sm_storage_read() is responsible for reading various Security Manager configuration parameters from
the persistent storage media.

Similarly, when SM_STORAGE is defined during compilation, the Security Manager invokes the
sm_storage_write() function during Bluetooth OFF [BT_bluetooth_off()] procedure. The
sm_storage_write() is responsible for writing various Security Manager configuration parameters to
the persistent storage media.

Typically, the sm_storage_read() and sm_storage_write() functions are available in


sm_storage.c file, under the bluetooth\private\platforms\arch\common sub-directory.

MindTree Limited 17-June-2010 Page 98 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
The Security Manager Configuration parameters, which need to be read/written to/from the persistent
storage, are described in the table below:

MindTree Limited 17-June-2010 Page 99 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK


Developer's Guide
SM Configuration Parameter Porting Guide

SM Default PIN Code This parameter configures the default PIN Code of the local Bluetooth
device.

In sm_storage_write(), the current value of ‘sm_default_pin_length’ and


‘sm_default_pin’ are written in the persistent storage.
In sm_storage_read(), previously configured values are read from the
persistent storage and the ‘sm_default_pin_length’ and ‘sm_default_pin’
are populated accordingly.

The ‘sm_default_pin_length’ is a SM Global variable (UCHAR), as defined


in sm_extern.h. The ‘sm_default_pin’ is a SM Global variable (UCHAR
Array of size BT_PIN_CODE_SIZE), as defined in sm_extern.h under
bluetooth\private\protocols\sm sub-directory.

It is important to write/read the ‘sm_default_pin_length’ to/from the


persistent storage media before writing/reading the ‘sm_default_pin’.

Bluetooth PIN Code can have a maximum of 16 octets.


When the BT_PIN_CODE_SIZE is configured (in BT_limits.h) to be less
than 16, it is advisable to write always 16 octets for the
‘sm_default_pin’, and pad the remaining octets, if any, with 0x00.
Similarly, when reading, 16 octets should be read from the persistent
storage, however, only BT_PIN_CODE_SIZE (or, ‘sm_default_pin_length’,
whichever is less) number of octets should be copied to
‘sm_default_pin’.

MindTree Limited 17-June-2010 Page 100 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
SM Configuration Parameter Porting Guide

SM ‘Trusted’ Device List Devices that are marked to be ‘Trusted’ in the Security Manager Device
Database can be stored in the persistent storage media at the time of
Bluetooth OFF, and/or, shutdown of the system. The ‘Trusted’ Devices
will be remembered and re-configured in the SM Device Database next
time when Bluetooth ON is called.

As of now, the Security Manager does not provide a mechanism to count


number of devices that are marked to be ‘trusted’. Hence, SM Device
Database needs to be scanned to find this information.
The Security Manager Device Database can be accessed by referencing
the ‘sm_devices’ global variable, which is an array of SM_DEVICE_ENTITY
(defined in sm_internal.h under bluetooth\private\protocols\sm sub-
directory) of size SM_MAX_DEVICES (defined in BT_limits.h). The
‘sm_devices’ is defined in sm_extern.h.

Procedure for writing/reading trusted device information is described


below:
(1) Write/read the number of trusted devices, from ‘sm_devices’
(2) For each trusted device, write/read the following information:
a. Device’s BD_ADDR – UCHAR array of 6 octets
b. Device’s Link Key – UCHAR array of 16 octets
c. Device’s Link Key Type – UCHAR
d. Device’s Trust – UCHAR
e. Device’s Name Length – UCHAR
f. Device’s Name - UCHAR array of SM_DEVICE_NAME_SIZE
octets
g. Device’s PIN Code Length – UCHAR
h. Device’s PIN Code – UCHAR array of BT_PIN_CODE_SIZE
octets
i. Device’s Rank - UCHAR

Bluetooth PIN Code can have a maximum of 16 octets.


When the BT_PIN_CODE_SIZE is configured (in BT_limits.h) to be less
than 16, it is advisable to write always 16 octets for the device’s PIN
Code, and pad the remaining octets, if any, with 0x00.
Similarly, when reading, 16 octets should be read from the persistent
storage, however, only BT_PIN_CODE_SIZE (or, device’s PIN Code length,
whichever is less) number of octets should be copied to device’s PIN
Code.

SM Device Name is an array of size SM_DEVICE_NAME_SIZE (defined in


BT_limits.h)

MindTree Limited 17-June-2010 Page 101 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
MSP430 resources used by the EtherMind SPP application
Timer1_A3
UART2 for interfacing with the CC2560 controller,
UART1 for interfacing with the PC to send the accelerometer data
ADC

Commonly used vendor specific API commands

Command HCI_VS_ HCILL_Parameters


Description Controls the behavior of the HCILL deep sleep protocol
Parameters Values used in the application
inactivity_timeout 0x0960
retransmit_timeout 0x0190
rts_pulse_width 0x96

Command HCI_VS_Sleep_Protocols_Configurations
Description Configures the Sleep mode to be used.
Before sending this command, deep sleep is disabled.
Parameters Values used in the application
Big-sleep enable 0x01
Deep-sleep enable 0x00
Deep-sleep protocol mode 0x00
Output I/O select 0xFF
Output pull enable 0xFF
Input pull enable 0xFF
Input I/O select 0xFF
Host_Wake deassertion timer 0x0064

Command HCI_VS_Set_LPS_Params_BTIP
Description Enables/disables the LPS feature.
Parameters Values used in the application
Enable/disable low-power scan 0x01

Command HCI_VS_Update_UART_HCI_Baudrate
Description Sets the UART HCI baud rate.
Parameters Values used in the application
UART HCI baud rate value Depends on the value set for ” BT_UART_CONFIG_BAUDRATE” in
sdk_config.h

MindTree Limited 17-June-2010 Page 102 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Explanation of the Sample Application (Accelerometer Data)
Important steps involved in sending Accelerometer data over SPP Connection:

1) Bluetooth is turned “ON” by invoking the function “BT_bluetooth_on”,the snap shot of


this code segment is

/* Turn ON the Bluetooth */


retval = BT_bluetooth_on(sdk_hci_event_indication_callback,
sdk_bluetooth_on_complete,
(CHAR *) SDK_CONFIG_DEVICE_NAME);

if (API_SUCCESS == retval) {
sdk_bluetooth_power_switch = SDK_BT_ON_IN_PROGRESS;
}
else {
/* Otherwise Bluetooth ON is in progress */
sdk_display(SDK_MSG_AREA, (const UCHAR *)
"Bluetooth ON is already in progress\n", 0);
}

2) After Bluetooth ON is notified on the registered callback (sdk_bluetooth_on_complete),


Inquiry Scan Type is changed to Interlaced Scanning, the snap shot of this code segment is

/* Write Inquiry Scan mode (Interlaced scanning) */


retval = BT_hci_write_inquiry_scan_type(0x01);
if (retval != API_SUCCESS) {
sdk_display(SDK_MSG_AREA,
(const UCHAR *)"Failed to turn set inquiry scan type\n", 0);
}

3) Page Scan Type is changed to Interlaced Scanning, the snap shot of this code segment is

/* Write Page Scan mode (Interlaced scanning) */


retval = BT_hci_write_page_scan_type(0x01);
if (retval != API_SUCCESS) {
sdk_display(SDK_MSG_AREA,
(const UCHAR *)"Failed to turn set inquiry scan type\n", 0);
}

4) Visibility of the remote MSP430BT5190+CC2560 device to which SPP connection has to be


established is turned on, the snap shot of this code segment is

/* Make local device discoverable */


retval = BT_hci_write_scan_enable(0x03);

if (API_SUCCESS == retval) {
sdk_bluetooth_discoverable_switch = SDK_DISC_ON;
}

5) Inquiry is initiated to discover the peer Bluetooth devices, the snap shot of this code segment is

retval = BT_hci_inquiry(SDK_LAP, SDK_INQUIRY_LEN, SDK_NUM_RESPONSES);


if (retval != API_SUCCESS) {
sdk_display(SDK_MSG_AREA, (const UCHAR *)

MindTree Limited 17-June-2010 Page 103 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
"Failed to initiate Inquiry\n", 0);
sdk_print_message((const UCHAR *)
"Error:Failed to initiate Inquiry\0");
} else {
sdk_display(SDK_MSG_AREA, (const UCHAR *)
"Inquiry Started...Wait for Completion\n", 0);
}

6) In the hci event callback note the peer Bluetooth device address, page scan repetition
mode and clock offset of each device that is indicated with “HCI_INQUIRY_RESULT_EVENT” event,
the snap shot of this code segment is

API_RESULT sdk_hci_event_indication_callback(UCHAR event_type,


UCHAR * event_data,
UCHAR event_datalen)
{
/* Switch on the Event Code */
switch (event_type) {

case HCI_INQUIRY_RESULT_EVENT:
/* Number of Responses */
hci_unpack_1_byte_param(&num_responses, event_data);
event_data += 1;
/* For each Response, Print the Inquiry Result */
for (count = 0; count < num_responses; count++) {
/* Note the bd_addr */
bd_addr = event_data;
event_data += 6;
/* Note the Page Scan Repetition Mode */
hci_unpack_1_byte_param(&page_scan_rep_mode, event_data);
event_data += 6;
/* Note the Clock Offset */
hci_unpack_2_byte_param(&clock_offset, event_data);
break;
}
}

7) After Inquiry is completed (“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,
page scan repetition mode and clock offset, the snap shot of this code segment is

API_RESULT sdk_hci_event_indication_callback(UCHAR event_type,


UCHAR * event_data,
UCHAR event_datalen)
{
case HCI_INQUIRY_COMPLETE_EVENT:
retval =
BT_hci_remote_name_request(bd_addr,
page_scan_rep_mode, 0x00,
clock_offset);
if (retval != API_SUCCESS) {
printf("Remote Name Request FAILED !! Error Code = 0x%04x\n",
retval);
}
}

MindTree Limited 17-June-2010 Page 104 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
8) Remote Bluetooth device name is indicated in with hci event indication callback with
“HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT” event as show below

API_RESULT sdk_hci_event_indication_callback(UCHAR event_type,


UCHAR * event_data,
UCHAR event_datalen)
{
case HCI_REMOTE_NAME_REQUEST_COMPLETE_EVENT:
event_data += 1;
/* Note the bd addr */
bd_addr = event_data;
event_data += 6;
/* Note the device name */
dev_name = event_data
}

MindTree Limited 17-June-2010 Page 105 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
9) Once the required peer Bluetooth device is found during inquiry, ACL Connection to this device is
initiated with its bluetooth address, page scan repetition mode and clock offset

/* Initiate ACL Connection */


retval = BT_hci_create_connection(peer_bd_addr,
SDK_CONFIG_ACL_PKT_TYPE,
page_scan_rep_mode, 0,
clock_offset, 0x01);

10) After ACL is successfully connected with the peer Bluetooth Device (this is indicated by
“HCI_CONNECTION_COMPLETE_EVENT” in the hci event indication callback, SDP Channel
is opened and SDP Service search attribute request is performed to find the remote server
channel required for SPP connection using the below shown code segment

retval = BT_sdp_open(&appl_spp_sdp_handle);

retval = BT_sdp_servicesearchattributerequest(&appl_spp_sdp_handle,
uuid,
num_uuids, attrib_id,
num_attribute_ids, NULL,
0x00,
appl_spp_attrib_data,
&appl_spp_attrib_data_len);

Remote Server Channel Number is obtained in the SDP Callback registered during SDP Open, the
snap shot of this code segment is

void appl_spp_sdp_callback(UINT8 command, UINT8 * data, UINT16 length,


UINT16 status)
{
switch (command) {
case SDP_ServiceSearchAttributeResponse:
/* Get/Decode RFCOMM Server Channel value */
printf("Received Response for SDP SSA Request for SPP.\n");
printf("Getting SPP Server Channel ... ");
fflush(stdout);
retval = BT_sdp_get_channel_number(data, &server_ch);
}
}

11) SPP Connection is initiated using the remote server channel number and peer Bluetooth Device
address as shown below

retval = BT_spp_connect(bd_addr, server_ch);

12) In the SPP callback registered during SPP Initialization, SPP_CONNECT_CNF event is received, the
snap shot of this code segment is

API_RESULT appl_spp_notify_cb(IN SPP_HANDLE handle, IN SPP_EVENTS


event_type, IN API_RESULT result,
IN void *data, IN UINT16 datalen)
{

switch (event_type) {
case SPP_CONNECT_CNF:

/* SPP is successfully connected */

MindTree Limited 17-June-2010 Page 106 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
/* Note the SPP Connection handle */
spp_connection_handle = handle;

}
}

13) SPP data read from the accelerometer is sent on the created SPP Channel using the
following code segment

retval = BT_spp_send(spp_connection_handle, data, data_len)

MindTree Limited 17-June-2010 Page 107 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Flow Diagram for Establishing SPP connection

MindTree Limited 17-June-2010 Page 108 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
MindTree Limited 17-June-2010 Page 109 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
MindTree Limited 17-June-2010 Page 110 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Flow Diagram for SPP Disconnection

MindTree Limited 17-June-2010 Page 111 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Flow Diagram for sending SPP Data

Note:Optional steps are denoted by dotted lines.

MindTree Limited 17-June-2010 Page 112 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Performance Analysis
1. Bluetooth Initialization Time
It is the time taken to complete the Bluetooth initialization sequence at a defined frequency and baud
rate on MSP430F5430+CC2560 setup. It is calculated with a GPIO signal using an oscilloscope.

It is calculated by setting a GPIO at the start of Bluetooth ON sequence and resetting at the successful
completion of Bluetooth ON sequence. The high time of the GPIO signal indicates the Bluetooth
initialization time.

The initialization time is defined as the time taken for turning ON the Bluetooth device. The steps
involved in the initialization procedure are:

1. Sending the following commands:

 HCI_Reset
 HCI_Set_Event_Mask
 HCI_Write_Simple_Pairing_Mode
 HCI_Read_BD_ADDR
 HCI_Read_Buffer_Size
 HCI_Write_Local_Name
 HCI_Write_Page_Timeout commands to the controller

2. Command to change the HCI UART Baud rate. This is initiated before sending the vendor specific
commands that are part of the service pack.

3. Vendor specific Init script for CC2560 corresponding to service-pack 2.30.

The following table presents initialization times at 25MHz for different baud rates:

Frequency (MHz) Baud Rate (bps) Initialization Time (seconds)

9600 43.1

19200 21.3

25 38400 10.9

57600 7.45

115200 3.94

921600 0.9

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

MindTree Limited 17-June-2010 Page 113 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
2. CPU Utilization Calculation
CPU utilization is the time spent by the processor in executing Bluetooth related tasks. To do this, a
sample application is created with the static payload size set to 120 bytes. This is sent continuously over
a single SPP connection in active mode.

To calculate the time spent in the block of code, a hardware counter is used. Counter is started before
the start of code and stopped just after the completion of execution of code. Time spent is calculated
using the below mentioned formula:

Time spent = Counter Value / Counter’s input clock frequency

In the current setup, % CPU utilization is calculated using

% CPU utilization = (Time spent / Reference Time) * 100

The CPU utilization measurements done with SPP TX mode at various baud rates and frequencies are as
shown below:

Frequency Baudrate
%CPU Utilization
[MHz] [Kbps]

8 115.2 84.14

12 115.2 78.66

18 115.2 65.86

25 115.2 37.07

921.6 46.42

MindTree Limited 17-June-2010 Page 114 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
3. Information on Code & Data sizes
The code and data sizes were calculated based on IAR EW430 MSP toolchain

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 Flash RAM


[Bytes] [Bytes]
Operating System
1
FreeRTOS 3979 3460
Sub Total 3979 3460
EtherMind Bluetooth Stack
HCI 8710 172
L2CAP 12696 1245
SDP 10400 144
RFCOMM 11640 194
GAP 4921 173
SPP 2088 48
BT buffer management 996 1290
Other stack related code 3340 2277
Sub total 54791 5543
CC2560 Device Specific Code
CC2560 Init Script 38170 35
eHCILL Deep-Sleep Protocol 634 29
Sub total 38804 64
Misc
MSP430 System Stack & Heap2 0 400
3
Platform Related Files 2991 932
4
IAR Lib 2474 0
Sub Total 5465 1332
     
Total 103039 10399

Notes:

MindTree Limited 17-June-2010 Page 115 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
1. FreeRTOS is an open RTOS downloadable from http://freertos.org. The FreeRTOS RAM utilization
includes RAM needed for user and BT tasks and associated semaphores. BT read/write task
requires approximately 2KB.

2. Sets up the necessary stack and heap required for using C code and also the buffers required for
SPP operations.

3. contains platform abstraction source code

4. contains function definitions related to IAR standard library

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

Sample Application Layers Flash RAM


Application
Temperature Application 17579 527
Sub Total 17579 527
HAL (Hardware Abstraction Layer)
HAL LCD 3246 125
Other HAL Components 1852 46
Sub Total 5098 171
     
Total 22677 698

Note that the stack and heap specified using the IAR IDE options are used only before the
FreeRTOS scheduler starts. After that, the stack size defined as part of the individual tasks is
used.

MindTree Limited 17-June-2010 Page 116 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
4. Throughput measurements
Throughput is the expression of how much amount of data is sent or transacted during a definite period of
time.

Details:

 Frontline FTS4BT 7.12.15.0 Air sniffer (Basic) software with FTS dongle is used for measuring

throughput.

 SSP (Secure Simple Pairing) is disabled; this enables FTS to sniff data based on PIN code alone.

 SPP connection is established between two msp430 devices and FTS sniffing is enabled.

 SPP data is sent from master to slave in active mode.

 Data transfer is sniffed for a period of 2 minutes.

 SPP Packet payload length for data transfer is 120 bytes. This is a static buffer and is continuously

sent on a confirmation event.

The results of the throughput related measurements with the active mode are given in the table below.

Frequency Baudrate Air-Throughput


[MHz] [Kbps] [Kbps]

8 115.2 70.746

12 115.2 71.941

18 115.2 72.696

25 115.2 74.398

921.6 295.633

MindTree Limited 17-June-2010 Page 117 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
5. LPM Measurements
The MSP430BT5190 processor is designed for Ultralow power applications and supports different LPM
modes (LPM0 through LPM4).But the default EtherMind Bluetooth SDK applications supports only LPM0
through LPM3.

To know more about the LPM configurations refer to section “Low power mode configuration for
MSP430BT5190”.

The power measurements were taken with LPM3 mode with the board being powered by battery (3V) and
currents were measured with the LCD Backlight set to OFF. The current measurements were taken at JP1
on the MSP-EXP430F5438 Experimenter board. .

Mode Active mode Low Power Mode(LPM3) Test Conditions

Bluetooth OFF 4.8mA 11.5uA fACLK = 32768 Hz, VCC = 3 V,

Bluetooth ON 6.6mA 11.6uA OSOCOFF = 0,

Bluetooth 8.8mA 11.5uA CPUOFF = 1,


Connected
SCG0 = 1, SCG1 = 1
SPP Tx 8mA NA

MindTree Limited 17-June-2010 Page 118 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
APPENDIX

How to build pre-existing project using IAR


 Select the path of the workspace file to open up the IAR workspace

 Click on the required project tab in the workspace window .Then Right click on the package file
and select ‘Make’

MindTree Limited 17-June-2010 Page 119 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 In the messages window, the Build results will be displayed. 
  

    
 

MindTree Limited 17-June-2010 Page 120 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 Connect the JFET to the PC and the MSP430. Then, load the binary image by clicking the debug
Icon shown in the screenshot.  

 
 
 Debugger will connect to the target.  The debugger loads the image and opens up the debugger 
view.  

 To start the execution of the image, Click on Debug -> go or press F5 button.

MindTree Limited 17-June-2010 Page 121 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
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 IAR installation path. 
 
IAR Assembler for MSP430 
5.10.1 (5.10.1.50144) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\a430.exe 
3/30/2010 2:28:50 PM, 2060288 bytes 
 
IAR C/C++ Compiler for MSP430 
5.10.1 (5.10.1.50144) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\icc430.exe 
3/30/2010 2:37:52 PM, 20022784 bytes 
 

IAR Library Builder 
4.61T (4.61.20.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\xar.exe 
2/2/2010 5:59:26 PM, 163840 bytes 
 
IAR XLIB 
4.61T/386 (4.61.20.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\xlib.exe 
2/2/2010 6:00:12 PM, 532480 bytes 

MindTree Limited 17-June-2010 Page 122 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 
IAR XLINK 
4.61T (4.61.20.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\xlink.exe 
2/2/2010 6:01:32 PM, 2338816 bytes 
 
Driver Installation Utility 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\USBXpressInstaller.exe 
9/9/2009 5:49:02 AM, 290816 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\InstallDriver32.exe 
1/14/2010 6:21:40 PM, 61440 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\InstallDriver64.exe 
1/14/2010 6:21:40 PM, 61440 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Vista32\DPinst.exe 
1/14/2010 6:20:08 PM, 552528 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Vista64\DPinst64.exe 
1/14/2010 6:20:08 PM, 1047632 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Win7‐32\DPinst.exe 
1/14/2010 6:20:08 PM, 552528 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Win7‐64\DPinst64.exe 
1/14/2010 6:20:08 PM, 1047632 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\WinXP\preinstalCDC.exe 
1/14/2010 6:19:36 PM, 49152 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\XP32\DPinst.exe 
1/14/2010 6:20:08 PM, 552528 bytes 
 
Driver Package Installer 
2.1 (2.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\XP64\DPinst64.exe 
1/14/2010 6:20:08 PM, 1047632 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 
6.0\430\PowerPac\USB\Windows\Bulk\Example\Exe\Echo1.exe 
4/12/2010 10:19:36 AM, 49152 bytes 

MindTree Limited 17-June-2010 Page 123 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 
6.0\430\PowerPac\USB\Windows\Bulk\Example\Exe\EchoFast.exe 
4/12/2010 10:19:36 AM, 45056 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 
6.0\430\PowerPac\USB\Windows\Bulk\Example\Exe\Test.exe 
4/12/2010 10:19:36 AM, 45056 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 
6.0\430\PowerPac\USB\Windows\HID\Example\Exe\HIDEcho1.exe 
4/12/2010 10:19:34 AM, 53248 bytes 
 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\src\examples\Segger\embOS\embOSView.exe 
1/14/2010 6:21:18 PM, 53760 bytes 
 
IAR CSpyBat 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\CSpyBat.exe 
3/18/2010 1:44:04 AM, 728576 bytes 
 
IAR Build Utility 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarBuild.exe 
3/18/2010 1:44:34 AM, 94720 bytes 
 
IAR Embedded Workbench IDE 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarIdePm.exe 
3/18/2010 1:44:40 AM, 478208 bytes 
 
IAR C‐SPY Batch Simulator Driver for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430bat.dll 
4/9/2010 12:55:06 PM, 458240 bytes 
 
IAR C‐SPY Emulator Driver for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430fet.dll 
4/9/2010 1:19:06 PM, 2262528 bytes 
 
IAR C‐SPY Library Support Plug‐in for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430libsupport.dll 
4/9/2010 12:55:02 PM, 540672 bytes 
 
IAR LibSupport Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430LibSupport.ENU.dll 
3/18/2010 1:43:16 AM, 10240 bytes 
 
IAR LibSupport Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 

MindTree Limited 17-June-2010 Page 124 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430LibSupport.JPN.dll 
3/18/2010 1:43:14 AM, 9216 bytes 
 
IAR C‐SPY Processor Descriptor for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430proc.dll 
4/9/2010 12:59:16 PM, 1750528 bytes 
 
IAR C‐SPY Simulator Driver for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\430sim.dll 
4/9/2010 1:02:42 PM, 3260416 bytes 
 
CP210x 
1.2 (1.2.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\CP210xManufacturing.dll 
1/14/2010 6:19:52 PM, 69632 bytes 
 
IAR Project File Converter for MSP430 
V3.21A/W32 (3.21.1.9) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\cwtd430.dll 
1/14/2010 6:21:20 PM, 352256 bytes 
 
FTD2XX library 
3.01.06 (3.1.6.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\FTD2XX.dll 
1/14/2010 6:19:52 PM, 81920 bytes 
 
HIL 
1, 2, 6, 0 (1.2.6.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\hil.dll 
3/10/2010 10:19:16 AM, 32768 bytes 
 
SEGGER J‐Link MSP430 interface DLL 
2.1.1.0 (2.1.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\JLink430.dll 
1/14/2010 6:19:52 PM, 114688 bytes 
 
MSP430.dll for USB‐MSP430‐FPA 4v5 based on TI's ver.2.4.3.0 
2, 4, 3, 0 (2.4.3.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\MSP430‐FPA.dll 
4/2/2010 10:49:38 PM, 561152 bytes 
 
MSP430 JTAG Interface Driver 
2.4.4.000 (2.4.4.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\msp430.dll 
4/8/2010 8:11:48 AM, 323584 bytes 
 
MSP430 
1, 0, 3, 8 (1.0.3.8) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\olimex.dll 
4/7/2010 9:58:26 AM, 831488 bytes 
 

MindTree Limited 17-June-2010 Page 125 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
SBMSP430_DLL DLL 
2, 3, 3, 3 (2.3.3.3) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\sbmsp430.dll 
1/14/2010 6:19:52 PM, 262144 bytes 
 
SiUSBXp 
3.1 (3.1.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\SiUSBXp.dll 
9/9/2009 5:49:02 AM, 90112 bytes 
 
MSP430 
Version (2.3.3.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\SoftBaugh.dll 
1/14/2010 6:19:52 PM, 32768 bytes 
 
IAR Workbench Target Descriptor for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\swtd430.dll 
4/9/2010 12:55:36 PM, 997376 bytes 
 
IAR Workbench Target Descriptor, Emulator, for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\swtd430fet.dll 
4/9/2010 12:54:50 PM, 577536 bytes 
 
IAR Workbench Target Descriptor, Simulator, for MSP430 
5.10.1 (5.10.1.50152) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\bin\swtd430sim.dll 
4/9/2010 12:54:50 PM, 536064 bytes 
 
FTD2XX library 
3.01.15 (3.1.15.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\FTD2XX.dll 
9/9/2009 5:49:02 AM, 202048 bytes 
 
FTDI USB Serial Converter Property Page Provider 
1.2.0.1 (1.2.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\amd64\ftbusui.dll 
10/22/2009 3:17:04 PM, 143688 bytes 
 
FT2232 VCP CoInstaller 
2.00.00.1 (2.0.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\amd64\ftcserco.dll 
10/22/2009 3:11:20 PM, 51528 bytes 
 
FTD2XX library 
3.01.19 (3.1.19.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\amd64\ftd2xx64.dll 
10/22/2009 3:17:18 PM, 330056 bytes 
 
FTDI Multi‐Lingual Property Page Text Library 
1, 4, 0, 1 (1.4.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\amd64\ftlang.dll 

MindTree Limited 17-June-2010 Page 126 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
10/22/2009 3:16:52 PM, 284992 bytes 
 
FTDI Virtual COM Port Property Page Provider 
2.06.00.1  built by: WinDDK (2.6.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\amd64\ftserui2.dll 
10/22/2009 3:08:36 PM, 55112 bytes 
 
FTDI USB Serial Converter Property Page Provider 
1.2.0.1 (1.2.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\i386\ftbusui.dll 
10/22/2009 3:17:10 PM, 120136 bytes 
 
FT2232 VCP CoInstaller 
2.00.00.1 (2.0.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\i386\ftcserco.dll 
10/22/2009 3:11:26 PM, 54088 bytes 
 
FTD2XX library 
3.01.19 (3.1.19.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\i386\ftd2xx.dll 
10/22/2009 3:17:26 PM, 206144 bytes 
 
FTDI Multi‐Lingual Property Page Text Library 
1, 4, 0, 1 (1.4.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\i386\ftlang.dll 
10/22/2009 3:16:56 PM, 197952 bytes 
 
FTDI Virtual COM Port Property Page Provider 
2.06.00.1  built by: WinDDK (2.6.0.1) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\Olimex\i386\ftserui2.dll 
10/22/2009 3:08:46 PM, 52552 bytes 
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Vista32\WdfCoInstaller01009.dll 
1/14/2010 6:20:08 PM, 1461992 bytes 
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Vista64\WdfCoInstaller01009.dll 
1/14/2010 6:20:06 PM, 1721576 bytes 
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Win7‐
32\WdfCoInstaller01009.dll 
1/14/2010 6:20:06 PM, 1461992 bytes 
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\Win7‐
64\WdfCoInstaller01009.dll 
1/14/2010 6:20:08 PM, 1721576 bytes 

MindTree Limited 17-June-2010 Page 127 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\XP32\WdfCoInstaller01009.dll 
1/14/2010 6:20:08 PM, 1461992 bytes 
 
WDF Coinstaller 
1.9.7600.16385 (win7_rtm.090713‐1255) (1.9.7600.16385) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\drivers\TIUSBFET\XP64\WdfCoInstaller01009.dll 
1/14/2010 6:20:06 PM, 1721576 bytes 
 
LCD Plugin for EW430 
3.42A (3.42.1.9) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\Lcd\lcd.dll 
4/9/2010 12:55:34 PM, 409088 bytes 
 
SEGGER embOS IAR‐Plugin 
6, 0, 1, 0 (6.0.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\rtos\embOS\embOSPlugin.dll 
3/30/2010 5:02:18 AM, 559104 bytes 
 
PowerPac RTOS Plugin 
6, 0, 1, 0 (6.0.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\rtos\PowerPac\PowerPacRTOSPlugin.dll 
3/30/2010 5:03:02 AM, 581632 bytes 
 
µC/OS‐II <= 2.86 KA Plug‐in for C‐SPY DLL 
2.5.0 (2.5.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\rtos\uCOS‐II\uCOS‐II‐286‐KA‐CSpy.dll 
3/19/2010 5:16:32 PM, 602624 bytes 
 
µC/OS‐II >= 2.87 KA Plug‐in for C‐SPY DLL 
2.5.1 (2.5.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\rtos\uCOS‐II\uCOS‐II‐KA‐CSpy.dll 
3/19/2010 5:04:16 PM, 606720 bytes 
 
PspUtil1Plugin DLL 
2.0 (2.0.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\simulation\PspPort1LED.psp.dll 
3/12/2010 12:18:04 PM, 464384 bytes 
 
CSPY PspWatchdogPlugin DLL 
2.0 (2.0.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\430\plugins\simulation\PspWatchdogPlugin.psp.dll 
3/12/2010 12:16:56 PM, 452096 bytes 
 
IAR CSpyBat Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\CSpyBat.ENU.dll 
3/18/2010 1:44:16 AM, 5632 bytes 
 
IAR CSpyBat Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 

MindTree Limited 17-June-2010 Page 128 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\CSpyBat.JPN.dll 
3/18/2010 1:44:18 AM, 4096 bytes 
 
IAR C‐SPY Debugger GUI 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\DebuggerGui.dll 
3/18/2010 1:44:56 AM, 1697792 bytes 
 
IAR C‐SPY Debugger GUI Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\DebuggerGui.ENU.dll 
3/18/2010 1:44:44 AM, 66560 bytes 
 
IAR C‐SPY Debugger GUI Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\DebuggerGui.JPN.dll 
3/18/2010 1:44:44 AM, 57344 bytes 
 
IAR Find In Files 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\FindInFiles.dll 
3/18/2010 1:44:44 AM, 300032 bytes 
 
IAR Find In Files Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\FindInFiles.ENU.dll 
3/18/2010 1:44:40 AM, 4608 bytes 
 
IAR Find In Files Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\FindInFiles.JPN.dll 
3/18/2010 1:44:40 AM, 4096 bytes 
 
IAR Build Utility Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarBuild.ENU.dll 
3/18/2010 1:44:14 AM, 3072 bytes 
 
IAR Build Utility Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarBuild.JPN.dll 
3/18/2010 1:44:14 AM, 2560 bytes 
 
IAR Embedded Workbench IDE Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarIdePm.ENU.dll 
3/18/2010 1:44:12 AM, 472064 bytes 
 
IAR Embedded Workbench IDE Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IarIdePm.JPN.dll 
3/18/2010 1:44:12 AM, 467456 bytes 
 

MindTree Limited 17-June-2010 Page 129 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
IAR IDE Framework 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IdeFramework.dll 
3/18/2010 1:43:14 AM, 1010176 bytes 
 
IAR IDE Framework Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IdeFramework.ENU.dll 
3/18/2010 1:44:10 AM, 4608 bytes 
 
IAR IDE Framework Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\IdeFramework.JPN.dll 
3/18/2010 1:44:10 AM, 3584 bytes 
 
IAR C‐SPY Debugger Kernel 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\kernel.dll 
3/18/2010 1:44:08 AM, 2159616 bytes 
 
IAR C‐SPY Debugger Kernel Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\kernel.ENU.dll 
3/18/2010 1:43:12 AM, 13824 bytes 
 
IAR C‐SPY Debugger Kernel Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\kernel.JPN.dll 
3/18/2010 1:44:10 AM, 9728 bytes 
 
IAR Log Window 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\LogWindow.dll 
3/18/2010 1:43:58 AM, 251904 bytes 
 
IAR Log Window Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\LogWindow.ENU.dll 
3/18/2010 1:44:42 AM, 9728 bytes 
 
IAR Log Window Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\LogWindow.JPN.dll 
3/18/2010 1:44:46 AM, 9216 bytes 
 
IAR Project Manager Engine 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerEngine.dll 
3/18/2010 1:44:04 AM, 1191936 bytes 
 
IAR Project Manager Engine Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerEngine.ENU.dll 

MindTree Limited 17-June-2010 Page 130 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
3/18/2010 1:43:08 AM, 12800 bytes 
 
IAR Project Manager Engine Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerEngine.JPN.dll 
3/18/2010 1:43:06 AM, 8704 bytes 
 
IAR Project Manager Gui 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerGui.dll 
3/18/2010 1:44:40 AM, 800768 bytes 
 
IAR Project Manager Gui Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerGui.ENU.dll 
3/18/2010 1:43:06 AM, 156672 bytes 
 
IAR Project Manager Gui Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\ProjectManagerGui.JPN.dll 
3/18/2010 1:43:04 AM, 147968 bytes 
 
IAR Text Editor 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\TextEditor.dll 
3/18/2010 1:43:40 AM, 732160 bytes 
 
IAR Text Editor Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\TextEditor.ENU.dll 
3/18/2010 1:43:12 AM, 25600 bytes 
 
IAR Text Editor Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\TextEditor.JPN.dll 
3/18/2010 1:44:38 AM, 23040 bytes 
 
Shared Library for Xerces‐C Version 1.5.1 
1, 5, 1 (1.5.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\xerces‐c_1_5_1.dll 
1/29/2010 8:49:32 AM, 1197056 bytes 
 
IAR XmlLib 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\bin\XmlLib.dll 
3/18/2010 1:42:58 AM, 85504 bytes 
 
IAR Code Coverage Plug‐in 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\CodeCoverage\CodeCoverage.dll 
3/18/2010 1:44:42 AM, 447488 bytes 
 
IAR Code Coverage Plug‐in Language Specific Resources 

MindTree Limited 17-June-2010 Page 131 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\CodeCoverage\CodeCoverage.ENU.dll 
3/18/2010 1:44:42 AM, 10752 bytes 
 
IAR Code Coverage Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\CodeCoverage\CodeCoverage.JPN.dll 
3/18/2010 1:44:42 AM, 10240 bytes 
 
IAR ORTI RTOS Plug‐in 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Orti\Orti.dll 
3/18/2010 1:43:52 AM, 556544 bytes 
 
IAR ORTI RTOS Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Orti\Orti.ENU.dll 
3/18/2010 1:44:46 AM, 8704 bytes 
 
IAR ORTI RTOS Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Orti\Orti.JPN.dll 
3/18/2010 1:43:10 AM, 7680 bytes 
 
IAR Profiling Plug‐in 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Profiling\Profiling.dll 
3/18/2010 1:43:28 AM, 453120 bytes 
 
IAR Profiling Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Profiling\Profiling.ENU.dll 
3/18/2010 1:43:10 AM, 9728 bytes 
 
IAR Profiling Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Profiling\Profiling.JPN.dll 
3/18/2010 1:43:10 AM, 8192 bytes 
 
IAR Stack Plug‐in 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Stack\Stack.dll 
3/18/2010 1:43:24 AM, 481280 bytes 
 
IAR Stack Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Stack\Stack.ENU.dll 
3/18/2010 1:42:58 AM, 7168 bytes 
 
IAR Stack Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\Stack\Stack.JPN.dll 
3/18/2010 1:42:58 AM, 6144 bytes 

MindTree Limited 17-June-2010 Page 132 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
 
IAR Symbols Plug‐in 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\SymList\SymList.dll 
3/18/2010 1:43:24 AM, 426496 bytes 
 
IAR Symbols Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\SymList\SymList.ENU.dll 
3/18/2010 1:43:00 AM, 3072 bytes 
 
IAR Symbols Plug‐in Language Specific Resources 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\common\plugins\SymList\SymList.JPN.dll 
3/18/2010 1:43:02 AM, 2560 bytes 
 
Metadata dll for package '430_binfet_fet_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_binfet_fet_fullsoft.dll 
4/12/2010 10:34:56 AM, 94208 bytes 
 
Metadata dll for package '430_binsim_sim_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_binsim_sim_fullsoft.dll 
4/12/2010 10:34:56 AM, 90112 bytes 
 
Metadata dll for package '430_bin_ew_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_bin_ew_fullsoft.dll 
4/12/2010 10:34:46 AM, 90112 bytes 
 
Metadata dll for package '430_cdc_cdc' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_cdc_cdc.dll 
4/12/2010 10:34:22 AM, 90112 bytes 
 
Metadata dll for package '430_doc_ew_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_doc_ew_fullsoft.dll 
4/12/2010 10:34:58 AM, 102400 bytes 
 
Metadata dll for package '430_drivers_driver' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_drivers_driver.dll 
4/12/2010 10:34:38 AM, 98304 bytes 
 
Metadata dll for package '430_drvx_drvx' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_drvx_drvx.dll 
4/12/2010 10:35:16 AM, 90112 bytes 
 
Metadata dll for package '430_feature_cdc_cdc' 
5.10.1 (5.10.1.0) 

MindTree Limited 17-June-2010 Page 133 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_cdc_cdc.dll 
4/12/2010 10:35:02 AM, 90112 bytes 
 
Metadata dll for package '430_feature_drvx_drvx' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_drvx_drvx.dll 
4/12/2010 10:34:20 AM, 90112 bytes 
 
Metadata dll for package '430_feature_ew_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_ew_fullsoft.dll 
4/12/2010 10:34:52 AM, 90112 bytes 
 
Metadata dll for package '430_feature_fet_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_fet_fullsoft.dll 
4/12/2010 10:35:02 AM, 90112 bytes 
 
Metadata dll for package '430_feature_PowerPac_pp' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_PowerPac_pp.dll 
4/12/2010 10:35:08 AM, 90112 bytes 
 
Metadata dll for package '430_feature_sim_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_feature_sim_fullsoft.dll 
4/12/2010 10:34:34 AM, 90112 bytes 
 
Metadata dll for package '430_installer_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_installer_fullsoft.dll 
4/12/2010 10:35:06 AM, 90112 bytes 
 
Metadata dll for package '430_lib_lib_lib_source' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_lib_lib_lib_source.dll 
4/12/2010 10:34:28 AM, 319488 bytes 
 
Metadata dll for package '430_PowerPac_pp_pp_eval' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_PowerPac_pp_pp_eval.dll 
4/12/2010 10:34:44 AM, 122880 bytes 
 
Metadata dll for package '430_send_driver' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_send_driver.dll 
4/12/2010 10:35:16 AM, 94208 bytes 
 
Metadata dll for package '430_send_ew_fullsoft' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_send_ew_fullsoft.dll 
4/12/2010 10:34:20 AM, 241664 bytes 
 

MindTree Limited 17-June-2010 Page 134 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Metadata dll for package '430_TI_drivers_driver' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_TI_drivers_driver.dll 
4/12/2010 10:34:34 AM, 98304 bytes 
 
Metadata dll for package '430_xlink_common_cddoc' 
5.10.1 (5.10.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\430_xlink_common_cddoc.dll 
4/12/2010 10:35:04 AM, 94208 bytes 
 
Metadata dll for package 'common_vcredistx86_2005_sp1_default' 
6.0.3790.0 (6.0.3790.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\common_vcredistx86_2005_sp1_default.dll 
4/12/2010 10:35:00 AM, 90112 bytes 
 
Metadata dll for package 'common_vcredistx86_2008_sp1_default' 
9.0.30729.17 (9.0.30729.17) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\common_vcredistx86_2008_sp1_default.dll 
4/12/2010 10:34:40 AM, 90112 bytes 
 
Metadata dll for package 'IDE_CodeCoverageRelease_plugin' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_CodeCoverageRelease_plugin.dll 
4/12/2010 10:35:18 AM, 90112 bytes 
 
Metadata dll for package 'IDE_CSpyBatRelease_exe_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_CSpyBatRelease_exe_langdll.dll 
4/12/2010 10:34:40 AM, 90112 bytes 
 
Metadata dll for package 'IDE_DebuggerGuiRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_DebuggerGuiRelease_dll_langdll.dll 
4/12/2010 10:35:06 AM, 90112 bytes 
 
Metadata dll for package 'IDE_FindInFilesRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_FindInFilesRelease_dll_langdll.dll 
4/12/2010 10:35:14 AM, 90112 bytes 
 
Metadata dll for package 'IDE_IarBuildRelease_exe_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_IarBuildRelease_exe_langdll.dll 
4/12/2010 10:35:04 AM, 90112 bytes 
 
Metadata dll for package 'IDE_IarIdePmRelease_exe_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_IarIdePmRelease_exe_langdll.dll 
4/12/2010 10:34:48 AM, 90112 bytes 
 
Metadata dll for package 'IDE_IdeFrameworkRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_IdeFrameworkRelease_dll_langdll.dll 

MindTree Limited 17-June-2010 Page 135 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
4/12/2010 10:34:50 AM, 90112 bytes 
 
Metadata dll for package 'IDE_kernelRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_kernelRelease_dll_langdll.dll 
4/12/2010 10:35:20 AM, 90112 bytes 
 
Metadata dll for package 'IDE_LibSupportRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_LibSupportRelease_dll_langdll.dll 
4/12/2010 10:34:48 AM, 90112 bytes 
 
Metadata dll for package 'IDE_LogWindowRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_LogWindowRelease_dll_langdll.dll 
4/12/2010 10:34:50 AM, 90112 bytes 
 
Metadata dll for package 'IDE_MiscRelease_misc' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_MiscRelease_misc.dll 
4/12/2010 10:35:10 AM, 94208 bytes 
 
Metadata dll for package 'IDE_OrtiRelease_plugin' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_OrtiRelease_plugin.dll 
4/12/2010 10:34:36 AM, 90112 bytes 
 
Metadata dll for package 'IDE_PlatformGeneric_release' 
1.0.0 (1.0.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_PlatformGeneric_release.dll 
4/12/2010 10:34:54 AM, 90112 bytes 
 
Metadata dll for package 'IDE_PlatformPackagesRelease_delivery' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_PlatformPackagesRelease_delivery.dll 
4/12/2010 10:34:30 AM, 90112 bytes 
 
Metadata dll for package 'IDE_Platform_release' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_Platform_release.dll 
4/12/2010 10:34:54 AM, 90112 bytes 
 
Metadata dll for package 'IDE_ProfilingRelease_plugin' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_ProfilingRelease_plugin.dll 
4/12/2010 10:35:18 AM, 90112 bytes 
 
Metadata dll for package 'IDE_ProjectManagerEngineRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐
info\IDE_ProjectManagerEngineRelease_dll_langdll.dll 
4/12/2010 10:35:00 AM, 90112 bytes 
 

MindTree Limited 17-June-2010 Page 136 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Metadata dll for package 'IDE_ProjectManagerGuiRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐
info\IDE_ProjectManagerGuiRelease_dll_langdll.dll 
4/12/2010 10:34:58 AM, 90112 bytes 
 
Metadata dll for package 'IDE_StackRelease_plugin' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_StackRelease_plugin.dll 
4/12/2010 10:34:28 AM, 90112 bytes 
 
Metadata dll for package 'IDE_SymListRelease_plugin' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_SymListRelease_plugin.dll 
4/12/2010 10:35:10 AM, 90112 bytes 
 
Metadata dll for package 'IDE_TextEditorRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_TextEditorRelease_dll_langdll.dll 
4/12/2010 10:35:12 AM, 90112 bytes 
 
Metadata dll for package 'IDE_XercesXMLRelease_dll_langdll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_XercesXMLRelease_dll_langdll.dll 
4/12/2010 10:34:36 AM, 90112 bytes 
 
Metadata dll for package 'IDE_XmlLibRelease_dll' 
6.0.2.1480 (6.0.2.1480) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\IDE_XmlLibRelease_dll.dll 
4/12/2010 10:35:12 AM, 90112 bytes 
 
Metadata dll for package 'lms_init_media' 
1.0.0 (1.0.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\lms_init_media.dll 
4/12/2010 10:34:32 AM, 90112 bytes 
 
Metadata dll for package 'lms_init_release' 
1.0.0 (1.0.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\lms_init_release.dll 
4/12/2010 10:34:52 AM, 90112 bytes 
 
Metadata dll for package 'lms_license_support_release' 
1.0.1 (1.0.1.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\lms_license_support_release.dll 
4/12/2010 10:34:30 AM, 90112 bytes 
 
Metadata dll for package 'lms_safenet_dongle_drivers_media' 
7.5.0 (7.5.0.0) 
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\lms_safenet_dongle_drivers_media.dll 
4/12/2010 10:35:20 AM, 90112 bytes 
 
Metadata dll for package 'lms_utilities_release' 
1.1.1 (1.1.1.0) 

MindTree Limited 17-June-2010 Page 137 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
$IAR_INSTALL_PATH\IAR Systems\Embedded Workbench 6.0\install‐info\lms_utilities_release.dll 
4/12/2010 10:35:14 AM, 94208 bytes 

MindTree Limited 17-June-2010 Page 138 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Frequently asked Questions
1. Can the JFET be used as a power source for MSP-EXP430F5438+PAN1315ETU?

No. The FET cannot power-up the MSP-EXP430F5438+PAN1315ETU Bluetooth solution. Only USB or
battery modes will need to be used.

2. Why does the MSP-EXP430F5438 experimenter's board reset after few minutes of use?

Check if the package is being run in evaluation mode. This can be done using the “INFO MENU”
screen. Check if the “DEV TYPE” value has either “F5438” or "F5438A" against it. This indicates
that the package is being run in evaluation mode.
When MSP430BT5190 is mounted, then you should not expect this limitation.

3. What is the version of the EtherMind stack used for the MSP430 SPP accelerometer, temperature
and evaluation packages?

The version of the EtherMind stack used is 8.0.31

4. I’m unable to build the package due to path length related issues. What could be wrong?

Windows has a max path length limit and does not accept paths that are too long. Move the
project higher in your directory structure – towards the C:\ directory – and the project should
compile without error.

5. Can I build my application with the different IAR version, other than the one mentioned in the
appendix section?

It is not recommended to use the other IAR version than the one that is specified in appendix
section.

MindTree Limited 17-June-2010 Page 139 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Abbreviations
Abbreviation Reference

API Application Programmers Interface


BD_ADDR Bluetooth Device Address
HCI Host Controller Interface
L2CAP Logical Link Control and Adaptation Protocol
SDDB SDP Database
SDK Software Development Kit
SDP Service Discovery Protocol
SM Security Manager
SPP Serial Port Profile
UART Universal Asynchronous Receiver Transmitter
USB Universal Serial Bus

References
Sl. Reference
No.

1 EtherMind Stack API Documents, Part I & II.


2 EtherMind SPP API Document

MindTree Limited 17-June-2010 Page 140 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide
Contact: Bluetooth@mindtree.com
www.mindtree.com

United States Japan United Kingdom Singapore India

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

Information disclosed in this document is preliminary in nature and subject to change.

MindTree Limited reserves the right to make changes to its products without notice, and advises customers to
verify that the information being relied on is current.

© 2010 MindTree Limited


The MindTree logo design is a trademark of MindTree Limited.
Bluetooth is a trademark owned by Bluetooth SIG, Inc. and licensed to MindTree Ltd.
All other products, services, and company names are trademarks, registered trademarks or service marks of
their respective owners.

MindTree Limited 17-June-2010 Page 141 of 141 MSP430BT5190+CC2560 EtherMind Bluetooth SDK
Developer's Guide