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

OTA Mesh DFU Example

I see there is a serial bootloader dfu example, however I am unable to find an OTA Mesh DFU example.

How can I exercise the Mesh DFU OTA (not via serial connection) in side-by-side mode?

Is the DFU quick start guide in the info center supposed to use a usb-serial device (nRF52 PCA11040 in my case) to actually issue the Mesh OTA update to a non-serial device?  It looks like that may be the case, but it isn't clear to me.

Also, the instructions provided by DFU quick start guide in the info center for nrfutil seem to be incorrect, as I get the following errors for the various commands:

Error: no such option: --company-id

Error: No such command "genpkg".

Error: no such option: --mesh

In the end, I need to OTA update devices in a mesh network.  My device issuing the update will be a linux iot gateway on the mesh network.
I'm looking for a nordic example to use as a basis for that development (and to test the mesh bootloader on my devices).
A python script, C-code, flow chart, etc would be useful.

Thanks!

Parents
  • In the quick start guide, the example for creating the DFU archive for nrf52832_xxAA_s132_6.0.0 has the --sd-req parameter as 0x009D.

    For nRF52:
    mesh-sdk$ nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.0.0.hex \
        --company-id 0x00000059 \
        --application-id 1 \
        --application-version 2 \
        --key-file private_key.txt \
        --sd-req 0x009D \
        --mesh dfu_test.zip

    Is this correct?  Looking at the python script, shouldn't it be 0x00A8?

                       '\n|s132_nrf52_5.0.0|0x9D|'
                       '\n|s132_nrf52_5.1.0|0xA5|'
                       '\n|s132_nrf52_6.0.0|0xA8|'
                       '\n|s132_nrf52_6.1.0|0xAF|'

    I'm still having trouble getting the serial DFU work correctly.
    When I run the nrfutil
     dfu serial command on my mac, it hangs here:

      [------------------------------------]    1%  0d 00:11:50

    When I run on windows, i get:

    [------------------------------------] 1% 00:11:48

    Failed to upgrade target. Error is: Device returned status code ERROR_INVALID_DATA (135) on a DFU data packet.

    I'm using the prebuilt hex files in the mesh SDK for the serial bootloader and dfu example.

    The only thing different is that I've used our company id in the data page generation and in the dfu archive generation.

  • Hi.

    Yes, it should be 0x00A8 if you have SoftDevice S132 version 6.0.0. --sd-req have to match the SoftDevice version. I think this is a typo in the dfu quick start guide.

    I think this is the reason the DFU failed.

    Mesh DFu does not work outside of a provisioned mesh network. This is because of what provisioning does:

    - The devices know each other exists.

    - The devices share an encryption key.

    - Andreas

Reply
  • Hi.

    Yes, it should be 0x00A8 if you have SoftDevice S132 version 6.0.0. --sd-req have to match the SoftDevice version. I think this is a typo in the dfu quick start guide.

    I think this is the reason the DFU failed.

    Mesh DFu does not work outside of a provisioned mesh network. This is because of what provisioning does:

    - The devices know each other exists.

    - The devices share an encryption key.

    - Andreas

Children
No Data
Related