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:PERIPERAL 观测器 RSSI UART

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

https://e2e.ti.com/support/wireless-connectivity/other-wireless-group/other-wireless/f/other-wireless-technologies-forum/1334184/cc2640r2f-periperal-observer-rssi-uart

器件型号:CC2640R2F
大家好、我有一个问题。 目前、 
我修改了 CC2640r2f Periperal observer 代码、
但症状是 BLE 在发送 UART 消息后无法工作。 有什么解决方案吗?


uint8 rs_data[50];
静态 void SimpleBLEPeripheral_CB(gapPeriObsRoleEvent_pEvent) Observer_State
{
switch (pEvent->gap.opcode)
{
案例 GAP_DEVICE_INFO_EVENT:
{
// gapDeviceInfoEvent_t *pDevInfoMsg;
//
// if (pDevInfoMsg = iCall_malloc (sizeof (gapDeviceInfoEvent_t)))
//{
// memcpy (pDevInfoMsg、pEvent、sizeof (gapDeviceInfoEvent_t));
//
// if (pDevInfoMsg->pEvtData = iCall_malloc (pEvent->deviceInfo.dataLen))
//{
// memcpy (pDevInfoMsg->pEvtData、pEvent->deviceInfo.pEvtData、
// pEvent->deviceInfo.dataLen);
// SimpleBLEPeripheral_enqueueMsg (SBP_Observer_State_EVT、Success、
//(uint8 *) pDevInfoMsg);

if (observer_mode=1){
if (pEvent->deviceInfo.dataLen == 28){
memcpy (rsp_data、pEvent->deviceInfo.pEvtData、pEvent->deviceInfo.dataLen);
if ((rsp_data[10]==0x53)&&(rsp_data[11]==0x61)&&(rsp_data[12]===0x6d)&(rsp_data[13]===0x73)&&(rsp_data[14]===0x75)&&(rsp_data[15]====0x6d])&&(sp_data[sp_data[16]=0x45]&]=0x45])
(rsp_data[18]=0x64)&&(rsp_data[19]==0x64)){//命名空间

//uart_printf ("Buzzon");
INT8 RSSI = pEvent->deviceInfo.RSSI;
UART_printf ("%d\n"、RSSI);




//}
//其他
//{
// iCall_freeMsg (pDevInfoMsg);
//}
//}
中断;


案例 GAP_DEVICE_DISCOVERY_EVENT:
{

if (observer_mode=1){
Role_Cancel 案;

G3872 Role_Start (default_discovery_mode、default_discovery_active_scan、default_discovery_white_list);

uart_printf ("正在运行");


// gapDevDiscEvent_t *pDevDiscMsg;
//
// if (pDevDiscMsg = iCall_malloc (sizeof (gapDevDiscEvent_t)))
//{
// memcpy (pDevDiscMsg、pEvent、sizeof (gapDevDiscEvent_t));
//
// if (pDevDiscMsg->pDevList = iCall_malloc (pEvent->discCmpl.numDevs)*
// sizeof (gapDevRec_t))
//{
// memcpy (pDevDiscMsg->pDevList、pEvent->discCmpl.pDevList、
//(pEvent->discCmpl.numDevs)*sizeof (gapDevRec_t);
// SimpleBLEPeripheral_enqueueMsg (SBP_Observer_State_EVT、Success、
//(uint8 *) pDevDiscMsg);
//}
//其他
//{
// iCall_freeMsg (pDevDiscMsg);
//}
//}


中断;


默认值:
中断;


//释放堆栈消息
iCall_freeMsg (pEvent);

#endif

这是代码的内容:当搜索特定的命名空间时、测量器件的 RSSI 值。 
SDK:1.50V
CCS:12.5V
 
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    UART_printf ("Buzzon");如果您只使用此部件、将不会出现 BLE 停止。 
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    另一个症状是、在引导后发送一次消息、之后没有响应。 
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    感谢您的联系! 我们将对此进行深入探讨、并尽快与您联系。 但是、通常始终建议您升级到 SDK 的最新版本、您可以 在此处找到该版本。 这可能无法立即解决您的问题、但会为您提供许多最新的错误修复和更改。  

    此致、

    卢克