This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 配对超时时间设置

Other Parts Discussed in Thread: CC2541

为了考虑安全性,我们考虑BLE建立连接之初,蓝牙端要求手机端即刻输入配对密码。

目前调试:

1. Characteristic Value属性配置了GATT_PERMIT_AUTHEN_READ | GATT_PERMIT_AUTHEN_WRITE;

2. 配对参数配置了GAPBOND_PAIRING_MODE_INITIATE;

现在测试建立BLE连接,手机端会马上收到配对请求,功能正常。

请问这个配对的超时时间,CC2541中在哪儿设置?  目前自测绑定失败的超时时间约30秒。

  • 您可以下载 BLE Spec 4.2 看看,其中 Vol 3, Part H, Section 3.4有相关说明
    If the Security Manager Timer reaches 30 seconds, the procedure shall be considered to have failed, and the local higher layer shall be notified. No further SMP commands shall be sent over the L2CAP Security Manager Channel.
  • Hi Susan
    那我考虑方案:蓝牙模块建立BLE连接后,立即启动定时器,如果再2秒之内,没有配对成功,就主动断开BLE连接。
    这里“判断蓝牙模块是否配对成功”,应该使用什么接口呢?