This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Need FOTA Support in LWM2M firmware update object using block2 coap process.

Hi 

We searched a lot of stuff regarding FOTA update in nRF52840DK using Lwm2m and coap protocol. But we could not get help in the right direction. We could not find any stuff or documentation (explanation) regarding BACKROUND_DFU in nRF16_SDK.

We already implemented firmware object and its instance callback with existing lwm2m client example. Now we want to update the firmware over the air using lwm2m and coap protocols. Please share any kind of stuff or example you have so that we can get out from this trouble

  • Hello,

    The iot section of the nRF5 SDK is no longer supported in SDK17.0.0, because it was deprecated, so I suspect there are no good documentation for the IoT part of the SDK. I don't know why it remained in the SDK for so long, because it hasn't been updated for the last 4-5 years or so.

    I guess you have already seen the SDK\examples\iot\bootloader project. Have you tried this? My assumption is that you use it like the normal bootloader in the BLE examples, but that it runs in the bacground rather than as a separate application. I have never used any of the examples in the iot folder. Let me know if it doesn't work, and I will try to reach out for someone that worked on the IoT part of the SDK back in the days.

    BR,

    Edvin

  • Thanks we have already gone through the SDK17 before. But i am using SDK16.

    As you mentioned that the sdk16 have bootloader project, i saw that and research about their functionality to understand the logic of that bootloader. But in that example TFTP protocol is used. In my case,  i want to use Lwm2m server with CoAP protocol. So please provide any other useful information or example so that i can move further in my project. 

    Please keep in touch, so we can find out the way to resolve this trouble.

    Regards
    Pankaj

  • Pankaj Jaswal said:
    But in that example TFTP protocol is used. In my case,  i want to use Lwm2m server with CoAP protocol.

     In that case, we don't have any. Everything in the IoT folder is experimental (not production), and since it wasn't much used, it was never finished. What we have here is delivered as is, but we will not expand or add to this folder. So we will not release a bootloader with Lwm2m server with Coap protocol if it is not present already.

    Another thought:

    Your nRF is connected to some gateway, right? A Raspberry Pi? Perhaps you can use a BLE bootloader and update the nRF from the Raspberry Pi using nrfutil on the RPi?

    BR,

    Edvin

  • Thank you for your valuable time. But i have one more query, Is there any way you know, how to flash a .zip file into nRF52840?
    The zip file have firmware related information and like all necessary files and also some other file which is not need to upload into the nrf. 
    If you have any information regarding this please share with me. 

    BR,

    Pankaj Jaswal

  • How was this zip file generated?

    The nRF52840 is programmed with .hex files. They are binary files that you get when you compile an application.These must be programmed using a programmer. If you are using a Nordic nRF52840 DK there is an on board programmer, so you can use that directly (via a Micro USB cable).

    There is another way of flashing the nRF52840 DK, which is via a bootloader. But in that case, the bootloader needs to be flashed using a programmer at some point. If there is no bootloader, then there is no other way to flash the nRF52840. 

    If it does have a bootloader, you can generate an application image using nrfutil. This will create a .zip file, so perhaps the zip file you hold is generated that way?

    If so, it depends on what type of bootloader you have how you program it to the nRF52840. If it is a BLE bootloader, then you can use BLE (nRF Connect for Desktop/mobile).

    If it is a serial bootloader, you must use UART (via nrfutil), if it is a USB bootloader, you can use USB (via nrfutil). You need to know what type of bootloader that is programmed onto the nRF, and the zip file needs to be properly generated. (You can not just zip some random files and then program it via the bootloader).

Related