This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[BUG] lwm2m firmware update result is not set, firmware update state is set instead

Hi,

I have just bumped the NCS I am using for my project to version 1.9.1. After this update, I found a bug in the Zephyr code.

On line 214 of zephyr/subsys/net/lib/lwm2m/lwm2m_obj_firmware.c:

snprintf(path, sizeof(path), "5/%" PRIu16 "/3", obj_inst_id);

The number "3" should be a number "5". This means that instead of setting the result, the state is set!

It is quite bad to use hardcoded numbers like this, there are defines at the top of the file that should be used, FIRMWARE_STATE_ID and FIRMWARE_UPDATE_RESULT_ID. I know this is a Zephyr issue, I will maybe do a PR to fix this.


I saw that this is fixed in c2550d56c8163fc230334cefcaa7b8f0c4565936. I will cherry-pick this fix for now, but when is the plan that it will be released a fix for this as part of NCS?

Regards,
Andreas

PS: I wanted to post this also so that others that have the same issue will find it.

Parents
  • Hello, 

    I know this is a Zephyr issue, I will maybe do a PR to fix this.

    Yes, that is correct. This is a Zephyr library.

    I saw that this is fixed in c2550d56c8163fc230334cefcaa7b8f0c4565936. I will cherry-pick this fix for now, but when is the plan that it will be released a fix for this as part of NCS?

    The fix should be available in the main branch, and will be included in the next release.

    Kind regards,
    Øyvind

Reply
  • Hello, 

    I know this is a Zephyr issue, I will maybe do a PR to fix this.

    Yes, that is correct. This is a Zephyr library.

    I saw that this is fixed in c2550d56c8163fc230334cefcaa7b8f0c4565936. I will cherry-pick this fix for now, but when is the plan that it will be released a fix for this as part of NCS?

    The fix should be available in the main branch, and will be included in the next release.

    Kind regards,
    Øyvind

Children
No Data
Related