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.

EasyLink中rssi相关问题

在RFEasyLinkEcho的收发例程中,有两种方式可以获得RSSI值。

1.接收回调函数中的echoRxDoneCb(EasyLink_RxPacket * rxPacket, EasyLink_Status status);rxPacket结构体中自带有RSSI值。

2.可以通过EasyLink_Status EasyLink_getRssi(int8_t *pi8Rssi);来获取RSSI值。

我想请问一下这两个得到的值有什么区别?

在使用EasyLink_getRssi(int8_t *pi8Rssi);时,是需要在某个特定的位置吗?因为得到的数值要么是-128(无效数值)要么程序到这一步就卡死。请问有什么需要注意的吗?

  • 1、两个都可以,我的理解是,rxPacket结构体中的是接收到数据的RSSI,必须有收到数据才有数值;EasyLink_getRssi是获取最近一次收到的RSSI,只要调用就有数值返回,不一定要接收到数据。
    2、CMD_GET_RSSI is an immediate command that takes no parameters, and therefore, can be used as a
    direct command.
    On reception, the radio CPU reads the RSSI from an underlying receiver. The RSSI is returned in result
    byte 2 (bit 23–16) of CMDSTA (see Figure 25-5). The RSSI is given on signed form in dBm. If no RSSI is
    available, this is signaled with a special value of the RSSI (−128, or 0x80).
    If no radio operation command is running, the radio CPU returns the result ContextError in CMDSTA.
    Otherwise, the radio CPU returns DONE along with the RSSI value.