LoRaWAN MAC Battery Level reporting
-
There is a lora.set_battery_level(level) method introduced in latest firmware:

Unfortunately current implementation is not in line with LoraWAN Specification v1.0.2

Method is passing values between 0 and 100 to the LoRaWAN server directly which means on server side 39% for level=100, 20% for level=50, there are no way to report battery level 40-100%.
Default value is 0 which indicates device is running on external source, level=0 doesn't mean 0%. Proper default value would be 255 which by the way can't be reported via this method.
I advice to allow level=0...255 and use level=255 as default, adding the quoted text from the LoRaWAN specification to the documentation.
-
Hi @bmarkus,
Thanks for the bug report! Would you mind creating an issue on our GitHub repository for this?
https://github.com/pycom/pycom-micropython-sigfox/issues
Thanks!
-
Sure, I will open an issue at GitHub.
-
@bmarkus thanks, fixing it now.
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