ST意法半导体
直播中

谢芳芳

7年用户 138经验值
私信 关注
[问答]

BlueNRG-MS如何写入远程特性

我尝试写入远程设备上的特性,BlueNRG-MS作为外围客户端。我调用aci_gatt_write_charac_value()并返回SUCCESS。但是EVT_BLUE_GATT_PROCEDURE_COMPLETE来了,它有时是0x00(BLE_STATUS_SUCCESS),有时它是0x41(BLE_STATUS_FAILED)。可能是什么原因以及如何解决这个问题?堆栈是7.2.c.

#ancs #iphone #ble #bluenrg-ms #client

以上来自于谷歌翻译


以下为原文




I try to write to a characteristic on a remote device, BlueNRG-MS works as peripheral client. I call aci_gatt_write_charac_value() and it returns SUCCESS. But then EVT_BLUE_GATT_PROCEDURE_COMPLETE comes and it is sometimes 0x00 (BLE_STATUS_SUCCESS) and sometimes it's 0x41 (BLE_STATUS_FAILED). What could be the reason and how to solve this? Stack is 7.2.c.

#ancs #iphone #ble #bluenrg-ms #client

回帖(2)

曹皓轩

2019-3-4 12:45:23
嗨,
你能赶上'EVT_BLUE_GATT_ERROR_RESP'事件吗?错误代码参数应根据蓝牙规范版本5.0第3卷第F部分第3.4节的表3.3提供失败原因
问候。

以上来自于谷歌翻译


以下为原文




Hi,
could you catch the event 'EVT_BLUE_GATT_ERROR_RESP'? The error code parameter should provide the reason of failure according to table 3.3 of BLUETOOTH SPECIFICATION Version 5.0  Vol 3, Part F, Section 3.4
Regards.
举报

谢芳芳

2019-3-4 12:59:45
错误代码是0xA2,这意味着这是应用程序级错误。所以我查看了ANCS文档,它说这个错误代码是针对无效参数的。事实证明,我向iPhone发送了不正确的数据,并拒绝了它。非常感谢您推荐EVT_BLUE_GATT_ERROR_RESP

以上来自于谷歌翻译


以下为原文




The error code is 0xA2 which means this is an application level error. So I looked at ANCS documentation and it says this error code is for invalid parameter. So it turns out I was sending incorrect data to iPhone and it was rejecting it. Thank you very much for suggesting EVT_BLUE_GATT_ERROR_RESP
举报

更多回帖

发帖
×
20
完善资料,
赚取积分