You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
W java.lang.IllegalStateException: This mutex is not locked
W at kotlinx.coroutines.sync.MutexImpl.unlock(Mutex.kt:213)
W at kotlinx.coroutines.sync.Mutex$DefaultImpls.unlock$default(Mutex.kt:98)
W at no.nordicsemi.android.kotlin.ble.core.mutex.MutexWrapper.unlock(MutexWrapper.kt:57)
W at no.nordicsemi.android.kotlin.ble.client.api.ClientMutexHandleCallback.tryEmit(ClientMutexHandleCallback.kt:32)
W at no.nordicsemi.android.kotlin.ble.client.real.ClientBleGattCallback.onServicesDiscovered(ClientBleGattCallback.kt:70)
W at android.bluetooth.BluetoothGatt$1$5.run(BluetoothGatt.java:347)
W at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:823)
W at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:47)
W at android.bluetooth.BluetoothGatt$1.onSearchComplete(BluetoothGatt.java:342)
W at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:241)
W at android.os.Binder.execTransactInternal(Binder.java:1187)
W at android.os.Binder.execTransact(Binder.java:1146)
Code
viewModelScope.launch {
val connectDevice = bleRepository.connectDevice(
device = it,
scope = viewModelScope,
options = BleGattConnectOptions(autoConnect = true, closeOnDisconnect = false)
)
val services = connectDevice.discoverServices()
val commissioningService =
services.findService(TubeSpecifications.UUID_SERVICE_DEVICE)
val identifyCharacteristic =
commissioningService?.findCharacteristic(TubeSpecifications.UUID_IDENTIFY_CHAR)
identifyCharacteristic?.write(DataByteArray.from(0x03,0x00))
}
The text was updated successfully, but these errors were encountered:
ledvance-jason
changed the title
[Client]IllegalStateException in discoverServices after connect device successfully
[Client]IllegalStateException in discoverServices method after connect device successfully
Nov 29, 2023
Exception
Code
The text was updated successfully, but these errors were encountered: