gpt4 book ai didi

android - BT 配对请求默认超时?

转载 作者:行者123 更新时间:2023-12-04 08:17:55 25 4
gpt4 key购买 nike

如果蓝牙配对请求不被接受或取消,我必须为它设置一个超时时间!!

It's mentioned that i have to use the timeout defined by Bluetooth standard   
I am searching for that in the internet but I found nothing
I found this [https://stackoverflow.com/questions/26674532/is-it-possible-to-change-the-timeout-of-bluetooth-pairing-request-with-corebluet1] and it's mentioned that pairing request timeout is not changeable ,
有什么帮助吗?

最佳答案

超时应为 30 秒,并在安全管理器规范(蓝牙核心规范,版本 5.2,第 3 卷,第 H 部分,第 3.4 节 SMP 超时)中定义:-

To protect the Security Manager protocol from stalling, a SecurityManager Timer is used. Upon transmission of the Security Requestcommand or reception of the Security Request command, the SecurityManager Timer shall be reset and restarted. Upon transmission of thePairing Request command or reception of the Pairing Request command,the Security Manager Timer shall be reset and started.

The Security Manager Timer shall be reset when an L2CAP SMP command isqueued for transmission.

When a Pairing process completes, the Security Manager Timer shall bestopped.

If the Security Manager Timer reaches 30 seconds, the procedure shallbe considered to have failed, and the local higher layer shall benotified. No further SMP commands shall be sent over the L2CAPSecurity Manager Channel. A new Pairing process shall only beperformed when a new physical link has been established.


这通常是在堆栈/API 中硬编码的,所以也许这不是您必须在应用程序中设置的内容。

关于android - BT 配对请求默认超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65631191/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com