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

Mesh DFU Relay Problem

Hi ,

     I have tested two boarrds(PCA10040) with  same application id and higher application version,These work  well done.Then I want to test mesh DFU Relay function,However ,the target board does not upgrade.

    Prepare: Name two boards, Board A which is connected to pc,acts as source ,Board B which is the targect to upgrade using mesh  .

   The follow is what i do:

   (1) To generate Device Page with config  "application_id": 1,"application_version": 1, .Using it to program Board   as mesh dfu guide .

   (2)To generate Device Page with config  "application_id": 2,"application_version": 1, .Using it to program Board  B  as mesh dfu guide .

 (3)To generate DFU file with command  :nrfutil dfu genpkg --application ... using config  "application_id": 2,"application_version": 2, 

   (4)Then ,Baord A connect PC with USB serial. Board B is just supplied power .Using command: nrfutil --verbose dfu serial -pkg ... to start mesh dfu.

   The result is:

     At the first few seconds ,both boards  go to dfu with LED 0and LED2 be lighted, A few mnutes later ,Baords B ends dfu with LED 0and Led1 be lighted . and Board A is still going with dos  windows shows rate of progress.About an hour later ,the dfu transport for Baord A is done,Even I still wait for another nearly one hour, However Board B is still not be upgarded.

  I check the Board B's final ending RTT log:

......

0> <t: 16666007>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
0> <t: 16666010>, nrf_mesh_dfu.c, 333, Flash idle.
0> <t: 16688463>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 6, count 3, interval: exponential, handle: FFFC
0> <t: 16688479>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
0> <t: 16688483>, nrf_mesh_dfu.c, 333, Flash idle.
0> <t: 16700264>, nrf_mesh_dfu.c, 383, Abort event. Reason: 0x3
0> <t: 16700267>, main.c, 175, Mesh DFU End !

    The Abort Reason:0x3 is found out in file dfu_types_mesh.h  DFU_END_ERROR_PACKET_LOSS  .  So the relay dfu fail  may be packet loss over RF radio.How  to repair this ? who can give me some advice ? Thanks you.

Best Regards,

Panda.

Parents
  • Hi Panda, 

    Could you post the full log on the B device ? Also please add a breakpoint in the firmware and check if fw_updated_event_is_for_me() return true.

    Please test with a smaller application so the testing time will be shorter, the blinky application for example. 

    I don't see why sending applicaction with the different id to the one connected to PC causing this issue. The issue  DFU_END_ERROR_PACKET_LOSS   happens when the segments missing are >64 segments. 

    We need to know if the issue can be reproduced every time or it only happens from time to time and if it happens on very image or on some particular images. 

  • Hi Hung,

      The below is  Device B's full log :

    0> <t: 903695>, nrf_mesh_dfu.c, 390, New firmware!
    0> <t: 903698>, main.c, 154, Requesting DFU transfer with bank at 0x0004C000
    0> <t: 903701>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    0> <t: 903705>, nrf_mesh_dfu.c, 534, Killing a TX slot prematurely (repeats done: 3).
    0> <t: 903709>, nrf_mesh_dfu.c, 561, SERIAL TX!
    0> <t: 968745>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    0> <t: 968749>, nrf_mesh_dfu.c, 534, Killing a TX slot prematurely (repeats done: 0).
    0> <t: 968753>, nrf_mesh_dfu.c, 561, SERIAL TX!
    0> <t: 1035468>, nrf_mesh_dfu.c, 430, DFU start
    0> <t: 1035471>, main.c, 170, Mesh DFU Start...
    0> <t: 1035474>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 1, count 6, interval: exponential, handle: FFFC
    0> <t: 1041587>, nrf_mesh_dfu.c, 329, Erase complete (0x4C000)
    0> <t: 1041590>, nrf_mesh_dfu.c, 333, Flash idle.
    0> <t: 1101978>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 2, count 3, interval: exponential, handle: FFFC
    0> <t: 1101995>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
    0> <t: 1101998>, nrf_mesh_dfu.c, 333, Flash idle.

    ......

    0> <t: 6693194>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 7, count 3, interval: exponential, handle: FFFC
    0> <t: 6693211>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
    0> <t: 6693214>, nrf_mesh_dfu.c, 333, Flash idle.
    0> <t: 6710839>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
    0> <t: 6710856>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
    0> <t: 6710859>, nrf_mesh_dfu.c, 333, Flash idle.
    0> <t: 6726942>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 2, count 3, interval: exponential, handle: FFFC
    0> <t: 6726958>, nrf_mesh_dfu.c, 324, Write complete (0x2000FE90)
    0> <t: 6726962>, nrf_mesh_dfu.c, 333, Flash idle.
    0> <t: 6743185>, nrf_mesh_dfu.c, 383, Abort event. Reason: 0x3
    0> <t: 6743189>, main.c, 175, Mesh DFU End !

        From the log ,Device B receives the dfu packets.The application size is:147372 bytes. The Device A connected to PC can relay the whole process.

      The Device B's issue happens every time.

       My project use nRF SDK:15.3.0 ,Mesh SDK: 3.2.0 .

      

     If there are any  advice to repair this issue ,Please tell me .

    Best Regards,

    Panda

      

      

  • Hi Hung,

          Do you mean the bootloader can also be builded by SES? just create a booeloader project using SES ,then get the hex ? I will raed he source link you gave above.Thanks

  • Hi Hung,

     Could you give  .emProject and flash_placement.xml for nrf52832 using sdk nRF5_SDK_15.3.0_59ac345 and nrf5_SDK_for_Mesh_v3.2.0_src ?I will try to tansplant since the builded cannot be programed. Thanks.

    Best Regards,

    Panda

  • Hi Panda, 

    Have you tried to compile using cmake ? Please follow the instruction on how to build mesh stack and let me know which issue you have. 

  • Hi Hung,

      PS E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\build> cmake -G Ninja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52832_xxAA -DBOARD=pca10040 -DSOFTDEVICE=s132_6.1.1 ..
    -- Configuring CMake for nRF5 SDK for Bluetooth Mesh 3.2.0
    CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    See also "E:/Project/Mesh_v3.2.0/nrf5_SDK_for_Mesh_v3.2.0_src/build/CMakeFiles/CMakeOutput.log".

     CMake Error happens,how to solve it ? thanks .

Reply
  • Hi Hung,

      PS E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\build> cmake -G Ninja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52832_xxAA -DBOARD=pca10040 -DSOFTDEVICE=s132_6.1.1 ..
    -- Configuring CMake for nRF5 SDK for Bluetooth Mesh 3.2.0
    CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    See also "E:/Project/Mesh_v3.2.0/nrf5_SDK_for_Mesh_v3.2.0_src/build/CMakeFiles/CMakeOutput.log".

     CMake Error happens,how to solve it ? thanks .

Children
  • Hi Hung,

        I have read the link content you gave above. When I go on This link STEP 1. It happens some warning as below document :

          

    E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\mesh\bootloader\build>cmake -G Ninja ..
    -- The C compiler identification is GNU 6.3.0
    -- The CXX compiler identification is GNU 6.3.0
    -- Check for working C compiler: C:/MinGW/bin/gcc.exe
    -- Check for working C compiler: C:/MinGW/bin/gcc.exe - works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/MinGW/bin/c++.exe
    -- Check for working CXX compiler: C:/MinGW/bin/c++.exe - works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: E:/Project/Mesh_v3.2.0/nrf5_SDK_for_Mesh_v3.2.0_src/mesh/bootloader/build
    
    E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\mesh\bootloader\build>cmake -G Ninja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52832_xxAA ..
    -- The C compiler identification is GNU 6.3.0
    -- The CXX compiler identification is GNU 6.3.0
    -- Check for working C compiler: C:/MinGW/bin/gcc.exe
    -- Check for working C compiler: C:/MinGW/bin/gcc.exe - works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/MinGW/bin/c++.exe
    -- Check for working CXX compiler: C:/MinGW/bin/c++.exe - works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        PLATFORM
        TOOLCHAIN
    
    
    -- Build files have been written to: E:/Project/Mesh_v3.2.0/nrf5_SDK_for_Mesh_v3.2.0_src/mesh/bootloader/build
    
    
    E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\mesh\bootloader\build>cmake -G Ninja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52832_xxAA -DBOARD=pca10040 -DSOFTDEVICE=s132_6.1.1 ..
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        BOARD
        SOFTDEVICE
    
    
    -- Build files have been written to: E:/Project/Mesh_v3.2.0/nrf5_SDK_for_Mesh_v3.2.0_src/mesh/bootloader/build
    
    E:\Project\Mesh_v3.2.0\nrf5_SDK_for_Mesh_v3.2.0_src\mesh\bootloader\build>

          I have added two lines :cmake_minimum_required(VERSION 3.17)
    project (mesh_bootloader) to CMakeLists.txt under path: ...\nrf5_SDK_for_Mesh_v3.2.0_src\mesh\bootloader.

          Is the "build "file path is right?How to solve the warning ? Does it need to use ...\nrf5_SDK_for_Mesh_v3.2.0_src\CMake files? Please give me some help ,thanks in advance.

    Best Regards,

    Panda

  • I would suggest testing of building a normal example first. Just follow what in the documentation. 


    After you call cmake -G Ninja ..................
    You need to call "ninja" to actually build the hex file. 

    You don't need to make the build folder inside the bootloader location. 

Related