registerDevice

open suspend override fun registerDevice(registerDeviceData: RegisterDeviceData)

Registers the device with the given registration data.

This function uses the lockConnectionWrapper to register the device. It sends the registration data and handles the response by observing the registration notification.

The steps involved are:

  1. Register the device using lockConnectionWrapper?.registerDevice(registerDeviceData).

  2. Observe the registration notification to confirm the result.

The function uses the following Bluetooth constants:

  • BluetoothConstants.DEVICE_REGISTER: The command code used to initiate the device registration process.

  • BluetoothConstants.NOTIFICATION_REGISTER: The notification code used to observe the registration result.

Parameters

registerDeviceData

The data required to register the device, encapsulated in a RegisterDeviceData object.

Throws

if an error occurs during the process.