blatann.gatt package¶
- blatann.gatt.logger = <Logger blatann.gatt (INFO)>¶
The default MTU size that’s used when a connection is established
- blatann.gatt.MTU_SIZE_DEFAULT = 23¶
The minimum allowed MTU size
- blatann.gatt.MTU_SIZE_MINIMUM = 23¶
The ideal MTU size to use when using the maximum link-layer Data Length Extension setting (251)
- blatann.gatt.DLE_OVERHEAD = 4¶
Status codes that can be returned during GATT Operations (reads, writes, etc.)
- blatann.gatt.GattStatusCode¶
The two notification types (notification, indication) used when a characteristic is notified from a peripheral
- class blatann.gatt.SubscriptionState(value)¶
Bases:
IntEnum
Defines the different subscription states/types for a characteristic
- NOT_SUBSCRIBED = 0¶
- NOTIFY = 1¶
- INDICATION = 2¶
- classmethod to_buffer(value)¶
Converts to a little-endian uint16 buffer to be written over BLE
- classmethod from_buffer(buf)¶
Converts from a little-endian uint16 buffer received over BLE to the subscription state
- class blatann.gatt.CharacteristicProperties(read=True, write=False, notify=False, indicate=False, broadcast=False, write_no_response=False, signed_write=False)¶
Bases:
object
- class blatann.gatt.Attribute(uuid, handle, value=b'', string_encoding='utf8')¶
Bases:
object
Represents a single attribute which lives inside a Characteristic (both remote and local)
- class blatann.gatt.Characteristic(ble_device, peer, uuid, properties, attributes=None, default_string_encoding='utf8')¶
Bases:
object
Abstract class that represents a BLE characteristic (both remote and local).
- class blatann.gatt.Service(ble_device, peer, uuid, service_type, start_handle=0, end_handle=0)¶
Bases:
object
Abstract class that represents a BLE Service (both remote and local)
- class blatann.gatt.GattDatabase(ble_device, peer)¶
Bases:
object
Abstract class that represents a BLE Database (both remote and local)
- class blatann.gatt.PresentationFormat(fmt, exponent, unit, namespace=0, description=0)¶
Bases:
BleCompoundDataType
- data_stream_types = [<class 'blatann.services.ble_data_types.Uint8'>, <class 'blatann.services.ble_data_types.Int8'>, <class 'blatann.services.ble_data_types.Uint16'>, <class 'blatann.services.ble_data_types.Uint8'>, <class 'blatann.services.ble_data_types.Uint16'>]¶
- encode()¶
- Return type
- static try_get_enum(value, enum_type)¶
Submodules¶
- blatann.gatt.gattc module
GattcCharacteristic
GattcCharacteristic.declaration_attribute
GattcCharacteristic.value_attribute
GattcCharacteristic.value
GattcCharacteristic.readable
GattcCharacteristic.writable
GattcCharacteristic.writable_without_response
GattcCharacteristic.subscribable
GattcCharacteristic.subscribable_indications
GattcCharacteristic.subscribable_notifications
GattcCharacteristic.subscribed
GattcCharacteristic.attributes
GattcCharacteristic.string_encoding
GattcCharacteristic.on_read_complete
GattcCharacteristic.on_write_complete
GattcCharacteristic.on_notification_received
GattcCharacteristic.subscribe()
GattcCharacteristic.unsubscribe()
GattcCharacteristic.read()
GattcCharacteristic.write()
GattcCharacteristic.write_without_response()
GattcCharacteristic.find_descriptor()
GattcService
GattcDatabase
- blatann.gatt.gattc_attribute module
- blatann.gatt.gatts module
GattsUserDescriptionProperties
GattsCharacteristicProperties
GattsCharacteristic
GattsCharacteristic.set_value()
GattsCharacteristic.notify()
GattsCharacteristic.add_descriptor()
GattsCharacteristic.add_constant_value_descriptor()
GattsCharacteristic.max_length
GattsCharacteristic.notifiable
GattsCharacteristic.value
GattsCharacteristic.client_subscribed
GattsCharacteristic.attributes
GattsCharacteristic.user_description
GattsCharacteristic.sccd
GattsCharacteristic.presentation_format
GattsCharacteristic.string_encoding
GattsCharacteristic.on_write
GattsCharacteristic.on_read
GattsCharacteristic.on_subscription_change
GattsCharacteristic.on_notify_complete
GattsService
GattsDatabase
- blatann.gatt.gatts_attribute module
- blatann.gatt.managers module
- blatann.gatt.reader module
- blatann.gatt.service_discovery module
- blatann.gatt.writer module