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

CC256x TI Bluetooth Stack KeyFobDemo App

From Texas Instruments Wiki
Jump to: navigation, search

Return to CC256x MSP430 TI’s Bluetooth stack Basic Demo APPS

Demo Overview[edit]

The KeyFobDemo is used to demonstrate button press or accelerometer data over LE. A SPP Server is registered with port one. Any BR/EDR or LE device can connect to it and the data will be shown. It is recommended that the user visits the kit setup Getting Started Guide page before trying the application described on this page.

Hardware Setup (Client and Server)[edit]

Client[edit]

Once the code is flashed on the two separate boards, connect the boards to a PC using a miniUSB cable. Once connected, wait for the driver to install. It will show up as MXP-EXP430F5438 USB - Serial Port (COM x) under Ports(COM & LPT) in the Device manager. Attach a Terminal program like Tera Term to the serial port x for the board. The serial parameters to use are 9600 Baud, 8, n, 1.


Connecting two devices[edit]

NoteNote: The application can be run on either the MSP-430/EZE-430.

Initialize the KeyFOB Server[edit]

a) Run the above steps to initialize the KeyFOB Server.

NoteNote: There is no command prompt for input after board initialization unlike the other demos. If you reset the device you should see a startup screen like this one.

KeyFOBDemoSS1-Startup.png



Connecting from a SPP-LE Client[edit]

NoteNote: Steps b and c are optional if you already know the Bluetooth address of the device that you want to connect to.

b) The Client LE device can try to find which LE devices are in the vicinity using the command: StartScanning.

c) Once you have found the device, you can stop scanning by using the command: StopScanning.

d) Once the application on the Client side knows the Bluetooth address of the device that is advertising, it can connect to that device by issuing the ConnectLE <Bluetooth Address> command.

KeyFOBDemoSS1-3.png


KeyFOBDemoSS1-4.png



e) On the KeyFobDemo we should see a connection indication and accelerometer tracking the movement of the Client device.

KeyFOBDemoSS1-1.png


f) Once disconnected we should see a disconnect indication.

KeyFOBDemoSS1-2.png


Connecting via TI’s APP[edit]

Hardware Setup[edit]

Iphone[edit]

  • iPhone 4S
  • iOS Version: 6.0
  • App Version/Description: TI BLE Multitool.

CC256x Keyfob[edit]

NoteNote: Currently only EZ-430 platform is supported.

Application Overview[edit]

TI has a new app TI BLE Multitool that can be used to connect the Iphone to the KeyFobDemo. For more about the app refer to the iTunes Page.

BLE Connection
[edit]

a) Open the TI BLE Multitool app. The app should begin searching devices.

KeyFobBLEMultiTool_SS1-3.png


b) Select the keyfobdemo from this list. The device should then appear as the connected device.

KeyFobBLEMultiTool_SS1-4.png


c) Tap the blue arrow next to the connected device. We should see device information screen. Scroll down to the actions column. Simple keys service and accelerometer service should be disabled.

KeyFobBLEMultiTool_SS1-5.png


d) Enable both the services. The above profiles section should have a new Show Application option glowing green.

KeyFobBLEMultiTool_SS1-6.png


e) Select show application from above and we should see the simple keys service and the accelerometer service. Any key press or movement on the keyfob Server should get detected here.

KeyFobBLEMultiTool_SS1-7.png


f) On the KeyFobServer, we should see indications for connection, accelormeter data and button presses.

KeyFobBLEMultiTool_SS1-1.png


g) To disconnect from the App, go back to the device selection screen and click on the KeyFobDemo on the connected devices list. The device should disconnect. On the Server you should get a disconnect notification.

KeyFobBLEMultiTool_SS1-2.png


Connecting via Atomax BLE APP[edit]

Hardware Setup[edit]

Iphone[edit]

Blueterm

  • App version 3.1.1
  • compatible iphone 4s ios > 6.0


  • iPhone 4S
  • iOS Version: 5.0
  • App Version/Description: Atomax BLE v1.0.

CC256x Keyfob[edit]

NoteNote: Both EZ-430 and MSP-EXP platform are supported.

Application Overview[edit]

Atomax Inc has a new app BLE that can be used to connect to the KeyFobDemo. For more about the app refer to iTunes Page Note: The app currently supports iOS 5 only.

BLE Connection
[edit]

a) To connect to the demo from the app press Scan and connect to fob.

KeyFobIphone-9.png


b) The app should search and connect to the device.

KeyFobIphone-10.png


.

KeyFobIphone-11.png


c)Any movement of the device should be detected by the accelerometer on the app and vice versa. Also button presses on the device should register on the demo as well.

KeyFobIphone-12.PNG


d) We will see activity on the KeyFob Server similar to the above example of connecting from a SPPLE Client

KeyFobIphone-4.png


Connecting via Blueterm Android APP[edit]

Hardware Setup[edit]

Phone[edit]

  • Galaxy Nexus
  • Android Version: 4.0.4
  • App Version/Description: Blueterm v1.0.

CC256x Keyfob[edit]

NoteNote: Currently only EZ-430 platform is supported.

Software Setup[edit]

  • In Project settings (ALT+F7), please define ASCII_DATA"  to see ASCII characters using BlueTerm.

CC256x IAR project settings.JPG[edit]

Application Overview[edit]

Blueterm is an app that can be used to connect an Android device to the KeyFobDemo. For more about the app refer to the Android page.

NoteNote: The app requires Android V2.1 and above.

SPP Connection
[edit]

a) To connect to the device, open blueterm, press the menu button and hit connect to device.

KeyFOBDemoSS1-AndroidAPP2.png


b) The app should show a list of paired devices. If the device is not already paired, select scan. It should search for available bluetooth devices.

KeyFOBDemoSS1-AndroidAPP3.png


c) Select and Pair it with the device running the keyfobdemo. After a while you should see accelerometer and button press data appear on the blueterm screen.

KeyFOBDemoSS1-AndroidAPP1.png


Note that the KeyFobDemo has a default pin code of 0000. If you use any other pin code on the phone/app it will not pair.

NoteNote: If you are having difficulty connecting to the keyfobdemo, first pair with the device under bluetooth settings and then select the device from the list of paired devices when you select connect device in blueterm.


Simultaneous SPP Connection
[edit]

Client[edit]

Software: SPPDemo/SPPLEDemo

Hardware: MSP-EXP430F5438

 

Server[edit]

Software: KeyFobDemo

Hardware: EZ430


Initialize the KeyFOB Server[edit]

a) Run the steps in the hardware setup guide to initialize the KeyFOB Server.



Connecting from a SPP Client[edit]

b) Issue the Client command in the choose mode prompt of the SPP screen.

c) Before we connect to the KeyFob Server, make sure that Display Raw Data is on. Issue the Displayrawdatamode 1 command in the command prompt.

KeyFOBDemoSS1-7.png


d) At the Client>prompt, issue the Inquiry command. This will initiate the Inquiry process. Once it is complete, you will get a list of all discovered devices.

e) You can access this list any time by issuing the DisplayInquiryList in the Client prompt.

f) Note the index number of the KeyFob Server.

g) Issue the Open <index number of KeyFob> 1 command in the command prompt, noting that the KeyFob always opens a Server with port number 1.

KeyFOBDemoSS1-8.png


h) Wait for SPP Open confirmation.

i) On the KeyFob Server side you should see both SPP Open Indication and Advertising Data Configured Successfully indications.

j) On the Client, you should see accelerometer data being displayed on the screen.

KeyFOBDemoSS1-9.png


k) To close the connection, issue the close 1 command on the Client. You should see a Client port closed on the Server side and a SPP Close Port and Advertising Data Configured Successfully indication on KeyFobServer.

KeyFOBDemoSS1-10.png


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

Please post only comments related to the article CC256x TI Bluetooth Stack KeyFobDemo App here.

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

Please post only comments related to the article CC256x TI Bluetooth Stack KeyFobDemo App here.

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

}}

Hyperlink blue.png Links

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

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity