Characteristic – BLE service characteristic

Stores information about a BLE service characteristic and allows reading and writing of the characteristic’s value.

class bleio.Characteristic(uuid, *, broadcast=False, indicate=False, notify=False, read=False, write=False, write_no_response=False)

Create a new Characteristic object identified by the specified UUID.

Parameters:
  • uuid (bleio.UUID) – The uuid of the characteristic
  • broadcast (bool) – Allowed in advertising packets
  • indicate (bool) – Server will indicate to the client when the value is set and wait for a response
  • notify (bool) – Server will notify the client when the value is set
  • read (bool) – Clients may read this characteristic
  • write (bool) – Clients may write this characteristic; a response will be sent back
  • write_no_response (bool) – Clients may write this characteristic; no response will be sent back
broadcast

A bool specifying if the characteristic allows broadcasting its value. (read-only)

indicate

A bool specifying if the characteristic allows indicating its value. (read-only)

notify

A bool specifying if the characteristic allows notifying its value. (read-only)

read

A bool specifying if the characteristic allows reading its value. (read-only)

write

A bool specifying if the characteristic allows writing to its value. (read-only)

write_no_response

A bool specifying if the characteristic allows writing to its value without response. (read-only)

uuid

The UUID of this characteristic. (read-only)

value

The value of this characteristic. The value can be written to if the write property allows it. If the read property allows it, the value can be read. If the notify property is set, writing to the value will generate a BLE notification.