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.
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!
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.
These messages basically say:
A connection has been established with a peer device.
A new service pipe has been opened.
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…
I wrote this document last year for a communications project and just found it while rummaging through some old files. Maybe it will be of use to some of you interested in advanced debugging of Raspberry Pi applications. You can take a look by clicking the link below.
The purpose of this document is to describe the methods and benefits of using MATLAB and Simulink to analyze the physical inputs and outputs of the Raspberry Pi computer. This document is written at the level of a user who is familiar with basic electrical concepts but no exhaustive circuit’s knowledge is required. The reader should also be familiar with Linux and the Raspberry Pi.
In this guide python will be used as the scripting language since it is most commonly used for Raspberry Pi programming. Advanced knowledge of python is not required to understand this guide. A Raspbian Linux image provided by MATLAB for the Raspberry Pi will also be used. Installation and configuration is demoed under MATLAB R2013a but is similar for most versions and will be covered first.
This is my demo of Lab 3 for Georgia Tech’s ECE 4180 Embedded Design Course with Professor Hamblen.
It is a simulated thunderstorm using randomized flashing LEDs and the Shiftbrite. The sound effect is selected at random from a bank of them on an SD card and played through a sound jack to external speakers. A uLCD displays a screen saver like effect of rolling clouds. A potentiometer controls the storm intensity or the average of randomized durations between lightning “strikes”. This change is also reflected on the uLCD in real time.
The whole system is powered by the ARM mbed and it is actually using the official RTOS to coordinate everything. It would be a monster of a problem to try to handle all the peripherals without it.
I would like to work on improving the sound quality. Currently it is limited to 16bit PCM wav files at 16 Khz. A bassier speaker would probably be nice as well. The cloud screen saver effect really isn’t that critical for the functioning of it and in a dark room it actually looks better off but I get some extra credit for it :).
The most important thing I would like to add would be a high quality rain sound effect. At that point it would have the potential to actually be relaxing at night especially with some calmer thunder effects. Maybe more of a rolling thunder.