## 2 官方资料

### 涉及寄存器 ### 官方英文说明

``````5.5.5. RSSI and SNR in LoRaTM Mode

The RSSI values reported by the LoRaTM modem differ from those expressed by the FSK/OOK modem. The following
formula shows the method used to interpret the LoRaTM RSSI values:
RSSI (dBm) = -157 + Rssi, (when using the High Frequency (HF) port)
or
RSSI (dBm) = -164 + Rssi, (when using the Low Frequency (LF) port)

The same formula can be re-used to evaluate the signal strength of the received packet:
Packet Strength (dBm) = -157 + Rssi, (when using the High Frequency (HF) port)
or
Packet Strength (dBm) = -164 + Rssi, (when using the Low Frequency (LF) port)

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) = -157 + PacketRssi + PacketSnr * 0.25 (when using the HF port and SNR -100dBm), the linearity of PacketRssi is not guaranteed and results will diverge
from the ideal 1dB/dB ideal curve. When very good RSSI precision is required over the whole dynamic range of the

ValidHeader and RxDone IRQ), and used to extract a more high-signal RSSI measurement
- When SNR>=0, the standard formula can be adjusted to correct the slope:
``````

## 3 代码分析

``````int16_t SX1276ReadRssi( RadioModems_t modem )
{

switch( modem )
{
case MODEM_FSK:
break;
case MODEM_LORA:
if( SX1276.Settings.Channel > RF_MID_BAND_THRESH )
{
}
else
{
}
break;
default:
break;
}
}
``````

## 4 范例

``````rssi cur: 61,snr: 35