blatann.gap.generic_access_service module
- class blatann.gap.generic_access_service.GenericAccessService(ble_driver, device_name='nRF5x', appearance=Appearance.unknown)
Bases:
objectClass which represents the Generic Access service within the local database
- DEVICE_NAME_MAX_LENGTH = 31
- property device_name: str
The device name that is configured in the Generic Access service of the local GATT database
- Getter:
Gets the current device name
- Setter:
Sets the current device name. Length (after utf8 encoding) must be <= 31 bytes
- property appearance: Appearance
The Appearance that is configured in the Generic Access service of the local GATT database
- Getter:
Gets the device appearance
- Setter:
Sets the device appearance
- property preferred_peripheral_connection_params: ConnectionParameters | None
The preferred peripheral connection parameters that are configured in the Generic Access service of the local GATT Database. If not configured, returns None.
- Getter:
Gets the configured connection parameters or None if not configured
- Setter:
Sets the configured connection parameters
- update()
Not to be called by users
Used internally to configure the generic access in the case that values were set before the driver was opened and configured.