connect

abstract fun connect(autoConnect: Boolean, preferredPhy: List<Phy> = listOf(Phy.PHY_LE_1M))

Makes a connection to the peripheral.

Parameters

autoConnect

True to use auto connect feature, false to use direct connection.

preferredPhy

The preferred PHYs for connection.

Throws

If BLUETOOTH_CONNECT permission is denied.