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.
-
@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.
-
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 thanks. We'll fix this ASAP.
-
@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 yes of course, that's exactly how it's going to be :-)
-
@bmarkus How do you get that stats from lora ? Just lora.stats()? Or something else before!?
-
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. -
This post is deleted! -
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 -
@seb Does that mean:
tx_power=14
lora.stats()
print(lora.stats())
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login