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

Parents
  • Hi

    We tried to inspect the iot bootloader by running iot bootloader code in build and debug mode using segger studio. 
    We found that when device is reset by the application after getting NRF_DFU_EVT_DFU_COMPLETED in DFU_observer present in coap_dfu.c file.

    The bootloader code call the function nrf_bootloader_init(dfu_observer)  and inside this function
    i)call the nrf_dfu_settings_init () 
    ii)call  the postvalidate()  
    iii)call the nrf_bootloader_fw_activate()
    This function results ACTIVATION_NONE in returns.But when we read thge menory from nRF_connect application there is application present in bank1 you can see this in previous image in our last messages.

    you can see this functionality in nrf_bootloader.c file. 

    We confirmed that after application restart using  NVIC_SystemReset(). Bootloader start and run every time.

    One more thing is noticed in the log when the init command packet is received from the server we got the error Invalid init command  but we already used the nrfutil command to generate the package

    "nrfutil pkg generate --hw-version 52 --sd-req 0xca --application-version 2 --application pca10056\s140\ses\Output\Debug\Exe\version_12_2.hex --key-file "E:\till\fota\examples\iot\project_iot\lwm2m_client\pca10056\s140\ses\Test.pem" app_dfu_Test_package.zip"


    Is this a right way to generate the package. If no please guide me.

    Br

    Pankaj Jaswal

Reply
  • Hi

    We tried to inspect the iot bootloader by running iot bootloader code in build and debug mode using segger studio. 
    We found that when device is reset by the application after getting NRF_DFU_EVT_DFU_COMPLETED in DFU_observer present in coap_dfu.c file.

    The bootloader code call the function nrf_bootloader_init(dfu_observer)  and inside this function
    i)call the nrf_dfu_settings_init () 
    ii)call  the postvalidate()  
    iii)call the nrf_bootloader_fw_activate()
    This function results ACTIVATION_NONE in returns.But when we read thge menory from nRF_connect application there is application present in bank1 you can see this in previous image in our last messages.

    you can see this functionality in nrf_bootloader.c file. 

    We confirmed that after application restart using  NVIC_SystemReset(). Bootloader start and run every time.

    One more thing is noticed in the log when the init command packet is received from the server we got the error Invalid init command  but we already used the nrfutil command to generate the package

    "nrfutil pkg generate --hw-version 52 --sd-req 0xca --application-version 2 --application pca10056\s140\ses\Output\Debug\Exe\version_12_2.hex --key-file "E:\till\fota\examples\iot\project_iot\lwm2m_client\pca10056\s140\ses\Test.pem" app_dfu_Test_package.zip"


    Is this a right way to generate the package. If no please guide me.

    Br

    Pankaj Jaswal

Children
No Data
Related