Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Bluetooth LE support in RAD Studio XE7

RAD Studio XE7’s integrated wireless support (Bluetooth and Wifi) works with thousands of consumer and industry specific devices. RAD Studio’s approach makes it easy to integrate virtually any device into the app user experience, and even support multiple device vendors with the same code.

In RAD Studio XE7, we have a new Bluetooth LE component for connecting to many different Bluetooth Smart Devices that work with the different GATT profiles.

We ship several Bluetooth demos with the product that you can look at. For Bluetooth LE, we have a heartrate monitor demo that displays your current heart rate by connecting to a heart rate sensor.
You can find the demo under: C:UsersPublicDocumentsEmbarcaderoStudio15.0SamplesObject PascalMobile SamplesDevice Sensors and ServicesBluetoothHeartRateMonitor

I am using the Zephyr heartrate monitor for this, but have also used Polar’s H7 heartrate monitor.

I extended the demo slightly by adding a Listbox for logging the heartrate. Also, for the iPhone version, I customized my iPhone view using the new FireUI Multi-Device Designer to display a + icon instead of the ‘Save’ text for logging my heart rate since I am working with less screen real estate.

 

   

Below are the necessary UUIDs we need to connect to our heart rate sensor:

[crayon-672a8d6de47e9106710928/]
[crayon-672a8d6de47f1583307352/]

 

Here is the btnScanClick code:

[crayon-672a8d6de47f3264315999/]

We also set up several additional events:

[crayon-672a8d6de47f5503558534/]

 

 Here is a video of our Bluetooth LE support in action: 

{“video”:”https://www.youtube.com/watch?v=oeyGzuC_QqU”,”width”:”480″,”height”:”360″} 

 

 

Exit mobile version