We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes it works, and sometimes I get a timeout/error. Is there a trick to setting it? Is there a maximum value? Thank you, Mike
The text was updated successfully, but these errors were encountered:
private suspend fun initBleMTU(bleDevice: BleDevice): Boolean { val MAX_MTU = 180 return withContext(Dispatchers.IO) { suspendCoroutine { continuation -> BleManager.getInstance() .setMtu(bleDevice, MAX_MTU, object : BleMtuChangedCallback() { override fun onSetMTUFailure(exception: BleException) { // 设置 MTU 失败 Logger.e("$TAG 设置MTU失败==${exception.description}") if (isActive) { continuation.resume(false) // 返回 false 表示初始化失败 } } override fun onMtuChanged(mtu: Int) { // 设置 MTU 成功 Logger.d("$TAG 设置MTU成功==${mtu}") if (isActive) { continuation.resume(true) // 返回 true 表示初始化成功 } } }) } } },
mtu between 23 and 512
Sorry, something went wrong.
No branches or pull requests
Sometimes it works, and sometimes I get a timeout/error.
Is there a trick to setting it?
Is there a maximum value?
Thank you,
Mike
The text was updated successfully, but these errors were encountered: