Recently I worked on a project to add Bluetooth® Smart remote reading capabilities to an electricity power strip meter. With the convenience of finding Bluetooth Smart on most smartphones and tablets, it allows you to easily read the power consumption on a smart power strip (in the past those strips had an LCD display, but who wants to get below a cabinet to find the hidden power strip and read it?).
To write code for Bluetooth Smart is not a trivial task for beginners. It could take a lot of time to search the web, read documentation and digest the information before you could actually start development, not to mention to have the product work. This is why TI provides easy to use and implement Bluetooth Smart solutions, tools and TI Designs to help you get started. As someone who had no prior experience working with Bluetooth Smart, I was able to integrate the new SimpleLink ultra-low power CC2650 wireless microcontroller (MCU) into the meter design in just a few easy steps below. I wanted to share a guide of how you can get started yourself:
First, go to the TI website and order the new SimpleLink SensorTag based on the CC2650 wireless MCU (CC2650STK) for Bluetooth Smart which provides an easy reference design and quick start guide. The CC2650STK is a ready-made hardware that has 10 low-power sensors integrated inside. It also allows for development with an additional $15 Debug Devpack plug-in module (CC-DEVPACK-DEBUG).
Once you receive the new development kit, you must download the package BLE-Stack, along with the Android or iOS app to get started. It should only take a couple of minutes to get the demo setup and running.
To most of the first time users like me, it is not difficult to find a lot of resources about the development kit and platform from either TI.com or open sources. So, what’s next now that the demo is up and running?
After reading a lot of documentation, the first step to Bluetooth Smart integration (with the SensorTag kit and software I mentioned above) is to generate a profile (service and characteristic) for your application.
When the profile is fixed, then you need to code the profile. This is not a difficult task but you may need some guidance to start.
I suggest choosing one profile and application from the example application code and making a copy of the profiles and associated application to a new name.
Then give a new UUID to the new profile and modify the new application code to return some values for the new profile.
When tested OK, it means the newly added profile works. You can then go onto edit the profile source file to put the profile and the application in.
To see the procedure of coding the complete profile, download this TI design reference design: TIDC-BLE-METER-READING.
Additionally, you can use this guide to learn how to modify a profile from an existing one.
Now that you know how to add Bluetooth Smart to your application, purchase the SimpleLink SensorTag and the Debug Devpack to get started developing today!