bluez_peripheral.gatt.descriptor module

class bluez_peripheral.gatt.descriptor.DescriptorFlags(value)[source]

Bases: Flag

Flags to use when specifying the read/ write routines that can be used when accessing the descriptor. These are converted to bluez flags.

AUTHORIZE = 256
ENCRYPT_AUTHENTICATED_READ = 16
ENCRYPT_AUTHENTICATED_WRITE = 32
ENCRYPT_READ = 4
ENCRYPT_WRITE = 8
INVALID = 0
READ = 1

Descriptor may be read.

SECURE_READ = 64
SECURE_WRITE = 128
WRITE = 2

Descriptor may be written to.

class bluez_peripheral.gatt.descriptor.DescriptorReadOptions(options)[source]

Bases: object

Options supplied to descriptor read functions. Generally you can ignore these unless you have a long descriptor (eg > 48 bytes) or you have some specific authorization requirements.

Parameters:

options (Dict[str, Variant])

property device: str

The path of the remote device on the system dbus or None.

The link type.

property offset: int

A byte offset to use when writing to this descriptor.

class bluez_peripheral.gatt.descriptor.DescriptorWriteOptions(options)[source]

Bases: object

Options supplied to descriptor write functions. Generally you can ignore these unless you have a long descriptor (eg > 48 bytes) or you have some specific authorization requirements.

Parameters:

options (Dict[str, Variant])

property device: str

The path of the remote device on the system dbus or None.

The link type.

property offset: int

A byte offset to use when writing to this descriptor.

property prepare_authorize: bool

True if prepare authorization request. False otherwise.

class bluez_peripheral.gatt.descriptor.descriptor(uuid, characteristic, flags=<DescriptorFlags.READ: 1>)[source]

Bases: ServiceAttribute[DescriptorReadOptions, DescriptorWriteOptions], HierarchicalServiceInterface

Create a new descriptor with a specified UUID and flags associated with the specified parent characteristic. Represents an org.bluez.GattDescriptor1 instance.

Parameters: