Amanda
02/24/2026, 12:38 PMom.juul.kable.GattStatusException: OnMtuChanged(mtu=23, status=GATT_ERROR(133))travis
03/05/2026, 6:43 PMonServicesDiscovered is called after a connection is established.
Unless Android is misreporting statuses (via the callback). This is unlikely though.
Events in the callback are logged though, so if you provide logs, then it would help to diagnose your issue.Amanda
03/06/2026, 7:50 AMcom.juul.kable.GattStatusException: OnMtuChanged(mtu=23, status=GATT_ERROR(133))
at com.juul.kable.ConnectionKt.checkResponse(Connection.kt:276)
at com.juul.kable.ConnectionKt.access$checkResponse(Connection.kt:1)
at com.juul.kable.Connection.requestMtu(Connection.kt:210)
at com.juul.kable.Connection$requestMtu$1.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:829)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
2026-02-24 09:55:46.245 10915-10943 E Could not connect, status exception
com.juul.kable.GattStatusException: OnMtuChanged(mtu=23, status=GATT_ERROR(133))
at com.juul.kable.ConnectionKt.checkResponse(Connection.kt:276)
at com.juul.kable.ConnectionKt.access$checkResponse(Connection.kt:1)
at com.juul.kable.Connection.requestMtu(Connection.kt:210)
at com.juul.kable.Connection$requestMtu$1.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:829)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)Amanda
03/06/2026, 7:51 AMprivate const val GATT_MAX_MTU_SIZE = 517
internal actual suspend fun connectWithAdvertisement(
advertisement: Advertisement,
autoConnect: Boolean,
): Peripheral {
return Peripheral(advertisement) {
logging {
engine = SystemLogEngine
level = Logging.Level.Warnings
format = Logging.Format.Multiline
}
autoConnectIf { autoConnect }
onServicesDiscovered {
requestMtu(GATT_MAX_MTU_SIZE)
}
phy = Phy.Le2M
observationExceptionHandler { exception ->
Logger.e(exception) { "error while connecting" }
}
}
}