Developer Skill Sprint: Spelunking Bluetooth Low Energy Devices
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
- http://docwiki.embarcadero.com/RADStudio/Seattle/en/Using_Bluetooth_Low_Energy
- http://docwiki.embarcadero.com/Libraries/Seattle/en/System.Bluetooth
- http://docwiki.embarcadero.com/RADStudio/Seattle/en/Using_Bluetooth_Low_Energy#Platform_Support
GATT (Generic Attribute Profile)
- https://developer.bluetooth.org/gatt/Pages/default.aspx
- https://developer.bluetooth.org/gatt/Pages/GATT-Specification-Documents.aspx
- https://developer.bluetooth.org/gatt/profiles/Pages/ProfilesHome.aspx
- https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx
- https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx
Bluetooth Technology
- https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-technology-basics/low-energy
- https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-devices
Wahoo Fitness Bluetooth Scale
Samples
- http://docwiki.embarcadero.com/CodeExamples/Seattle/en/FMX.Heart_Rate_Monitor_Sample
- C:\Users\Public\Documents\Embarcadero\Studio\17.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\Bluetooth
- C:\Users\Public\Documents\Embarcadero\Studio\17.0\Samples\CPP\Multi-Device Samples\Device Sensors and Services\Bluetooth
BluetoothLE Related Videos
- CodeRage X: Deep Dive on Beacons and Bluetooth LE with R&D (C++) - https://www.youtube.com/watch?v=FTlrrbbx2CI
- CodeRage X: Deep Dive on Beacons and Bluetooth LE with R&D (Delphi) - https://www.youtube.com/watch?v=18vsP6LD2K0
- CodeRage 9: Bluetooth LE Programming with Object Pascal, VCL and FMX - https://www.youtube.com/watch?v=6d7o8dcNBGI
- CodeRage 9: Bluetooth Classic and LE C++ Programming with VCL and FMX - https://www.youtube.com/watch?v=E6oKLuJZbnQ
- IoT in Action: Building a Modern Healthcare Application Multi-Device Solutions using Beacons and Bluetooth LE Devices - http://www.embarcadero.com/iot-in-action/building-a-modern-healthcare-application?cid=701G0000000WLhl


Comments
-
Please login first in order for you to submit comments