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

nRF52833 --MESH DFU---there is show "New firmware" message after update with dfu.....

I test dfu with two board, detail as follow:

First step::  create files needed follow document

Second step:: flash files to board

** EV board: (as receive data via serial from PC and sent)

1)nrfjprog --program s113_nrf52_7.0.1_softdevice.hex --chiperase
2)nrfjprog --program mesh_bootloader_serial_gccarmemb_nrf52833_xxAA.hex   
3)nrfjprog --program application_file/NoMe_dfu_nrf52833_xxAA_s113_7.0.1.hex 
4)nrfjprog --program device_page_nrf52833_xxAA_s113_7.0.1.hex

**other board developed by us:

1)nrfjprog --program s113_nrf52_7.0.1_softdevice.hex --chiperase
2)nrfjprog --program mesh_bootloader_gccarmemb_nrf52833_xxAA.hex   
3)nrfjprog --program V0510_sensor_server_nrf52833_xxAA_s113_7.0.1.hex  
4)nrfjprog --program device_page_nrf52833_xxAA_s113_7.0.1.hex

Third step:: make DFU file


nrfutil dfu genpkg --application V0511_sensor_server_nrf52833_xxAA_s113_7.0.1.hex --company-id 0x53594332 --application-id 1 --application-version 2 --key-file private_key.txt --sd-req 0x00CC --mesh V0511_V2.zip
nrfutil dfu genpkg --application V0512_sensor_server_nrf52833_xxAA_s113_7.0.1.hex --company-id 0x53594332 --application-id 1 --application-version 3 --key-file private_key.txt --sd-req 0x00CC --mesh V0512_V3.zip
Fourth step: update
nrfutil --verbose dfu serial -pkg V0511_V2.zip -p COM5 -b 115200 -fc --mesh
Fifth step:
when finish ,there is "DFU END" message showing, now the system works well
but when I power off two board, then power on together,  there is show "New firmware" message,
why will ""New firmware" message" show, since I do not do "nrfutil --verbose dfu serial -pkg V0511_V2.zip -p COM5 -b 115200 -fc --mesh" command again?
if only power on one of them , there is no "New firmware" message.
could you help me , please?

  • Hi Tomlee, 

    Could you add a breakpoint inside case NRF_MESH_EVT_DFU_FIRMWARE_OUTDATED_NO_AUTH in mesh_evt_handler() in main.c,  And check if fw_updated_event_is_for_me() return true or not ? 

    The "New firmware" message appear when a node broadcast about it current firmware version and another node receive that packet. It explain why you don't see that when you turn on only one node. It should only boardcast that when first booting. 
    If the current firmware is equal or higher than the firmware broadcasted in the packet the node will ignore that and will only relay message. 

    But usually a normal node with Bootloader and application running normally wouldn't broadcast the firmware ID if not needed. Do both of your board work normally after DFU update? Do you have any other board in the network ? 

  • Hi Hung Bui,

     Thanks.

    And check if fw_updated_event_is_for_me() return true or not ? 

    ====return false, will call relay function

    Do both of your board work normally after DFU update?

    =====as I said , if both of them power off then power on , they will go into relay mode, then waiting data.

    =====at the same time , if I power of EV board,  the other board will be work normally after 10 min

    Do you have any other board in the network ? 

    ====No, just two board.

  • Hi Tomlee, 

    Could you tell a little bit more about the NoMe_dfu_nrf52833_xxAA_s113_7.0.1 application you used ? 
    Which application id you used for the node  ? which application version ? 
    When you do "nrfutil --verbose dfu serial -pkg V0511_V2.zip -p COM5 -b 115200 -fc --mesh" would the EV board be updated to the V0511_V2 firmware in the application ? 

    Usually this issue only happens when one of the device doesn't have any application on it and broadcast that the device requires an update of the application. The other nodes that already has the application with higher or equal version will just relay without updating the firmware. 
    We had some bug fix regarding DFU in SDK v4.2 and v5.0 , could you let us know which SDK you are using? 

  • Hi Hung Bui,

    Could you tell a little bit more about the NoMe_dfu_nrf52833_xxAA_s113_7.0.1 application you used ?

    =====it means that just use to update other node, just relay (except local node), built from ../examples/dfu/dfu_nrf52833_xxAA_s113_7_0_1.emProject

    static bool fw_updated_event_is_for_me(const nrf_mesh_evt_dfu_t * p_evt)
    {
        switch (p_evt->fw_outdated.transfer.dfu_type)
        {/*
            case NRF_MESH_DFU_TYPE_APPLICATION:
                return (p_evt->fw_outdated.current.application.app_id == p_evt->fw_outdated.transfer.id.application.app_id &&
                        p_evt->fw_outdated.current.application.company_id == p_evt->fw_outdated.transfer.id.application.company_id &&
                        p_evt->fw_outdated.current.application.app_version < p_evt->fw_outdated.transfer.id.application.app_version);
            case NRF_MESH_DFU_TYPE_BOOTLOADER:
                return (p_evt->fw_outdated.current.bootloader.bl_id == p_evt->fw_outdated.transfer.id.bootloader.bl_id &&
                        p_evt->fw_outdated.current.bootloader.bl_version < p_evt->fw_outdated.transfer.id.bootloader.bl_version);
            case NRF_MESH_DFU_TYPE_SOFTDEVICE:
                return false;
    */
            default:
                return false;
        }
    Which application id you used for the node  ?
    which application version ? 
    =====       
    "bootloader_id": 1,                                            
    "bootloader_version": 1,
    "application_id": 1,                                            
    "application_version": 1,
    When you do "nrfutil --verbose dfu serial -pkg V0511_V2.zip -p COM5 -b 115200 -fc --mesh" would the EV board be updated to the V0511_V2 firmware in the application ? 
    =====No , just as I said above,   EV board just use to relay
    We had some bug fix regarding DFU in SDK v4.2 and v5.0 , could you let us know which SDK you are using? 
    =========MESH SDK V4.2.0 
  • I think the fact that the EV firmware doesn't get updated was the reason why it advertise the current firmware and that's why the custom board entered relay mode (because the EV firmware is the earlier version compare to the custom board).

    If you let the EV firmware get updated , do you see the issue ? 

    If you don't plan to update the firmware of the EV, I would suggest to try changing the application id of the EV firmware to different application id from the custom board. 

Related