2

Not sure if to posted this on SO.

I'm looking at pretty simple BLE Device. It has a two LEDS (to simplify) that can be switched on or off.

While browsing the GATT profiles, i can't find which profile i should use. Most of them send something back (like a temerature) to the client (upon request).

I need the opposite: switch something on/off of the BLE decive (server). In my case, the client (a iPhone) would send a command to switch on/off LED-1 or LED -2.

What service profile i should use?

Thanks.

I'm using the nRF8001 development kit & nRF Studio for making the services.h

Roger
  • 7,535
  • 5
  • 41
  • 63

2 Answers2

2

If the LED's are just to be turned on/off there probably isn't any specific profile that they belong to. You probably need to know the handle and write directly to the attribute some value that maps to on or off. Maybe you can figure it out by listing all attribute characteristics. (unfortunately I don't know how to do that specifically on the iPhone)

Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
  • Im developing the h/w myself. The problem is not on the iPhone. The h/w needs to be setup with a correct GATT profile. Or i should say, the h/w should be **described** according to a correct GATT profile. – Roger Jun 20 '13 at 09:50
  • I don't think there's any "correct" GATT profile for a light switch. I think you can just specify your own attributes and use them how you wish. The profiles are just agreed upon interfaces so you could swap one heart monitor for another heart monitor. – Tim Tisdall Jun 20 '13 at 15:55
  • here's a link that may be helpful: http://www.m2mgsm.com/download/Bluetooth/Low%20Energy/Profile_development_BLE.pdf – Tim Tisdall Jun 20 '13 at 15:55
1
  1. I noticed that you are using the nRF8001 development kit. So, first thing you need to check is whether the LEDs are connected to IO port of the micro-controller on the kit or directly connected to IO port on BLE chip. If it connected to micro-controller on the kit then you need to program the kit to handle the received bluetooth data to control led. (It would have a high chance it is in this situation) If it connected to BLE chip, it means you need to program the ble chip first.

  2. Usually, useful GATT profiles are user specified. It means you need to define the profile yourself. And, I believe some part of the kit or the studio would allow you to do modifications to the profile.

  3. There is only one default GATT profile you should use -- GAP which is to define the defaults like name of the ble device. The others usually are user self-defined profiles.

skyin
  • 558
  • 5
  • 18