This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Where to start, additional Resources.

Other Parts Discussed in Thread: CC2540, CC2541

Hello all Devs,

I'm not an expert on Bluetooth 4.0 Low Engergy or the OSAL or the BLE Stack. But I have found some additional resources which have helped me come to terms with the CC2540/41 and the BLE stack. I see many posts by Developers struggling to get their heads around TI's BLE implementation. The amount I've had to learn is sizable so I can't dump it on this forum (and my Supervisor wouldn't consider this a productive use of my time) but I can point people in the right direction.

BLE is my first wireless protocol. So this was an educational experience, it doesn't work how I thought it would work and importantly it isn't and should not be confused with normal Bluetooth. BLE appears to be intended for Low Power, Low Performance applications. Don't expect it to remain Low Energy if you try to stream data. In fact, kiss your coin cell goodbye.

I recommend Heydon, R., 2012, "Bluetooth Low Energy, The Developer's Handbook", 1st ed, Prentice Hall, Crawsfordville.

Heydon worked on the product Wibree which later became Bluetooth 4.0. Robin Heydon is a member of Bluetooth SIG's Hall of Fame. He covers the lower levels in more detail than most of us will need but his chapters on Services, Servers, Profiles and Clients will be useful to those new to BLE. Understanding the concepts of Attributes, Services, Servers, Profiles and Clients is critical to understanding BLE.

I used this book to understand the Keyfob Project. From making small changes to Keyfob I was able to experiment with making new Attributes and Services. I am currently working to interface an EEPROM to read/write data over the BLE link. There are still a few bugs to work out... the CC2541 times-out after disabling the EEPROM. 

If anyone else has found some decent resources, post them here. I'll get around to posting my code when I've ironed out the bugs and the hardware set-up. I'll ensure the code is annotated to assist in comprehension.

Happy Coding,

-Morgan



  • Hello Morgan,

    Thanks for the post.  It looks like a very informative book.  I downloaded the synopsis and it seems like it summarizes the 2000+ page CoreBluetooth v4.0 into a few hundred pages.  I didn't see any mention of the CC254x in the index though.  Either way, it looks like a helpful resource to have.

    Another book "Building iPhone and iPad Electronic Projects :Real-World Arduino, Sensor, and Bluetooth Low Energy Apps in techBASIC" does have chapters and resources related to the CC2540 and the SensorTag (Even though it is not mentioned in the title).  The techBasic App has programs that demonstrate the connecting to the Keyfob and the Sensor tag.

    These resources can eventually be added to the htt;://www.ti.com/BLE-wiki page.

    Thanks,

  • Hello Greenja,

    No Heydon doesn't mention any device in particular. He mentions the BLE specification but in a number of places mentions that the implementation of various parts of a stack are left up to the device manufacturer.

    A good place to start in understanding the concept of an Attribute Table is the Keyfob project. In accelerometer.c and accelerometer.h a Service is defined which includes an Attribute Table. This Table was left up to TI to implement in their own language which in this case is C but it could be done in anything really which is why Bluetooth SIG have only given us a Specification.

    I broke out Excel and translated this code into an attribute table that I could read by carefully examining the code. Chapter 10 will assist in understanding what the code is trying to achieve and which kind of Service it is trying to provide. My small knowledge of TI's implementation is based on working backwards through the various files and seeing who does what and who has what responsibilities. It is messy. It might have been cleaner in an Object-Oriented Language, but you work with what you've got.

    Happy Coding,

    Morgan

  • That was a decent bit of information.  Good to see they used the TI CC2540 development kit.  The best part of all is that they have a phone with BLE that has full support and works properly with the SDK.  I am looking forwards to developing Apps for this phone.  The limited number of devices may work in the favor of developers that want specialized and restricted applications.

    Thanks,

  • A YouTube tutorial by Haydon: www.youtube.com/watch;list=PLHow1T5bc-u-VpNNQi3C10xPIo0x47w-f