关于simpleGATTprofile 的Characteristic 问题,在 simpleBLECentral 工程中,当启用通知后,是在哪里收到数据?

  • btt
  • [btt]
  • Topic Author
  • Offline
  • Administrator
  • Administrator
More
27 Sep 2020 19:56 #110 by btt
New Topic
如果你看simpleBLECentral.c 这个文件, 里面有个函数:
simpleBLECentralProcessGATTMsg(),这个函数就是处理各种从peripheral 过来的数据.
但是在示例代码中并没有加入通知, 就是notification 的接收, 所以你得自己添加代码.
很简单, 类似
Code:
if ( ( pMsg->method == ATT_READ_RSP ) || ........)
你添加
Code:
else if ( ( pMsg->method == ATT_HANDLE_VALUE_NOTI ) ||......)

Please Log in or Create an account to join the conversation.