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.

[参考译文] CC2640R2F:由 UART 回调触发的通知不起作用

Guru**** 2595770 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/608505/cc2640r2f-notification-trigged-by-uart-callback-no-works

器件型号:CC2640R2F

大家好。

我必须发送由 UART 回调触发的通知。

在 simple_peripheral 示例中、特征4在周期性任务内触发、在这种情况下、我可以在 Android 应用中看到通知。 但是、如果我对该行进行注释  

SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR4、sizeof (uint8_t)、&valueToCopy);并将其复制/粘贴到其他本地、我的 Android 应用程序看不到它。

例如:

静态空 readCallback (UART_Handle handle、void *rxBuf、size_t size)

  uint8_t status[2]={(uint8_t*) rxBuf)[2]、((uint8_t*) rxBuf)[3]};

  test();

  UART_READ (uartHandler、rxBuf、4);

空测试()

  uint8_t dummy = 5;

  SimpleProfile_SetParameter (SIMPLEPROFILE_CHAR4、sizeof (uint8_t)、&dummy);//调用此行

readCallback 和 Test 函数位于不同的文件中、但我认为一旦调用 SimpleProfile_SetParameter、这不是问题。  

有人可以帮帮我吗?

非常感谢您的参与。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    //查看是否已启用通知
    GATTServApp_ProcessCharCfg (SimplefProfileChar4Config、&SimpleProfileChar4、false、
    SimpleProfileAttrTbl、GATT_NUM_ATTRS (SimpleProfileAttrTbl)、
    invalid _task_ID、SimpleProfile_ReadAttrCB);

    如上所述、您需要首先检查是否已从 Android 应用程序启用通知。

    BR、
    吉元

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    是的、通知已启用。 我已经在相同的条件下进行了测试。