0

I'm new to Bluetooth, but searching the web, I've found the following description of Bluetooth profiles:

"A Bluetooth profile is a specification regarding an aspect of Bluetooth-based wireless communication between devices. In order to use Bluetooth technology, a device must be compatible with the subset of Bluetooth profiles necessary to use the desired services. A Bluetooth profile resides on top of the Bluetooth Core Specification and (optionally) additional protocols. While the profile may use certain features of the core specification, specific versions of profiles are rarely tied to specific versions of the core specification. For example, there are Hands-Free Profile (HFP) 1.5 implementations using both Bluetooth 2.0 and Bluetooth 1.2 core specifications."

So, I have an MSP430 board with the CC256X Bluetooth module on it, and I want to transfer data between that device and my iOS device. Does that device always have to communicate with my iOS device using a Bluetooth profile? If so, could you please shed some light as to what the simplest profile to make this happen is? As far as my design constraints, all I want to do is press a button on my iOS application, and have that turn an LED on my board. Thus, I just need the board to react to a simple characteristic change.

Alexandru
  • 12,264
  • 17
  • 113
  • 208
  • Hope, this [so answer](http://stackoverflow.com/questions/18884705/transfer-data-between-ios-and-android-via-bluetooth) can help you out – ashish Jan 23 '14 at 01:53
  • Which IDE you are using to write embedded code? This might sound off topic, but I have worked with IAR for CC2541. Texas Instruments has given sufficient examples to show how a simple profile can be written. –  Jan 29 '14 at 09:59
  • @TejasJayasheel I'm using CCS. The examples are the same between CCS and IAR, but this is a question about the Bluetooth specification more than anything, and what the simplest profile to use for a Bluetooth service is. – Alexandru Jan 29 '14 at 14:29

1 Answers1

1

Please check

profiles/SimpleProfile/simpleGATTProfile.c 

and

profiles/SimpleProfile/simpleGATTProfile.h

That's as simple as it ever gets. Once you write a profile with service and characteristics, you just have to include it in your code and use them just like any other service and characteristic.

Coming to your requirement, you need to have a characteristic with write permission in your profile. When you press the button in iOS application, write a value 1 to this characteristic. This will trigger writeCB to your embedded application code. You can use

HalLedSet( HAL_LED_2, HAL_LED_MODE_ON );

to turn on the LED in this callback.

  • 1
    Thanks, Tejas. I created a new project and followed the SPPLEDemo_Lite to get it up and running and I finally figured it out the other night while I was tinkering with it. I also found this article to be of much help: https://bluegiga.zendesk.com/entries/25053373--REFERENCE-BLE-master-slave-GATT-client-server-and-data-RX-TX-basics – Alexandru Jan 30 '14 at 14:05