Developer Skill Sprint: Spelunking Bluetooth Low Energy Devices

Posted by on in Programming

This "How To" video shows you how to work with Bluetooth Low Energy based devices and how to develop multi-device applications that leverage devices that have standard and non-standard profiles, services and characteristics. Bluetooth Low Energy or Smart Bluetooth provides a new environment for devices with small amount of data to transfer and lower power consumption. GATT profiles are high level definitions that define how to use standard services in your applications. For example, there is a Heart Rate profile that is used for fitness or health applications. The server device with a Heart Rate Sensor exposes the standard Heart Rate Service so that the BluetoothLE client discovers the service and starts collecting data, for example the bpm (beats per minute). The GATT profile is the combination of service + characteristics.

To spelunk Bluetooth Low Energy devices, you can use the ExploreDevicesLE sample application that ships with RAD Studio, Delphi and C++Builder. The source code projects for the Delphi and C++ versions of the sample can be dowloaded from CodeCentral using the link further down in this blog post. The ExploreDevicesLE FireMonkey based application can run on all the platforms supported. Platforms supporting BluetoothLE (as of RAD Studio 10 Seattle) include: Windows 8/10, OS X, iOS, and Android. The sample application allows you to discover BluetoothLE devices, displays the services and characteristics found in a tree view and provides an interface to display data from a selected BluetoothLE device.

To implement BluetoothLE support for standard and non-standard services in your applications:

  • Place a TBluetoothLE component in your project
  • Discover Bluetooth LE devices
  • Discover and get the services for the device
  • Discover and get the characteristics for the service
  • Read, write or subscribe to a characteristic
  • Extract the information from the raw data

 

Skill Sprint Replay is available on the Embarcadero YouTube channel

The replay of the Spelunking Bluetooth Low Energy Devices skill sprint with Q&A can be found at https://www.youtube.com/watch?v=yRjacR5DcYI

 

ExploreDevicesLE Source Code

Updated Sample Projects for the ExploreDevicesLE applications for Delphi and C++Builder 10 Seattle - http://cc.embarcadero.com/item/30497

 

Learning Resources

 

Using BluetoothLE

GATT (Generic Attribute Profile)

Bluetooth Technology

Wahoo Fitness Bluetooth Scale

Samples

BluetoothLE Related Videos

 

 



About
Gold User, Rank: 15, Points: 256
This latest season of Developer Skill Sprints focuses on programming tips and techniques most requested by attendees of the past 72 skill sprints we’ve already presented. This quarter we’ll take your

Comments

Check out more tips and tricks in this development video: