User guide
Silicon Labs Page of 20 21
The third example below shows how to implement a vendor specific service and characteristic:
GAP Service
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<service uuid="0bd51666-e7cb-469b-8e4d-2742f1ba77cc" advertise="true">
<description>Cable replacement service</description>
<characteristic uuid="e7add780-b042-4876-aae1-112855353cc1" id="xgatt_data">
<description>Data</description>
<properties write="true" indicate="true" />
<value variable_length="true" length="20" type="user" />
</characteristic>
</service>
</configuration>
The custom service has 128-bit UUID 0bd51666-e7cb-469b-8e4d-2742f1ba77cc. In this example the
service UUID is included in the advertisement packet payload.
The service implements a single characteristic with UUID e7add780-b042-4876-aae1-112855353cc1.
The characteristic has of , so for example a BGScript application can update the id xgatt_data
value when needed by referring to the constant called having the value of the xgatt_data
characteristic handle.
The characteristic is not marked as const so the value needs to be initialized/changed by the
application.
The characteristic has ad properties so it can be written by a remote device or write indicate
indicated to a remote device when the value changes.
The characteristic length is variable from 0 bytes up to the maximum value of 20 bytes.
Characteristic has also type so the actual data is queried from the user application. See for user
example the to see how this feature is used.
BLE Cable Replacement Application Note