sensorConnection

fun sensorConnection(deviceID: DeviceID, bluetoothMacAddress: BluetoothMacAddress, resetCode: Int = -1, encryptionKey: String = ""): SensorConnection

Creates and configures a SensorConnection instance for a non-legacy Efento sensor. This method prepares the parameters required for establishing a connection, but does not initiate the connection itself. Use this for sensors where the Sensor.isLegacy flag is false.

Return

SensorConnection implementation used connect, disconnect and run commands on Efento device.

Parameters

deviceID

unique identifier of device returned in scanning.

bluetoothMacAddress

device bluetooth mac address.

resetCode

device reset code is required for running some commands . Can be found on a device's sticker. Can be updated via SensorConnection.resetCode

encryptionKey

encryption key which is used to exchange data with encrypted sensor. Can be updated via SensorConnection.encryptionKey