微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI无线射频设计 > CC2540 Notify 使用问题

CC2540 Notify 使用问题

时间:12-22 整理:3721RD 点击:

Hi,各位好:

       最近才开始搞一个蓝牙的项目,有些问题想请教一下各位。sever端可以通过notify发送数据给client端,不需要uuid匹配。那请问,notify需要怎么进行初始化呢?

以一个官方的thermometer例子说明一下:在Thermometer_ProcessEvent任务中的TH_PERIODIC_IMEAS_EVT事件中进行notify处理,进一步跟踪在  thermometerCB回调函数中

case THERMOMETER_IMEAS_NOTI_ENABLED:
temperatureIMeasCharConfig = true;
if (gapProfileState == GAPROLE_CONNECTED)
{
osal_start_timerEx( thermometerTaskId, TH_PERIODIC_IMEAS_EVT, 1000 );
}
break;   

回调函数thermometerCB是由Thermometer_Register函数注册到thermometerServiceCB    通过搜索在thermometer_WriteAttrCB函数里发现了thermometerServiceCB回调函数。

请问在初始化notify问什么需要进到thermometer_WriteAttrCB函数里,这个函数又是由谁触发的呢? 谢谢

Not sure I understanding the questions correctly.

If Central write to Peripheral attribute data ove the air after connection, the  thermometer_WriteAttrCB will be called.

Not sure I understand correctly.

When Central write attribute value to Peripheral over the air after connection, the thermometer_WriteAttrCB will be called

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top