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:
IntEnumDefines 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:
objectRepresents 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:
objectAbstract 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:
objectAbstract class that represents a BLE Service (both remote and local)
- class blatann.gatt.GattDatabase(ble_device, peer)
Bases:
objectAbstract 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
GattcCharacteristicGattcCharacteristic.declaration_attributeGattcCharacteristic.value_attributeGattcCharacteristic.valueGattcCharacteristic.readableGattcCharacteristic.writableGattcCharacteristic.writable_without_responseGattcCharacteristic.subscribableGattcCharacteristic.subscribable_indicationsGattcCharacteristic.subscribable_notificationsGattcCharacteristic.subscribedGattcCharacteristic.attributesGattcCharacteristic.string_encodingGattcCharacteristic.on_read_completeGattcCharacteristic.on_write_completeGattcCharacteristic.on_notification_receivedGattcCharacteristic.notification_queue_async()GattcCharacteristic.notification_queue()GattcCharacteristic.subscribe()GattcCharacteristic.unsubscribe()GattcCharacteristic.read()GattcCharacteristic.write()GattcCharacteristic.write_without_response()GattcCharacteristic.find_descriptor()
GattcServiceGattcDatabase
- blatann.gatt.gattc_attribute module
- blatann.gatt.gatts module
GattsUserDescriptionPropertiesGattsCharacteristicPropertiesGattsCharacteristicGattsCharacteristic.set_value()GattsCharacteristic.notify()GattsCharacteristic.add_descriptor()GattsCharacteristic.add_constant_value_descriptor()GattsCharacteristic.max_lengthGattsCharacteristic.notifiableGattsCharacteristic.valueGattsCharacteristic.client_subscribedGattsCharacteristic.attributesGattsCharacteristic.user_descriptionGattsCharacteristic.sccdGattsCharacteristic.presentation_formatGattsCharacteristic.string_encodingGattsCharacteristic.on_writeGattsCharacteristic.on_readGattsCharacteristic.on_subscription_changeGattsCharacteristic.on_notify_completeGattsCharacteristic.write_queue_async()GattsCharacteristic.write_queue()
GattsServiceGattsDatabase
- blatann.gatt.gatts_attribute module
- blatann.gatt.managers module
- blatann.gatt.reader module
- blatann.gatt.service_discovery module
- blatann.gatt.writer module