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.

RSSI问题

我用协议栈里面的 afIncomingMSGPacket_t 结构体 提取出 uint8 LinkQuality   和  int8  rssi  ,rssi这个值是负的;

我不做定位,纯粹做信号强度检测用,有些疑惑请解答下:

1    这个从结构体中提出的rssi和用sniffer抓取数据后显示的那个RSSI值是否一致,还是做了什么处理?

2    直接提取出的rssi是否就是父节点接收到子节点数据的信号强度(dBm),这个值需要做其他处理吗?

  

  • RSSI 是接收端收到信号的强度指示,协议栈的处理代码可以看到,如下(mac_rx.c->rxFcsIsr)

    其中rssiDbm可以理解就是芯片寄存器读到的值,然后通过调整赋给了pduLinkQuality和rssi. 应该很清楚了吧

     /* decode RSSI and correlation values */
        rssiDbm = PROPRIETARY_FCS_RSSI(rxBuf) + MAC_RADIO_RSSI_OFFSET;
        MAC_RADIO_RSSI_LNA_OFFSET(rssiDbm);
        corr = PROPRIETARY_FCS_CORRELATION_VALUE(rxBuf);

        /* record parameters that get passed up to high-level */
        pRxBuf->mac.mpduLinkQuality = macRadioComputeLQI(rssiDbm, corr);
        pRxBuf->mac.rssi = rssiDbm;
        pRxBuf->mac.correlation = corr;

  • 谢谢ty,很清楚!

  • 那我在应用层的数据包中读取的pkt->rssi是int8类型的,代表的就是负多少dB吗? 但是在数据手册中看到这么一句话:RSSI 值是一个2 的有符号补数,对数尺度是1-dB 的步长。是什么意思?

    我的理解是pkt->rssi是实际值的补码,这样理解对吗