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

mesh DFU issue light switch

Hi All,

I'm working with Nordic BLE Mesh and trying DFU (OTA) provided in sdk DFU_Experiment.rarfor Mesh.

 

I used \doc\getting_started\dfu_quick_start.md as the guide to setup and test DFU. Below are the steps I used for setup and testing.

 

One Time Setup:

1)  nrfutil for mesh DFU.

2)  DFU Page settings and HEX as per instructed in guide.

  1.     a)  Add public key in json.
  2.     b)  Generating HEX: python device_page_generator.py -d nrf52840_xxAA -sd "s140_6.1.0".

 

Test is done as follows:

1) With only serial Node.
2) With 1 Serial node and 1 Mesh node.

* 2 nRF52840-DK (PCA10056) are used.

* All Hex files are from MESH examples provided by Nordic. No change in codes has been done for testing.

* All files (batch files, HEX files and error log) can be found in attachment.

* Soft-Device s140_nrf52_6.1.0 and Size : 423KB

 

Test 1:

1)  Run : dfu_setup.bat for both serial and mesh.

2)  Run : dfu_blinky.bat for serial node.

3)  Result : DFU Success for both.

* Hex File Size : 6KB.


Test 2:

1)  Run : dfu_setup.bat for both serial and mesh.

2)  Run : dfu_serial.bat for serial node.

3)  Result : DFU Success for both.

* Hex File Size : 232KB.

 

Test 3:

1)  Run : dfu_setup.bat for both serial and mesh.

2)  Run : dfu_on_off.bat for serial node.

3)  Result : DFU Fail for both.

* Hex File Size : 324KB.

 

Test 4:

1)  Run : dfu_setup.bat for both serial and mesh.

2)  Run : dfu_dimming.bat for serial node.

3)  Result : DFU Fail for both.

* Hex File Size : 337KB.

 

Error message for both test 3 and 4 are similar.

Parents
  • Hi Pavan, 

    Could you tell if you used SDK v3.2 ? We fixed some issues with the larger DFU image update in SDK v3.2 

    Could you send the RTT log in the serial (or non serial) node ? 

    From what you showed, it's most likely complaining about the size of the image that it couldn't fit into the swap bank. However with the nRF52840 it should be enough space for the ~120kB image. 

    Note that the hex file doesn't represent the size of the actual binary image. You can use arm-none-eabi-size.exe tool to find the actual image size from an .out or .elf file. (you can also look in to the .zip file to find the size of the .bin file) 

  • hi Hung here is customer response

    - Could you tell if you used SDK v3.2 ? We have fixed some issues with the larger DFU image update in SDK v3.2

    • We are using Mesh SDK v3.1; I'll try to look into v3.2 or v4.0.
    • Will BLE SDK version and SD version also have impact? I'm using SD140 v6.1.0.

     - Could you send the RTT log in the serial (or non serial) node ?

    • Please find the attached file for RTT logs.
    • Logs are taken with Log Level @LOG_LEVEL_DBG3.

    -  From what you showed, it's most likely complaining about the size of the image that it couldn't fit into the swap bank. However with the nRF52840 it should be enough space for the ~120kB image. 

    • Following is the data from one of the files which failed:
    •    text         data    bss        dec          hex     filename
    •  113252     796  183060  297108   48894   LCC.elf

    I have one more question:

    • The DFU for BLE can work with just boot-loader or application with DFU trigger or even if the application is not updated properly.
    •  While with BLE MESH DFU, we found that DFU is not possible via BLE or BLE Mesh with just boot-loader, and we need to have an application which will actually do DFU instead of boot-loader.

    tks

    gaurav

    <t:          1>, main.c,  206, ----- Bluetooth Mesh DFU Example -----
    <t:          4>, main.c,  215, rom_base   26201
    <t:          6>, main.c,  216, rom_end    3E198
    <t:          8>, main.c,  217, rom_length 17F97
    <t:         10>, main.c,  218, bank_addr   3F000
    <t:      12356>, serial_handler_prov.c,  267, Generating encryption keypair...
    <t:      17301>, main.c,  224, Initialization complete!
    <t:      22103>, main.c,  245, Enabling serial interface...
    <t:      22106>, mesh_app_utils.c,   65, Device UUID (raw): 19BB8936BC5E0B4A8C851FF08399DEDE
    <t:      22109>, mesh_app_utils.c,   70, Device UUID : 3689BB19-5EBC-4A0B-8C85-1FF08399DEDE
    <t:      22116>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    <t:      22121>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:      22127>, main.c,  253, DFU example started!
    <t:     317798>, nrf_mesh_dfu.c,  390, 	New firmware!
    <t:     317801>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    <t:     317805>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 1).
    <t:     317809>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:     384001>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    <t:     384006>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
    <t:     384009>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:     449892>, nrf_mesh_dfu.c,  383, 	Abort event. Reason: 0xD
    <t:     449895>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    <t:     449899>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 19).
    <t:     449903>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    

Reply
  • hi Hung here is customer response

    - Could you tell if you used SDK v3.2 ? We have fixed some issues with the larger DFU image update in SDK v3.2

    • We are using Mesh SDK v3.1; I'll try to look into v3.2 or v4.0.
    • Will BLE SDK version and SD version also have impact? I'm using SD140 v6.1.0.

     - Could you send the RTT log in the serial (or non serial) node ?

    • Please find the attached file for RTT logs.
    • Logs are taken with Log Level @LOG_LEVEL_DBG3.

    -  From what you showed, it's most likely complaining about the size of the image that it couldn't fit into the swap bank. However with the nRF52840 it should be enough space for the ~120kB image. 

    • Following is the data from one of the files which failed:
    •    text         data    bss        dec          hex     filename
    •  113252     796  183060  297108   48894   LCC.elf

    I have one more question:

    • The DFU for BLE can work with just boot-loader or application with DFU trigger or even if the application is not updated properly.
    •  While with BLE MESH DFU, we found that DFU is not possible via BLE or BLE Mesh with just boot-loader, and we need to have an application which will actually do DFU instead of boot-loader.

    tks

    gaurav

    <t:          1>, main.c,  206, ----- Bluetooth Mesh DFU Example -----
    <t:          4>, main.c,  215, rom_base   26201
    <t:          6>, main.c,  216, rom_end    3E198
    <t:          8>, main.c,  217, rom_length 17F97
    <t:         10>, main.c,  218, bank_addr   3F000
    <t:      12356>, serial_handler_prov.c,  267, Generating encryption keypair...
    <t:      17301>, main.c,  224, Initialization complete!
    <t:      22103>, main.c,  245, Enabling serial interface...
    <t:      22106>, mesh_app_utils.c,   65, Device UUID (raw): 19BB8936BC5E0B4A8C851FF08399DEDE
    <t:      22109>, mesh_app_utils.c,   70, Device UUID : 3689BB19-5EBC-4A0B-8C85-1FF08399DEDE
    <t:      22116>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    <t:      22121>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:      22127>, main.c,  253, DFU example started!
    <t:     317798>, nrf_mesh_dfu.c,  390, 	New firmware!
    <t:     317801>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    <t:     317805>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 1).
    <t:     317809>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:     384001>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
    <t:     384006>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
    <t:     384009>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    <t:     449892>, nrf_mesh_dfu.c,  383, 	Abort event. Reason: 0xD
    <t:     449895>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    <t:     449899>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 19).
    <t:     449903>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    

Children
  • Hi Gaurav, 
    If they are using SDK v3.1, most likely it's the bug I was thinking of. It's fixed in SDK v3.2. We lately released SDK v4.0 I think they should get started with this version. 

    Regarding your question: 

    - What exactly you meant by "DFU for BLE" ? I'm not sure I understand your question.

    - Node that the mesh bootloader doesn't support DFU with BLE (from the phone for example) it only supports Mesh DFU. How did you test the bootloader ? Have you tried to flash only the softdevice and the bootloader ? Note that there are 2 different images for the bootloader, one with and one without serial support. 

  • Hi Hung , answers enclosed

    • What exactly you meant by "DFU for BLE" ?
      • By DFU for BLE I meant using Boot-loader and DFU application for normal BLE provided with BLE SDK and update via DFU App in nRF Toolbox.
    • Note that the mesh bootloader doesn't support DFU with BLE (from the phone for example) it only supports Mesh DFU.
      • Yes I tested this.
    • How did you test the bootloader ? Have you tried to flash only the softdevice and the bootloader ?
      • I flashed only bootloader, and softdevice, and device page to give info for company-id and application-id as they are compared to do DFU.
      • But only the device with DFU application, boot-loader and SD was upgraded via Mesh DFU, and the device with boot-loader and SD did not change.
    • Note that there are 2 different images for the bootloader, one with and one without serial support. 
      • I have tried with both.
      • Serial boot-loader was programmed with the unit used as DFU source.
      • 1 with serial and 1 without serial support for other 2 nodes, but unless I also add DFU example or similar application, it do not upgrade Mesh DFU.

     Pls advise thanks Gaurav

  • So as far as I know, the only mesh bootloader that support DFU via a phone is the bootloader for the Low Power Node. 

    I would need to double check if the bootloader can work as a stand alone application. By design it should work. It's the backup when the application crashes and switch back to bootloader to get updated.

  • Hung customer Says

    Hi Gaurav, Thanks for the response. I'll check and let you know if I have any more doubts. Regards,

    Prateek Jindal ,

    so you can close this ticket as of now cheers

Related