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

Configuring and performing DFU over Mesh

I have a question about how to perform DFU over Mesh.

I'm using nRF52840 device.

Following the steps at the URL below (Configuring and performing DFU over Mesh), I'm trying Mesh DFU which is a combination of Mesh5.0 s140_7.2.0.

 

[URL]

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.0.0%2Fmd_doc_libraries_dfu_dfu_quick_start.html

 

But, I could not generate a DFU file on Step 1(Generate a DFU archive with nrfutil).

At that time, I got some errors.

Could you please tell me why I could not generate the DFU file ?

I explain details of the problem at the follows.

 

[the problem]

When I tried to generate a DFU file with "blinky_nrf52840_xxAA_s140_7.2.0.hex"

in the located of "nrf5_SDK_for_Mesh_v5.0.0_src\bin\blinky",

I got the following error:

 

"pc-nrfutil\nordicsemi\intelhex\__init__.py", line 342, in _tobinarray_really raise ValueError("tobinarray: wrong value for size")

ValueError: tobinarray: wrong value for size

 

In order to analyze the above problem,

I tried to perform which is a combination of Mesh4.2,following the steps at the URL.

And then, it worked fine.

So, I compared "blinky_nrf52840_xxAA_s140_7.2.0.hex" with "blinky_nrf52840_xxAA_s140_7.0.1.hex"

that has used as the update application of Mesh 4.2.

The file structure and the mapped address look very different.

I guess that "blinky_nrf52840_xxAA_s140_7.2.0.hex" has some problem.

That's why I could not generate the DFU file.

Please tell me your opinion.

 

Thanks in advance.

Parents
  • Hi Kunny, 
    I had a look at the file and it seems that the first line was missing or it doesn't follow Intelhex format properly. 

    Please try to test again using any example that you compile to work with S140 v7.2.0. You can modify blinky example in nRF5 SDK so that it work with S140 softdevice to test. 
    I attached here the .hex file that I compiled using the blinky example in the \nRF5_SDK_17.0.2_d674dde\examples\peripheral\blinky\ folder (with modification of start address so that it works with the softdevice) 

    Please test using this image. 

    1832.blinky_pca10056.hex

  • Hi Hung Bui,

    Thanks to you,
    I could generate the DFU file using "1832.blinky_pca10056.hex" that you sent.
    And then, Mesh DFU which is a combination of Mesh5.0 and s140_7.2.0 worked fine.
    Thank you for your co-operation.

    I have another question as follows.

    [Q1]
    I could performed Mesh DFU which is a combination of Mesh5.0 and s140_7.2.0 using sample hex file "1832.blinky_pca10056.hex".
    Next, I'm going to perform Mesh DFU using hex file(update application) that I created.
    So I have a question about how to create that hex file(update application).
    Are there any restrictions on creating a hex file?
    For example, there are restrictions such as memory mapping.
    If there are any restrictions, could you please tell me the specification for their restrictions.
    If you have any reference documents, please let me know.

    Basically, I understand that I can create an updated firmware by following the firmware configuration below that is used when checking the operation of Mesh DFU (tutorial).
    So, I will add the necessary code based on "dfu_nrf52840_xxAA_s140_7_2_0.emProject" in the located of "nrf5_SDK_for_Mesh_v5.0.0_src\examples\dfu".

    [Q2]
    I think there are two way to perform mesh DFU.
    It is the way of serial interface and Bluetooth interface.
    I already executed mesh DFU using serial interface.
    So, I want to try to perform mesh DFU using Bluetooth interface.
    Do you have any sample program to perform mesh DFU using Bluetooth interface?
    If it is not available now, do you have plan to release such a sample program?

    Thanks in advance.
    Kunny

  • Hi Kunny,

    Any application that's configured for the same softdevice on the mesh board can be used. Basically it just need to have correct start address in flash (right after the softdevice). 
    But be aware that, if the application doesn't have DFU support included in the firmware, you can't do a DFU after you update the firmware. For example the blinky hex file I provided. You can't update it to another firmware after you update blinky because blinky doesn't have any DFU support in the code. 
    You would need to refer to the dfu_nrf52840_xxAA_s140_7_2_0.emProject project example and implement the same into your application. 

    2. No there currently no Mesh DFU over BLuetooth. If you want to have BLE DFU (which is not mesh) you would need to remove the mesh bootloader and flash the BLE bootloader. But when you do that you can only update one node at a time and have to go to each node to do DFU. When with mesh DFU you just need to send the image to one node via UART then it will be distributed to the whole network. 

    It's possible to implement your own proprietary protocol to send the image via BLE and then have the image be distributed to the whole mesh network. But we don't have such example available. 

  • Hi Hung Bui,

    Thank you for your explanation.

    I will follow your explanation and try running Mesh DFU using the hex file (update application) that I created.

    Thank you for your co-operation,

    Kunny

Reply Children
No Data
Related