The project demonstrates the BLE workflow procedures like advertising, connecting, notifying Heart Rate data, etc. The project is designed so there is no need to initiate any of mentioned actions manually – it automatically starts the BLE Stack. Once the BLE Stack is active, the device automatically starts advertising. After this the central can begin scanning and initiate the connection procedure and discover the GATT database. The HRM peripheral has a Heart Rate Service (HRS) and a Device Information Service (DIS). Initiate the pairing procedure as HRS requires authentication. Once pairing is complete, register for notifications and the HRS notifications should start coming in. There is a notification timer that is started once notifications are enabled. The timer value can be modified in firmware. The heart rate values are randomly generated in this example.
The Heart Rate Sensor can either be used with the CySmart Mobile App or the CySmart PC application. The simple example how to use CySmart Windows application as Heart Rate Service client is as follows,
Connect the CySmart BLE dongle to a USB port on the PC.
Launch CySmart app and select connected dongle in the dialog window.
Program the development kit with the HRM application.
Click Start Scan button to discover available devices.
Select Heart Rate Sensor in the list of available devices and connect to it.
Click Pair, then Discover All Attributes, and Enable All Notifications in CySmart app.
Observe the Heart Rate Measurement characteristic notifications with simulated data:
You can also view the project debug prints from the UART COM port as shown below.
The details about the Heart Rate Service characteristic data structures are in the HRS Specification.
The same output can also be achieved using the CySmart Mobile App which can be used as the central device.
Table1 lists all relevant application notes, code examples, knowledge base articles, device datasheets, and Component / user module datasheets.
Table 1: Related Documents
AN218191 - WICED™ Quick Start Guide for BT CYW20706
The Quick Start Guide can be accessed from Project Explorer -> 20706-A2_Bluetooth -> Doc
AN216535 - CYW92070xV3_EVAL Evaluation Board Hardware User Manual
The Hardware User Manual can be accessed from Project Explorer -> 20706-A2_Bluetooth -> Doc