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.

[参考译文] CC2340R5:无需任何安全连接即可连接 iPhone

Guru**** 2595805 points
Other Parts Discussed in Thread: CC2340R5

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1345301/cc2340r5-connect-iphone-without-any-secure-connection

器件型号:CC2340R5

您好!

   我将 CC2340R5 based_ble 外设 代码与 ANCS 结合使用。

此处显示了 外设和绑定设置中特性的 GATT 权限

 

static gattAttribute_t simpleGattProfile_attrTbl[] =
{
 /*------------------type-----------------*/ /*-----------permissions-----------*/ /*-----------------pValue----------------*/
   // Simple Profile Service
   GATT_BT_ATT( primaryServiceUUID,           GATT_PERMIT_READ,                      (uint8 *) &simpleGattProfile_Service ),

   //**********************************************************************************************************************************

   // Characteristic 1 Declaration
   GATT_BT_ATT( characterUUID,                GATT_PERMIT_READ,                      &simpleGattProfile_Char1Props ),
   // Characteristic Value 1
   GATT_ATT( simpleGattProfile_char1UUID,  /*GATT_PERMIT_READ |*/ GATT_PERMIT_WRITE,  &simpleGattProfile_Char1 ),
   // Characteristic 1 User Description
//   GATT_BT_ATT( charUserDescUUID,             GATT_PERMIT_READ | GATT_PERMIT_WRITE,                      simpleGattProfile_Char1UserDesp ),
   //**********************************************************************************************************************************

   GATT_BT_ATT( characterUUID,                GATT_PERMIT_READ,                      &simpleGattProfile_Char4Props ),
     // Characteristic Value 4
     GATT_ATT( simpleGattProfile_char4UUID,  /*GATT_PERMIT_READ|*/GATT_PERMIT_WRITE,                     &simpleGattProfile_Char4 ),
     // Characteristic 4 configuration
     GATT_BT_ATT( clientCharCfgUUID,            GATT_PERMIT_READ | GATT_PERMIT_WRITE,  (uint8 *) &simpleGattProfile_Char4Config ),


  //**********************************************************************************************************************************

使用 Android、无需密钥、我可以使用外设进行连接。 当尝试连接移动设备时、 需要在 iPhone 上提供密钥。 但 我需要  在没有任何安全连接的情况下连接 iPhone。

此处是 来自 TI GitHub 的 ANCS 源代码链接

https://github.com/TexasInstruments/ble_examples/blob/simplelink_cc2640r2_sdk-2.20/examples/rtos/CC2640R2_LAUNCHXL/bleapps/ancs/src app/ancs.c#L116

需要了解在没有任何 安全连接的情况下连接 iPhone 需要进行哪些更改。

SDK 版本: simplelink_lowpower_f3_sdk_7_40_00_64 (外设)

CCS 版本:CCS 12.5.0

谢谢。

Vignesh。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Vignesh:

    恐怕您共享的代码仅包含解密 ANCS 数据包的逻辑、它不涉及配对或连接。

    为了进一步了解此主题、我建议检查 iPhone 或 CC2340是否发出了配对请求。 然后、我们就可以了解必须采取哪些措施来避免这种情况。 您能否提供此类 BLE 监听器日志?

    此致、

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Clement、

       这里是  iPhone 和 Android 的 BLE 监听器日志。 配置的外围设备没有安全连接。

    iPhone 启动配对请求的位置。

    是否有任何可能的方法连接 iPhone 而无需密钥或外设弹出窗口。

    e2e.ti.com/.../6332.log.rar

    谢谢。

    Vignesh。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Vignesh

    感谢您提供日志。

    根据我们的分析:

    CC2340尝试通过句柄0x2C 向 iPhone 发送写请求
    2.然后电话以"身份验证不足"响应
    3.因此 CC2340向手机发送安全请求
    4. iPhone 最终会发送配对请求

    为了继续操作、您能否帮助在代码中找到前面提到的 GATT 写入操作? 然后、除非设备已经配对、否则应确保不发送此操作。

    我希望这将有所帮助、

    此致、