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.

[参考译文] LAUNCHXL-CC2650:无法在 SimpleLink Academy ProjectZero 中实现 GATT_PROP_NOTIY

Guru**** 2553450 points


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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/574728/launchxl-cc2650-unable-to-implement-gatt_prop_notify-in-simplelink-academy-projectzero

器件型号:LAUNCHXL-CC2650

我正在尝试将所有 ProjectZero 特性设置为 GATT_PROP_NOTIFY、以便将我的 IOS 应用设置为仅在 IOS CoreBluetooth 函数的特性值发生更改时才起作用 UpdateValueForCharacteristic。

我认为我应该将 GATT_PROP_NOTIFY 添加到 ProjectZero 的 LED_SERVICE.c 中的相应服务特征声明中、如下所示:

/*********
*配置文件属性-表
*/

静态 gattAttribute_t LED_ServiceAttrTbl[]=
{
// LED_Service 服务声明
{
{ATT_BT_UUID_SIZE、primServiceUUID}、
GATT_permit_read | GATT_PROP_NOTIFY、
0、
(uint8_t *)&LedServiceDecl
}、
// LED0特征声明
{
{ATT_BT_UUUART_SIZE、characterUUID}、
GATT_permit_read | GATT_PROP_NOTIFY、//Dale add notify、
0、
ls LED0Props (&L)
}、
// LED0特征值
{
{ ATT_UUUUUUUI_SIZE、ls _LED0UUID }、
GATT_permit_read | GATT_permit_write | GATT_permit_write、
0、
LS_LED0Val
}、
// LED1特征声明
{
{ATT_BT_UUUART_SIZE、characterUUID}、
GATT_permit_read | GATT_PROP_NOTIFY、//Dale add notify、
0、
ls LED1Props (&L)
}、
// LED1特征值
{
{ ATT_UUUUUUUAR_SIZE、ls _LED1UUID }、
GATT_permit_read | GATT_permit_write | GATT_permit_write、
0、
LS_LED1Val
},
}; 

请注意、我在其中添加了'GATT_PROP_NOTIFY'。

但是、当我执行此操作时、IOS 应用程序会首先报告特征在首次发现时以及当我尝试让 IOS 应用程序 ASK projectZero 将通知值设置为 Yes 时已设置为 NO、 我收到"不支持请求"错误、如下所示:

发现的具有以下属性的特征:<CBCharacteristic:0x1700be420、UUID = F0001111-0451-4000-B000-000000000000、properties = 0xE、value =<7c553720 957b0000 20050020 dd380020 d4380020>、inically = no>


更改<CBCharacteristic:0x1700be420、UUID = F0001111-0451-4000-B000-000000000000、properties = 0xE、value =<7c553720 957b0000 20050020 dd380020 d4380020>的通知状态时出错、notify = no>:不支持请求。

我是否未正确设置 ProjectZero 中的 notify 属性、以及为什么在让 IOS 应用程序要求将 notify 值设置为 Yes 时获得"此请求不受支持"?
谢谢、
戴尔
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    有关如何添加通知属性的示例、请参阅 button_service。 您必须进行的更改位于配置文件属性-变量部分下。

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

    Nathan、
    谢谢、我测试了 button_service、实际上我的 IOS 应用程序看到它会通知、是的。

    然后、我看到了添加通知需要更改的数量、因此我决定甚至不在修改后的 ProjectZero 中使用 led 和数据服务、但我必须在 Button 服务中添加一个特征。

    谢谢、
    戴尔