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.

CC2540 任务开多了之后,android客户端获取蓝牙服务困难,经常失败。

Other Parts Discussed in Thread: CC2540

CC2540因为加了UI部分和AD采集,导致任务多了,定时器多了之后,android客户端链接板子时,获取蓝牙服务困难。有时可以获取到,有时不行。

同样的CC2540程序,用IOS客户端,没有这个问题。

  • 是不是占用内存的多少有区别,之前收到反馈,内存占用过多时,会影响service UUID的获取
  • 应该不是内存问题,同样的程序,我降低AD采集速度,服务获取就比较稳定。但是IOS,无论如何,都是可以正常获取服务的。我想是不是可以在蓝牙连接的时候,暂时关闭ADC等其他任务?但是又不知道蓝牙建立连接或获取服务,调用哪些API,请TI工程师指点一下,谢谢
  • GAP_EstablishLinkRequest() 具体请参考协议栈中的文档BLE_API_Guide_main之GAP (Generic Access Profile)/GATT (Generic Attribute Profile)
    路径:C:\Texas Instruments\BLE-CC254x-1.4.2.2\Documents
  • 你好,工程中没有搜素到GAP_EstablishLinkRequest()函数,只有GAP_LINK_ESTABLISHED_EVENT事件。我想在链接前暂时关闭其他任务,请问应该加在哪?另外GAP_LINK_ESTABLISHED_EVENT包括获取服务吗?不包括的话,获取服务在哪里?
  • GAP_LINK_ESTABLISHED_EVENT 发出说明GAP_EstablishLinkRequest已经完成了,是一个告知信息,不包括获取服务。

    This message is sent to the app when the link request is complete.
    For an Observer, this message is sent to complete the Establish Link Request.
    For a Peripheral, this message is sent to indicate that a link has been created.

    “我想在链接前暂时关闭其他任务”,建议在设备发现【GAP_DeviceDiscoveryRequest】之前就操作