Issue doing DFU over BLE mesh: Setup, 1 target board: nrf52840 dev kit+s140+Mesh 2.0.1+NRF SDK 15.0.0

I'm attempting Mesh DFU on an Ubuntu 16.04 system. Here are the steps in the quick start guide along with corresponding notes on my setup:

nrfutil keys --gen-key private_key.txt         -> Key stored in the mesh src code home directory - .../nrf5_SDK_for_Mesh_v2.0.1_src/private_key.txt

nrfutil keys --show-vk hex private_key.txt  -> Stored public key in .json file: .../nrf5_SDK_for_Mesh_v2.0.1_src/tools/dfu/bootloader_config_default.json (application version = 1)

DFU package generation: (a) Modifed  in examples/dfu/flash_placement.xml, modifed line 32 to <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_SIZE)">                  

(b) At .../nrf5_SDK_for_Mesh_v2.0.1_src, ran mkdir build; cd build; cmake -GNinja -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52840_xxAA ..; ninja to build my examples.

(c) I verified on nRFGo Studio the softdevice for s140 shows up as 0x00A9.

Using that I generated the DFU package and device page for beaconing example application as follows:

nrfutil dfu genpkg --application ~/Nrf_sdk_code_base/nrf5_SDK_for_Mesh_v2.0.1_src/build/examples/beaconing/beaconing_nrf52840_xxAA_s140_6.0.0.hex     --company-id 0x00000059     --application-id 1     --application-version 5     --key-file /home/shubhangi/Nrf_sdk_code_base/nrf5_SDK_for_Mesh_v2.0.1_src/private_key.txt --sd-req 0x00A9 --mesh ~/Nrf_sdk_code_base/nrf5_SDK_for_Mesh_v2.0.1_src/examples/beaconing/dfu_test4.zip.

python3 device_page_generator.py -d nrf52840_xxAA -sd "s140_6.0.0"

(d) On my target board, I ran  (since my board is not connected to an active serial port I flashed the DFU application with no serial).

nrfjprog --eraseall; nrfjprog --program bin/softdevice/s140_6.0.0/s140_nrf52_6.0.0_softdevice.hex --chiperase; nrfjprog --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52840_xxAA.hex; ./nrfjprog --program .../nrf5_SDK_for_Mesh_v2.0.1_src/build/examples/dfu/dfu_no_serial_nrf52840_xxAA_s140_6.0.0.hex; ./nrfjprog --program .../nrf5_SDK_for_Mesh_v2.0.1_src/tools/dfu/bin/device_page_nrf52832_xxAA_s132_5.0.0.hex; ./nrfjprog --reset

Finally, to perform the DFU, on a second development board (/dev/ttyACM1, on which I did not flash the software as above) connected to my PC, I ran 

nrfutil --verbose dfu serial -pkg ~/Nrf_sdk_code_base/nrf5_SDK_for_Mesh_v2.0.1_src/examples/beaconing/dfu_test4.zip -p /dev/ttyACM1 -b 115200 -fc --mesh

And here is the log:
Upgrading target on /dev/ttyACM1 with DFU package /home/shubhangi/Nrf_sdk_code_base/nrf5_SDK_for_Mesh_v2.0.1_src/examples/beaconing/dfu_test4.zip. Flow control is enabled.
[------------------------------------] 0%Flushing com-port...
Opened com-port
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 123996
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd

Failed to upgrade target. Error is: Failed to establish connection

I  also pressed button 4 and reset together to ensure target is in DFU. I'm not sure what other steps to try. Please help

Best regards,

Shubhangi

Parents
No Data
Reply
  • Hi,

    You need to download all the firmware (steps 5 through 9) also for the board that you use for performing the DFU from.

    The use case is that you have a number of nodes, and then you connect to one of those nodes over serial in order to upgrade the full network (including the node that you connect to.)

    Regards,
    Terje

Children