connect

open suspend fun connect(reconnectionSettings: ConnectionSettings.ReconnectionSettings? = null): Boolean

Attempts to connect to the device. Cancelling this call tears down any in-flight connection attempt (CoreBluetooth has no connection timeout, so wrap this in e.g. withTimeoutOrNull to bound it).

Return

true if connection was successful.

Parameters

reconnectionSettings

the ConnectionSettings.ReconnectionSettings to use when reconnecting if the device disconnects unexpectedly