Service – BLE GATT Service

Stores information about a BLE service and its characteristics.

class _bleio.Service(uuid, *, secondary=False)

Create a new Service identified by the specified UUID. It can be accessed by all connections. This is known as a Service server. Client Service objects are created via Connection.discover_remote_services.

To mark the Service as secondary, pass True as secondary.

Parameters:
  • uuid (UUID) – The uuid of the service
  • secondary (bool) – If the service is a secondary one
Returns:

the new Service

characteristics

A tuple of Characteristic designating the characteristics that are offered by this service. (read-only)

remote

True if this is a service provided by a remote device. (read-only)

secondary

True if this is a secondary service. (read-only)

uuid

The UUID of this service. (read-only)

Will be None if the 128-bit UUID for this service is not known.