Bluetooth LE Struggles

So I have been working pretty hard lately trying to get this whole Bluetooth LE thing to work. I am using the adafruit Bluetooth LE board to prototype this thing. As is shown by the obvious silk screen on the board this thing is based on the Nordic nRF8001 Bluetooth chip. Datasheet here: nRF8001_PS_v1.3

The Nordic pin-out is logically connected to the board’s pin-out so there aren’t many surprises here. I have it hooked up to an mbed chip for testing and after some annoying work around involving the bit order of SPI transfer and the mbed being unable to change the mode, (Grrrr), I have both chips talking happily.

0725151227

The real work, unknown to me at first, was in configuring the service pipes. At this point I have the chip successfully announcing itself to the Bluetooth universe!

ble capture

However upon connecting with a peer device I get an instant error connecting message on the peer device and this output to my serial console.

blue capture 2

These messages basically say:

  1. A connection has been established with a peer device.
  2. A new service pipe has been opened.
  3. A disconnect event with the message “Remote device failed to complete a Security Manager procedure”.

How frustrating. After ravaging the internet to figure out what this “Security Manager Procedure” is, when it should be operating in an unauthenticated bonded relationship, I fail to find a solution to this issue. Even using the setup data from adafruit’s demo code I still get this error. At this point it must be something I am just not understanding with the nRFgo Studio software and the whole idea of GATT services.

Scrutinize my code here at the mbed site. If you figure something I have missed let me know! But anyways…

…back to work I guess.