LBLEService

Represents a BLE service. This class represents a BLE service in a peripheral device.

This object must be alive across entire BLE framework life cycle. Therefore, you need to allocate it in global scope, and then add characteristics by calling addAttribute().

Constructor

LBLEService ()

Create a GATT service entry.

Syntax

Parameters

UUID: UUID of the service you want to create

Returns

LBLEService instance.

Methods

addAttribute()

Add a characteristic to this service.

Syntax

Parameters

characteristic: The characteristic you want to insert into this service. Note that the characteristic is simply referenced; therefore it must not be destroyed before the service object.

Returns

none

Last updated