LwM2M Advanced Firmware Update for external MCU

Hi,

I want to DFU the nRF52 from nRF91 over UART. And I find this sample: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/lwm2m_client/fota_external_mcu.html

I believe this part is for putting the nRF52 into serial recovery mode: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/cellular/lwm2m_client/src/fota_external/client.c
I see this is to upload the new nrf52 image to the server and maybe start the update commands: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/cellular/lwm2m_client/scripts/fota.py
I think this is for nrf91 to connect to the server and download the firmware: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/cellular/lwm2m_client/src/main.c#L236
But I couldn't find where the nRF91 transfers the data to the nRF52 while downloading the firmware from the server.
Could you point me to where this happens?
Thanks
/CJ
Parents
  • Hello,

    On nRF91 side, the nRF52 is presented as one of the target for `dfu_target` library.

    So this is implemented as dfu_target_smp.c which forwards the data to the SMP client and that sends data over UART to nRF52 which has the SMP server running.

    LwM2M logic is in lwm2m_firmware.c but that should not be that important. All the "magic" should be in dfu_target_smp.c.

    Then regarding all the SMP protocol handling and those MCUmgr services, all that code is in the Zephyr side.

    Hope that helps,
    Kenneth

Reply
  • Hello,

    On nRF91 side, the nRF52 is presented as one of the target for `dfu_target` library.

    So this is implemented as dfu_target_smp.c which forwards the data to the SMP client and that sends data over UART to nRF52 which has the SMP server running.

    LwM2M logic is in lwm2m_firmware.c but that should not be that important. All the "magic" should be in dfu_target_smp.c.

    Then regarding all the SMP protocol handling and those MCUmgr services, all that code is in the Zephyr side.

    Hope that helps,
    Kenneth

Children
Related