我们用的SDK测试在9281上测试master模式,用的是B91_demo这个case测试,现在发现和外设(心率计)已经建立连接(app_le_connection_complete_event_handle 已经调用),但是发现一个问题没有收到心率计发过来的心率数据,我在工程的函数app_gatt_data_handler加了调试发现没有调用。
用手机上BLE调试宝测试发现主机端需要开启notify才会收到心率计的数据。
我在9218的case要如何开启蓝牙master的notify功能呢?
Developer Handbook for TLSR9 |
TLSR9 不能擦除flash |
BLE and Thread for B91 |
ESB mode on TLSR9 B1 |
关于断点调试 |
IDE License for TLSR9 Chips |
Zigbee RF 收发包测试 |
请问有没有TLSR9518的数据手册 |
关于断点调试 |
Hi,
Slave设备的notify需要master写CCC特征值,salve才能开启notify。
请问telink的SDK里master写CCC特征值这个有实例代码吗?我参考下
用程序中的att write 函数写ccc的值,进而把notification打开;建议查阅相关资料,另外可以用抓包软件抓取手机修改slave设备CCC的空中包,来分析机制。
我看到SDK里有下面四个函数不知道哪一个是你指的att write 函数?
ble_sts_t blc_gatt_pushHandleValueNotify (u16 connHandle, u16 attHandle, u8 *p, int len);
ble_sts_t blc_gatt_pushHandleValueIndicate(u16 connHandle, u16 attHandle, u8 *p, int len);
ble_sts_t blc_gatt_pushWriteCommand (u16 connHandle, u16 attHandle, u8 *p, int len);
ble_sts_t blc_gatt_pushWriteRequest (u16 connHandle, u16 attHandle, u8 *p, int len);
ble_sts_t blc_gatt_pushFindInformationRequest(u16 connHandle, u16 start_attHandle, u16 end_attHandle);
另外问下有多连接的SDK4.0的 开发文档吗?
retval = blc_gatt_pushHandleValueNotify(conn_dev_list[0].conn_handle,BATT_LEVEL_INPUT_CD_H, (u8 *)&consumer_key, 2);
if(retval !=BLE_SUCCESS)
{
printf("ble send value %d",retval);
}
我调用上面函数测试发现返回值0x82,这个可能是什么问题?
Slave设备的notify需要master写CCC特征值,salve才能开启notify。 这个要调用什么函数才能实现?