bluez_peripheral.gatt.descriptor module¶
- class bluez_peripheral.gatt.descriptor.DescriptorFlags(value)[source]¶
Bases:
FlagFlags 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:
objectOptions 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.
- class bluez_peripheral.gatt.descriptor.DescriptorWriteOptions(options)[source]¶
Bases:
objectOptions 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.
- class bluez_peripheral.gatt.descriptor.descriptor(uuid, characteristic, flags=<DescriptorFlags.READ: 1>)[source]¶
Bases:
ServiceAttribute[DescriptorReadOptions,DescriptorWriteOptions],HierarchicalServiceInterfaceCreate a new descriptor with a specified UUID and flags associated with the specified parent characteristic. Represents an org.bluez.GattDescriptor1 instance.
- Parameters:
uuid (str | bytes | UUID | UUID16 | int) – The UUID of this GATT descriptor. A list of standard ids is provided by the Bluetooth SIG Assigned Numbers
characteristic (characteristic) – The parent characteristic to associate this descriptor with.
flags (DescriptorFlags) – Flags defining the possible read/ write behavior of the attribute.
See also