-
Notifications
You must be signed in to change notification settings - Fork 49
I believe the RSSI function is returning the wrong number. #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@nlbutts
I'd be open to implementing the RSSI formulas from the SX datasheet in this library, unless you'd want to take this on and open a PR? |
It appears Hoperf fixed the datasheet. I just downloaded Version 2.0 of the datasheet from their web-site and it shows the same formula as Semtech's datasheet. Excuse my ignorance, but what is a PR? |
@nlbutts Cool - confirmed the latest hoperf DS reflects the semtech formulas. (https://www.hoperf.com/data/upload/portal/20190801/RFM95W-V2.0.pdf). PR as in a pull request to this repository. Alternatively I can update the code and library to reflect the issue |
@brentru Is this something you're still working on? |
I wanted to use the SX127x parts in both LoRa and FSK mode, so I switched to the UPM code base. |
@jerryneedell Was this ever implemented in any of the work you've done for RFM9x? |
@brentru I have not but it look like a good thing to do -- there are also some proposed changes in #51 that I have been meaning to test and implement. Unfortunately, I have not had much time available recently. That should be improving this week. |
looks like this will work...unless I am missing somethng.
|
@jerryneedell Yeah, checked the v2 of the hoperf datasheet and the code in this library looks correct to me. |
It has not been updated yet |
@brentru I'm confused. Are you saying it does not need to be changed? |
@jerryneedell Sorry - I misread your post as a code snippet from |
@jerryneedell That's OK - fold it in! |
fixed by #57 |
On line 553 the RSSI register (for Lora) is read and 137 is subtracted from the value. During testing I seem to lose the LORA signal at -101 dBm. Looking at the Semtech data sheet (section 5.5.5) the formula for RSSI is:
RSSI (dBm) = -157 + Rssi, (when using the High Frequency (HF) port) or RSSI (dBm) = -164 + Rssi, (when using the Low Frequency (LF) port)
Working the numbers back when this library reads -101, the register would have contained 36, running the correct formula gives me an RSSI of -121 dBm. I'm running the Lora radio at 125 KHz bandwidth and a SF of 7, which should give me a theoretical -125 dBm receive sensitivity. This seems in the realm of possibility.
Am I missing something or is the number incorrect in the code?
The text was updated successfully, but these errors were encountered: