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
  • Hi Nabil, 

    I meant you can do DFU when you application running with the bootloader not without the bootloader. The bootloader and the application work at the same time. You need to flash the bootloader. 


    You just need to follow what we have in the \examples\dfu  example and flash the bootloader. 


    Have you tried to follow the instruction in the link I sent ? 

Children
  • Exactly but it doesn't work with light switch. Do you have a list of command to program the light switch example with DFU and the bootloaders ? 

    The start address for the application flash is 0x26000 and the bootloader starts at 0x78000.

  • Hi Nabil, 
    Have you tried to test with the \examples\dfu  and managed to update the firmware ? 

  • 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 !

Related