LoRaWAN MAC Battery Level reporting



  • There is a lora.set_battery_level(level) method introduced in latest firmware:

    0_1501737154368_upload-d0def910-09e4-4876-b871-aaee637a699b

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

    0_1501737300888_upload-2c6e55f3-b554-4458-9196-f5b743643866

    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.


  • administrators

    @bmarkus thanks, fixing it now.



  • Sure, I will open an issue at GitHub.


  • administrators

    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!


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.