Service

Service

Class that represents a GATT service.

Constructor

new Service(deviceInstanceId, uuid, type)

Create a service in the Bluetooth `Device's` GATT attribute table.
Source:
Parameters:
Name Type Description
deviceInstanceId string The unique ID of the Bluetooth device to add `Service` to.
uuid string A 128-bit or 16-bit unique identifier for this service.
type string The server service type. 'primary' or `secondary`.

Members

deviceInstanceId

Get the Id of the Bluetooth device that this service belongs to. 'local.server': local/adapter, non-'local.server': remote peripheral.
Source:

instanceId

Get the instanceId of this service (since uuid is not enough to differentiate services).
Source:

type

Method that sets the `type` of this service.
Source:

type

Get the type of this service. 'primary' or `secondary`.
Source: