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.

  • 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?



Log in to reply

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