scanner

fun scanner(allowedDevices: Set<BluetoothMacAddress> = emptySet(), legacyDevices: Set<BluetoothMacAddress> = emptySet(), encryptionKeys: Map<BluetoothMacAddress, String> = emptyMap(), defaultEncryptionKeys: Set<String> = emptySet(), updateInterval: Duration = 30.seconds): Scanner

Creates and configures a Scanner instance for Efento devices.

Return

Scanner implementation used control scanning for Efento devices.

Parameters

allowedDevices

list of device's mac addresses. Only devices with provided mac addresses will be returned.

legacyDevices

list of device's mac addresses. Provide mac adresses for sensors older than v6 (used only on platforms that hide mac addresses - e.g. iOS)

encryptionKeys

map of device mac address : encryption key pairs. Use encryption keys to decrypt specific device's data sent in advertisement.

defaultEncryptionKeys

list of default encryption keys. Use default encryption keys (max 5) to decrypt device's data in case of device's key being incorrect or not provided.

updateInterval

used to configure scanning data caching mechanism. By default devices are cached and returned only when their data has changed. Use update interval to periodically return device even if its not changed.