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.

[参考译文] CC2540:如何知道 Characteristic 的句柄值?

Guru**** 2553450 points
Other Parts Discussed in Thread: CC2540, CC2640, CC2650

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/573777/cc2540-how-do-i-know-the-handle-value-of-characteristic

器件型号:CC2540
Thread 中讨论的其他器件: CC2640CC2650

你好。

正在研究 CC2540。

我目前正在学习中央设备。

源代码使用 TI 提供的 simpleBLECentral 源。 (堆栈版本为1.4.2.2)

我正在尝试写入、但我想知道如何知道特征的句柄值。

我已确认 TI CC254x 低功耗蓝牙软件开发人员指南第17页中有一个 SimpleBLEPeripheral 完整属性表。

但是、如果从设备中的服务注册不同、则会创建不同的表。

例如,在 simpleBLEPeripheral.c 文件中注册服务时,仅注册 SimpleProfile_AddService (),其余部分除外,

特性0xFFF1的句柄值被确认为0x0003。

//初始化 GATT 属性
// GGS_AddService (GATT_All_services);// GAP
// GATTServApp_AddService (GATT_All_services);// GATT 属性
// DevInfo_AddService();//设备信息服务
SimpleProfile_AddService (GATT_All_services);//简单 GATT 配置文件

 

我想知道、如果我不像上述源代码那样注册服务、会发生什么情况。

simpleBLECentral.c 文件中的 simpleBLECharHdl 变量值会反映在 simpleBLEGATTDiscoveryEvent ()函数中?

但是、我不知道为什么初始化最终值以处理特征0xFFF1的值。

帮助。 请..T_T