PiInTheSky / lora-gateway

LoRa gateway to Habitat
96 stars 69 forks source link

RSSI calculated value ? #7

Closed g8dhe closed 6 years ago

g8dhe commented 9 years ago

Dave, I've noticed in the code several places where; "readRegister(Channel, REG_PACKET_RSSI) - 157)" but in another place its "readRegister(Channel, REG_PACKET_RSSI) - 137)" The latter corresponds with the manual section "5.5.5. RSSI 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. R SSI[dB m ] = –137 + RSSI"

Is it me or should they all be -137 as opposed to -157 ? Geoff

daveake commented 9 years ago

Yeah, they changed it between 2 versions of the manual. Dunno why I have both old and new versions. I'll sort it.

Dave

On 13/08/2015 21:04, g8dhe wrote:

Dave, I've noticed in the code several places where; "readRegister(Channel, REG_PACKET_RSSI) - 157)" but in another place its "readRegister(Channel, REG_PACKET_RSSI) - 137)" The latter corresponds with the manual section "5.5.5. RSSI 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. R SSI[dB m ] = –137 + RSSI"

Is it me or should they all be -137 as opposed to -157 ? Geoff

Reply to this email directly or view it on GitHub https://github.com/PiInTheSky/lora-gateway/issues/7.

g8dhe commented 9 years ago

Ah, that would make sense, which version is right mines version 1.0 it seems ?

daveake commented 9 years ago

There's at least one later one. I'll check tomorrow. On 13 Aug 2015 9:40 pm, "g8dhe" notifications@github.com wrote:

Ah, that would make sense, which version is right mines version 1.0 it seems ?

— Reply to this email directly or view it on GitHub https://github.com/PiInTheSky/lora-gateway/issues/7#issuecomment-130833843 .

g8dhe commented 9 years ago

Ah, checking the Semtech SX1279 Rev3 Nov. 2014 datasheet it says the Lowband port (upto 525MHz) should use "RSSI (dBm) = -164 + Rssi, (when using the Low Frequency (LF) port)", Doh yet another value, although they use -157 for the HF port ..... oh and some notes to go with it as well which suggest it varies with lna settings as well. Maybe the answer is its relative only!

g8dhe commented 9 years ago

Latest version is Rev 4 March 2015 from the Semtech site.

daveake commented 7 years ago

Right, so it's 157 for HF which is band 1 which is 868/915, and it's 164 for bands 2/3 which are 434 and 169.

I'll put it in a function that tests. This will be in V1.8.3 soon.

And yes, it's more an indication than a calibrated value!

Romeo-Golf commented 7 years ago

Did this make it into 1.8.3?

PiInTheSky commented 6 years ago

Yeah, was done a while ago.