如果我自己定义了一个notify,可以使用GATT_Notification()这个函数发送么?
SimpleProfile_SetParameter()也可以发送通知吧??
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.
如果我自己定义了一个notify,可以使用GATT_Notification()这个函数发送么?
SimpleProfile_SetParameter()也可以发送通知吧??
SimpleProfile_SetParameter()也可以发送通知吧??
我定义了一个新的characteristic6,但是手机扫描出来的还是之前那些characteristic,没有我新定义的,是什么地方漏了么??
在协议栈的代码里模仿已经有的UUID和characteristic添加一个新的,然后要在SimpleProfile_SetParameter 和 SimpleProfile_GetParameter里面添加case来处理,一样的模仿已有的来添加。Attribute也是一样需要添加新的case,然后可以调用SimpleProfile_SetParameter来发送通知
SimpleProfile_SetParameter() 里 最终是调用这个函数 GATTServApp_ProcessCharCfg来发送数据的,你可以参考一下下面的帖子http://www.deyisupport.com/question_answer/wireless_connectivity/bluetooth/f/103/t/61009/reply.aspx
需要注意的是 GATTServApp_ProcessCharCfg,这个函数需要调用simpleProfile_ReadAttrCB(),所以发送的数据长度 必须在simpleProfile_ReadAttrCB()中设置好。