connectable

fun connectable(name: String, connectionInterval: Duration = 45.milliseconds, maxMtu: Int = 23, isPhyLe2MSupported: Boolean = false, isPhyCodedSupported: Boolean = false, eventHandler: PeripheralSpecEventHandler, services: ServerScope.() -> Unit): PeripheralSpec.Builder<ID>

Makes the device connectable, but not connected at the moment of initialization.

Parameters

name

The name of the peripheral, available from Device Name characteristic.

connectionInterval

The connection interval when connected.

maxMtu

The maximum supported MTU size.

isPhyLe2MSupported

Whether the device supports PHY LE 2M.

isPhyCodedSupported

Whether the device supports PHY LE Coded.

eventHandler

The event handler that will be called for every event emulating a real peripheral.

services

The services available after service discovery.