Lora-net/lora_gateway

Spectral scan rssi offset argument above 15 is not correct

reissjason opened this issue · 1 comments

It appears the the positive value will lower the reading. -16 and 16 have equivalent results.

The argument is read into a 8-bit signed integer and passed to the loragw code.
The value is converted to 2's complement before being set into the FPGA register.
What happens with it after that is in the FPGA code.

/libloragw/src/loragw_radio.c:335
RssiOffsetReg = (rssi_offset >= 0) ? (uint8_t)rssi_offset : (uint8_t)(~(-rssi_offset)+1); /* 2's complement */

admin@mtcdt:/opt/lora/gateway-utils# ./util_spectral_scan -f 902:0.05:903 -n 10000 -o 15
+++ Start spectral scan of LoRa gateway channels +++
...
902000000 10%<-116.5 30%<-117.0 50%<-117.5 80%<-118.0
902050000 10%<-116.5 30%<-117.0 50%<-117.5 80%<-118.0
+++ Exiting Spectral scan program +++
admin@mtcdt:/opt/lora/gateway-utils# ./util_spectral_scan -f 902:0.05:903 -n 10000 -o -15
+++ Start spectral scan of LoRa gateway channels +++
...
902000000 10%<-86.5 30%<-87.0 50%<-87.5 80%<-88.0
902050000 10%<-86.5 30%<-87.0 50%<-87.5 80%<-88.0
admin@mtcdt:/opt/lora/gateway-utils# ./util_spectral_scan -f 902:0.05:903 -n 10000 -o 16
+++ Start spectral scan of LoRa gateway channels +++
...
902000000 10%<-85.5 30%<-86.0 50%<-86.5 80%<-87.0
902050000 10%<-85.5 30%<-86.0 50%<-86.5 80%<-87.0
admin@mtcdt:/opt/lora/gateway-utils# ./util_spectral_scan -f 902:0.05:903 -n 10000 -o -16
...
902000000 10%<-85.5 30%<-86.0 50%<-86.5 80%<-87.5
902050000 10%<-85.5 30%<-86.0 50%<-86.5 80%<-87.0

In an effort to improve our customer support experience and in recognition that our support backlog on GitHub has historically exceeded the capacity of our engineering team, we have taken the difficult decision to focus on the most contemporary issues reported and to close all others without confirmation of resolution.

Our belief is that issues which have remained unresolved and unaltered for extended periods of time are less likely to continue to pose a significant problem to the user than when they were originally filed. More contemporary issues however may still be relevant and hence are more appropriate to prioritize.

For those users who remain interested in resolution of a reported issue that was closed, we are encouraging usage of our developer portal forums [https://forum.lora-developers.semtech.com/] and commercial support portal [https://semtech.force.com/ldp/ldp_support] as the preferred avenues to receive support. We will continue to monitor the GitHub issue trackers as well, but want to encourage all users to take advantage of the increased community presence on the developer portal. For commercial customers, we highly recommend using the commercial support portal which is uniquely tailored to service such support requests.