highSpeed
Configures the device for high speed connection.
Sets ATT MTU to 498 bytes and L2CAP MTU to 251 bytes and enables PHY LE 2M together with fast connection parameters.
connectable or connected method must be called in addition to this one, for example:
val mock = PeripheralSpec.simulatePeripheral("01:02:03:04:05:06") {
connectable(
name = "High Speed Device",
eventHandler = myEventHandler,
services = {
// Define services here
}
)
highSpeed()
}Parameters
The min and max connection interval, in 1.25 ms units. Valid range is from 6 (7.5ms) to 3200 (4000ms). Default is 15-30 (15-30 ms).
Slave latency. Valid range is from 0 to 499. Default is 0.
Supervision timeout in 10 ms units. Valid range is from 10 (0.1s) to 3200 (32s). Default is 100 (1 s).
The maximum supported ATT MTU (Maximum Transfer Unit). This value must be in range 23..517. Default is 498, which allows to fit 2 full L2CAP packets of 251 bytes each into a single ATT packet.
The maximum supported L2CAP MTU (Maximum Transfer Unit used on L2CAP Layer using Data Length Extension (DLE)). This value must be in range 27..251. Default is 251.
Whether the device supports PHY LE 2M, default is true.