Lora-net / LoRaMac-node

Reference implementation and documentation of a LoRa network node.
Other
1.89k stars 1.09k forks source link

Questions about rssi calculation in sx1276. #844

Closed 44670 closed 4 years ago

44670 commented 4 years ago

https://github.com/Lora-net/LoRaMac-node/blob/87f19e84ae2fc4af72af9567fe722386de6ce9f4/src/radio/sx1276/sx1276.c#L1550

According to the datasheet, the rssi should be calculated as:

when SNR >= 0, RSSI = -157 (or -164) +16/15 PacketRssi when SNR < 0, RSSI = -157 (or -164) + PacketRssi + PacketSnr 0.25

However according to the source code, in both cases, 1/16 of the PacketRssi was added even SNR < 0.

mluis1 commented 4 years ago

The answers provided on issues #420 and #143 also answer yours.