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.

关于修改协议栈中的fff2characteristics



请问,把协议栈中的fff2的read功能改为write功能,不是修改simpleGATTprofile.h和simpleGATTprofile.c中的相关配置就行了吗?

  • FFF3的就是wtite属性啊,你可以就对照FFF3修改就应该没问题吧

  • 不行啊,如果这样改,在lightblue上根本打不开fff2,应该还要修改其他地方的吧

  • waiting,

    当然可以:)

    但是你还必须相应修改 simpleProfile_WriteAttrCB()。

    这样才能正确接收write过来的数据。

  • Yan

    对的,我刚刚调试出来了。还想问问

     attHandleValueNoti_t pReport;
      pReport.handle=0x2e;
      pReport.len = 16  ;                                                                                                        
      osal_memcpy(pReport.value, bdAddr2Str1(array), 16);
      GATT_Notification(0, &pReport, FALSE );  
    通过这个函数发送数据出去,会导致从机接收回调函数接收不到主机通过characteristic发送过来的数据,这是什么回事?
  • waiting,

    你的handle ,需要确认一下是否正确。

    另外,notification 和 主机的write是不会有任何冲突的。如果有问题,你还需要确认一下你代码的逻辑。