Skip to content

rssi calculation #420

Closed
Closed
@gnob417

Description

@gnob417

Hi,
there is rssi calculation code like below.

int16_t rssi = SX1272Read( REG_LR_PKTRSSIVALUE );
if( snr < 0 )
{
     SX1272.Settings.LoRaPacketHandler.RssiValue = RSSI_OFFSET + rssi + ( rssi >> 4 ) + snr;
}
else
{
      SX1272.Settings.LoRaPacketHandler.RssiValue = RSSI_OFFSET + rssi + ( rssi >> 4 ); 
}

However, in specification by semtech, https://www.semtech.com/uploads/documents/sx1272.pdf ,
they say

The same formula can be re-used to evaluate the signal strength of the received packet:
Packet Strength (dBm) = -139 + PacketRssi * 0.25, (with LnaBoost On and SNR >= 0)
Due to the nature of the LoRa modulation, it is possible to receive packets below the noise floor. In this situation, the SNR
is used in conjunction of the PacketRssi to compute the signal strength of the received packet:
Packet Strength (dBm) = -139 + PacketRssi + PacketSnr * 0.25, (with LnaBoost On and SNR < 0)

I think code and documentation is quite different.
what's the gap between these two sources?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions