False value returned by lora.stats()
-
lora.stats() returns false snr value:
-50 dB is not possible, it looks a typical bug found in various LoRa implementations, division by 4 is forgotten. Real value is -12.5 dB.
Close to the gateway I get 28 dB, where real value is 7 dB.
-
@seb Does that mean:
tx_power=14
lora.stats()
print(lora.stats())
-
Nope,
lora.stats()
will return a named tuple containing the stats, please see the docs: https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html#lorastats
-
This post is deleted!
-
lora.stats()
will return the stats shown previously, but it shows the stats of the last received packet, so you may be instantly valid when the module turns on, you may have to wait till the module receives some LoRa packets.
-
@bmarkus How do you get that stats from lora ? Just lora.stats()? Or something else before!?
-
@bmarkus yes of course, that's exactly how it's going to be :-)
-
@daniel said in False value returned by lora.stats():
@bmarkus thanks. We'll fix this ASAP.
Thanks Daniel. One notice. Would be good to get a single precision float instead of integer not to loose precision.
-
@bmarkus thanks. We'll fix this ASAP.
-
Regarding LoPy it is a bug. Not only because docs says it is dB but for applications no need to know the LoRa HAL. It is the reason why we have abstraction.
-
@bmarkus
Many modules do report this as it comes from the Semtech's Lora-Node implementation, but that is a raw value and so correct behaviour as long as the documentation reflects what it really is, it's not a bug.However LoPy's documentation does call it dB so it's incorrect.