User guide

Silicon Labs Page of 19 21
The second example below shows how to implement the service.Heart Rate (HRS)
GAP Service
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<service uuid="180d" advertise="true">
<characteristic uuid="2a37" id="xgatt_hrs_2a37">
<properties notify="true" />
<value length="2" />
</characteristic>
</service>
</configuration>
HR service has 16-bit UUID 180d. In this example the service UUID is included in the advertisement
packet payload, so a remote device can recognize the service simply by receiving an advertisement
packet.
The HR service implements only the single mandatory characteristic with UUID called 2a37
Heart Rate
.
Measurement
The HR measurement characteristic has of , so a for example a BGScript id xgatt_hrs_2a37
application can update its value when a new HR measurement is made by referring to the
constant called having the value of the characteristic handle.xgatt_hrs_2a37
The HR measurement value is not marked as const so the value needs to be initialized/changed
by the application.
The HR measurement characteristic has property as defined by the standard. When the HR notify
measurement value changes, it will be automatically sent to the remote device, if the latter has
registered to listen to the notifications.
The HR measurement characteristic length is 2 bytes (fixed).