DFU Mesh serial not working

Hello, 

I'm trying to use mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex with my custom app based on light switch example. 

I'm working with nrf_mesh_sdk 5.0. nRF52832 and devkit.

I'm programming with : 

nrfjprog --eraseall 
mergehex --merge "nrf5_SDK_for_Mesh_v5/bin/softdevice/s132_nrf52_7.2.0_softdevice.hex" "nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex" --output "SD_BL.hex"
mergehex --merge "SD_BL.hex" "myapp_nrf52832_xxAA_s132_7.2.0.hex" --output "SD_BL_APP.hex"
nrfjprog --program "SD_BL_APP.hex" --family NRF52 --chiperase
nrfjprog --reset


My app is working but the bootloader is not started. 

I tried and read all your documentations. The application starts but the bootloader does not. The start address for the application flash is 0x26000 and the bootloader starts at 0x78000.

I don't have any programming errors except when I try to program the setting.hex that I generate with nrfutil settings generate.


Why is my bootloader never called? I put logs and a delay without success.

Thank you 

Parents Reply Children
  • Yes I tried the dfu_no_serial and dfu_serial example from your folder and it works. But when I copy paste the code I embed in light_switch it doesn't work. My goal is to integrate the DFU background mesh code into the light_switch code.

    Besides, the bootloader_verify.py script does not return a positive return.

    Is something stuck?


    nrfjprog --eraseall 
    python bootloader_verify.py <myserialnumber> <myserialport>
    nrfjprog --program "device_page_nrf52832_xxAA_s132_7.2.0.hex"
    nrfjprog --program "nrf5_SDK_for_Mesh_v5/bin/softdevice/s132_nrf52_7.2.0_softdevice.hex" 
    nrfjprog --program "nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex"
    nrfjprog --program "light_switch_server_nrf52832_xxAA_s132_7.2.0_Debug/light_switch_server_nrf52832_xxAA_s132_7.2.0.hex"
    nrfjprog --reset


    I copied and pasted the DFU functions from the dfu_serial code into the light_switch code.

    The application works but the DFU does not start. And the bootloader obviously does not work

    Thank you in advance !

  • Hi Nabil, 
    Please clarify that by using dfu_serial  you have managed to update the mesh node and other nodes in the network. 

    How did you modify the light_switch example ? Have you included all the functions called in mesh_evt_handler() ? If you plan to receive the update via serial , in the preprocessor symbol you need to define NRF_MESH_SERIAL_ENABLE. You will also need to include serial library nrf_mesh_serial.c  . Please refer to the dfu example. 

    When you say it doesn't work, what exactly didn't work ? Which error you receive ? 

  • Thank you, 


    I don't need the serial connexion. In my case I have a mesh network and I want to do a DFU update via wireless connectivity. I say it doesn't work because my devkit connected to my pc is receiving dfu packets and segments fine but the remote devkit are not moving.

    If I don't use the serial what are the steps to integrate correctly in light switch? To be sure everything is done correctly

    in my case the "mesh_evt_handler" function is added in light_switch but something doesn't works

    Thanks for your help !

  •  

    In the code I have on the remote DEVKIT I have an error while initializing DFU commands. So that is exactly why I ask you my question. The way I program doesn't work for the bootloader. The app is ok but the bootloader is not. How can I program both app and booloader : light_switch example and nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/

    I got this error : 

    if (BOOTLOADERADDR() == 0xFFFFFFFF)
        {
            /* No bootloader present. */
             __LOG(LOG_SRC_DFU, LOG_LEVEL_ERROR, "dfu_cmd_handler_set : NRF_ERROR_NOT_SUPPORTED!\n");
            return NRF_ERROR_NOT_SUPPORTED;
        }


    Thank you for your help 

  • Hi Nabil, 
    Before moving any further, please clarify if you have managed to do a DFU with the dfu_no_serial and dfu_serial example ? 
    Please use one board with serial that receive the image, and one board with dfu_no_serial and then confirm that the dfu_no_serial get updated to a new firmware. 

    When you program the hex files, please use the command one by one , don't use the script. And check the result of nrfjprog. please copy the full log here. 

Related