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

nRF52 Mesh DFU questions

Hello everybody,

I am trying to exercise the DFU for mesh following the DFU quick start guide (v2.0.1). To put you in context I have four nRF52840 devkits, three of them are running the light_switch example (provisioner, client and server) and if I understand correctly the fourth one will have the DFU example with serial support. My purpose is to be able to update at least the server and client applications using the mesh network. A couple of questions have arise from the guide:

1. In the step three I need to generate the zip file containing the update, Should I generate one for each application (server/client) with different application-id and an application-version greater that 1?, in addition to this I am assuming that I need to generate a device page (step four) for each device modifying the JSON accordingly.

2. What is the correct value for the --sd-req parameter in this last two steps? I am using softdevice s140_v6.0.0 and I found that the value is 0x00A9, Is this correct?

3. On step seven I am flashing the same bootloader on all four devices with path ...\nrf5_SDK_for_Mesh_v2.0.1_src\bin\bootloader\armcc\mesh_bootloader_serial_armcc_nrf52840_xxAA.hex. Is this correct?

4. Should I flash the devices that will not be connected to a serial interface with ...\nrf5_SDK_for_Mesh_v2.0.1_src\bin\bootloader\armcc\mesh_bootloader_armcc_nrf52840_xxAA.hex?

5. On step eight there is an IMPORTANT message, I am not able to find the build/examples/dfu/dfu_no_serial_<target>_<SoftDevice>.hex mentioned there. Also I don't want all my devices to have the DFU example, only the one that will be connected to the computer and will receive the image to propagate, or am I understanding this the wrong way.

6. After I flash all the devices I can provision the client and the server, but the DFU doesn't join the network I only see the UUID that the provisioner receives. After provisioning, with the purpose of testing, I try to execute the command nrfutil --verbose dfu serial -pkg bin\lss-3_2.zip -p com4 -b 115200 -fc --mesh` this is the zip file containing the light switch server update, I receive a couple of errors in the terminal and also errors on the RTT Viewer for the DFU devkit. I am attaching all the logs:

- Provisioner:

<t:         54>, main.c,  550, ----- BLE Mesh Light Switch Provisioner Demo -----
<t:         57>, mesh_softdevice_init.c,  112, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   77, Enabling BLE...
<t:          2>, mesh_softdevice_init.c,   88, Ram base: 0x200032C8
<t:        628>, main.c,  488, Initializing and adding models
<t:        639>, main.c,  531, Setup defaults: Adding keys, addresses, and bindings
<t:        820>, provisioner_helper.c,  329, netkey_handle: 0
<t:        833>, main.c,  578, <start>
<t:      27308>, main.c,  117, Flash write complete
<t:      27310>, main.c,  565, Starting application ...
<t:      27313>, main.c,  567, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
<t:      27317>, main.c,  568, Dev key : 89DCF36FB3CF39528D04DF753A9CC4C6
<t:      27319>, main.c,  569, Net key : F4DDEECF26C9582860275E9C1606C1A8
<t:      27322>, main.c,  570, App key : 15E01D1155AAAE1CBF88D79D085C4D68
<t:      27325>, main.c,  571, <t:    2180003>, main.c,  448, Button 1 pressed
<t:    2180005>, main.c,  361, Waiting for Client node to be provisioned ...
<t:    2184752>, provisioner_helper.c,  282, Scanning For Unprovisioned Devices
<t:    6409939>, provisioner_helper.c,  144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
<t:    6409942>, provisioner_helper.c,   95, UUID filter matched
<t:    6410660>, provisioner_helper.c,  259, Provisioning link established
<t:    6423376>, provisioner_helper.c,  254, Static authentication data provided
<t:    6435506>, provisioner_helper.c,  192, Provisioning completed received
<t:    6435509>, provisioner_helper.c,  197, Adding device address, and device keys
<t:    6435514>, provisioner_helper.c,  214, Addr: 0x0100 addr_handle: 0 netkey_handle: 0 devkey_handle: 2
<t:    6438727>, provisioner_helper.c,  155, Local provisioning link closed: prov_state: 2  remaining retries: 2
<t:    6438732>, main.c,  282, Provisioning successful
<t:    6438734>, provisioner_helper.c,  181, Provisioning complete. Node addr: 0x0100 elements: 5
<t:    6438738>, node_setup.c,  672, Configuring Node: 0x0100
<t:    6438741>, node_setup.c,  586, Config client setup: devkey_handle:2 addr_handle:0
<t:    6438744>, node_setup.c,  361, Getting composition data
<t:    6438785>, main.c,  117, Flash write complete
<t:    6492270>, main.c,  332, Config client event
<t:    6492273>, node_setup.c,  371, Adding appkey
<t:    6496039>, main.c,  332, Config client event
<t:    6496041>, node_setup.c,  234, Unexpected opcode: exp 0x8003  rx 0x0002
<t:    6497872>, main.c,  332, Config client event
<t:    6497874>, node_setup.c,  272, opcode status field: 0
<t:    6497877>, node_setup.c,  382, App key bind: Health server
<t:    6498766>, main.c,  332, Config client event
<t:    6498769>, node_setup.c,  272, opcode status field: 0
<t:    6498771>, node_setup.c,  450, Setting publication address for the health server to 0x0001
<t:    6501836>, main.c,  332, Config client event
<t:    6501839>, node_setup.c,  272, opcode status field: 0
<t:    6501841>, node_setup.c,  416, App key bind: Simple On/Off client on element 0x0101
<t:    6503784>, main.c,  332, Config client event
<t:    6503786>, node_setup.c,  272, opcode status field: 0
<t:    6503789>, node_setup.c,  416, App key bind: Simple On/Off client on element 0x0102
<t:    6504504>, main.c,  332, Config client event
<t:    6504507>, node_setup.c,  272, opcode status field: 0
<t:    6504509>, node_setup.c,  416, App key bind: Simple On/Off client on element 0x0103
<t:    6505434>, main.c,  332, Config client event
<t:    6505437>, node_setup.c,  272, opcode status field: 0
<t:    6505439>, node_setup.c,  416, App key bind: Simple On/Off client on element 0x0104
<t:    6506112>, main.c,  332, Config client event
<t:    6506115>, node_setup.c,  272, opcode status field: 0
<t:    6506118>, node_setup.c,  301, Set: on/off client: 0x0101  pub addr: 0x0105
<t:    6509698>, main.c,  332, Config client event
<t:    6509701>, node_setup.c,  272, opcode status field: 0
<t:    6509703>, node_setup.c,  301, Set: on/off client: 0x0102  pub addr: 0x0106
<t:    6513756>, main.c,  332, Config client event
<t:    6513758>, node_setup.c,  272, opcode status field: 0
<t:    6513761>, node_setup.c,  301, Set: on/off client: 0x0103  pub addr: 0xC003
<t:    6518222>, main.c,  332, Config client event
<t:    6518224>, node_setup.c,  272, opcode status field: 0
<t:    6518227>, node_setup.c,  301, Set: on/off client: 0x0104  pub addr: 0xC002
<t:    6522657>, main.c,  332, Config client event
<t:    6522659>, node_setup.c,  272, opcode status field: 0
<t:    6522662>, main.c,  248, Configuration of device 0 successful
<t:    6522665>, provisioner_helper.c,  282, Scanning For Unprovisioned Devices
<t:    6522699>, main.c,  117, Flash write complete
<t:    6828343>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    7155986>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    7483557>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:    7811314>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    8139228>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    8466735>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:    8794325>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    9122427>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:    9450152>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:    9777808>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -59
<t:    9983367>, provisioner_helper.c,  144, UUID seen: 0059FFFF000000000C63B607528DC9A6
<t:    9983370>, provisioner_helper.c,   95, UUID filter matched
<t:    9984289>, provisioner_helper.c,  259, Provisioning link established
<t:    9997027>, provisioner_helper.c,  254, Static authentication data provided
<t:   10009390>, provisioner_helper.c,  192, Provisioning completed received
<t:   10009393>, provisioner_helper.c,  197, Adding device address, and device keys
<t:   10009398>, provisioner_helper.c,  214, Addr: 0x0105 addr_handle: 1 netkey_handle: 0 devkey_handle: 3
<t:   10012912>, provisioner_helper.c,  155, Local provisioning link closed: prov_state: 2  remaining retries: 2
<t:   10012917>, main.c,  282, Provisioning successful
<t:   10012920>, provisioner_helper.c,  181, Provisioning complete. Node addr: 0x0105 elements: 1
<t:   10012923>, node_setup.c,  672, Configuring Node: 0x0105
<t:   10012927>, node_setup.c,  586, Config client setup: devkey_handle:3 addr_handle:1
<t:   10012930>, node_setup.c,  361, Getting composition data
<t:   10013016>, main.c,  117, Flash write complete
<t:   10064540>, main.c,  332, Config client event
<t:   10064542>, node_setup.c,  371, Adding appkey
<t:   10067965>, main.c,  332, Config client event
<t:   10067967>, node_setup.c,  272, opcode status field: 0
<t:   10067970>, node_setup.c,  382, App key bind: Health server
<t:   10068933>, main.c,  332, Config client event
<t:   10068936>, node_setup.c,  272, opcode status field: 0
<t:   10068938>, node_setup.c,  397, App key bind: Simple On/Off server
<t:   10069640>, main.c,  332, Config client event
<t:   10069643>, node_setup.c,  272, opcode status field: 0
<t:   10069645>, node_setup.c,  450, Setting publication address for the health server to 0x0001
<t:   10073271>, main.c,  332, Config client event
<t:   10073273>, node_setup.c,  272, opcode status field: 0
<t:   10073276>, node_setup.c,  476, Set: on/off server pub addr: 0x0101
<t:   10077532>, main.c,  332, Config client event
<t:   10077534>, node_setup.c,  272, opcode status field: 0
<t:   10077537>, node_setup.c,  487, Adding subscription
<t:   10104632>, main.c,  332, Config client event
<t:   10104634>, node_setup.c,  272, opcode status field: 0
<t:   10104637>, main.c,  248, Configuration of device 1 successful
<t:   10104640>, provisioner_helper.c,  282, Scanning For Unprovisioned Devices
<t:   10104674>, main.c,  117, Flash write complete
<t:   10105059>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   10399429>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   10433359>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   10617702>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   10683548>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   10726920>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -87
<t:   10749291>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   10760767>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -75
<t:   10815030>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   10880729>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   10946552>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11012374>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11055052>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -80
<t:   11077966>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11088126>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   11143555>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11209350>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11275186>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11340885>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11382447>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   11406514>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11415767>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   11472298>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11538002>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11603798>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11669514>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11709795>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -88
<t:   11735225>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11744096>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -59
<t:   11801081>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11866817>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11932558>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   11998232>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12038136>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -78
<t:   12063872>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12071456>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   12129389>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12195108>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12260721>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12326478>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12365283>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   12392299>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12399476>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   12457863>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12523490>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12589117>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12654855>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12693021>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -89
<t:   12720530>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12726550>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -59
<t:   12786168>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12852027>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12917789>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   12983346>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13021207>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -79
<t:   13048990>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13054377>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   13114507>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13180361>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13246025>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13311583>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13348280>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   13377146>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13382259>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   13442908>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13508555>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13574422>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13640029>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13675883>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -90
<t:   13705585>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13709506>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -59
<t:   13771173>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13836807>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13902628>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   13968439>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14003777>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -79
<t:   14034044>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14037807>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   14099642>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14165316>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14230909>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14296420>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14331247>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   14362249>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14365308>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   14428028>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14493755>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14559568>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14625239>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14659118>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -89
<t:   14690867>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14692550>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   14756688>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14822356>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14887887>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14953686>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   14986844>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -78
<t:   15019384>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15020285>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -61
<t:   15085025>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15150700>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15216428>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15281992>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15314692>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -75
<t:   15347638>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15348642>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -58
<t:   15413470>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15479022>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15544720>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15610373>, provisioner_helper.c,  144, UUID seen: 9A5308BE2A18B7372DD296262244F37D
<t:   15642249>, main.c,  311, Node 0x0105 alive with 0 active fault(s), RSSI: -90
<t:   15675974>, main.c,  311, Node 0x0100 alive with 0 active fault(s), RSSI: -59

- Client:

<t:         50>, main.c,  247, ----- BLE Mesh Light Switch Client Demo -----
<t:         53>, mesh_softdevice_init.c,  112, Initializing SoftDevice...
<t:         50>, main.c,  247, ----- BLE Mesh Light Switch Client Demo -----
<t:         53>, mesh_softdevice_init.c,  112, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   77, Enabling BLE...
<t:          2>, mesh_softdevice_init.c,   88, Ram base: 0x200032C8
<t:        602>, main.c,  220, Initializing and adding models
<t:       5477>, main.c,  275, Device UUID : 0059ABCDEFABCDEFACCDEFABCDEFABCD
<t:      74374>, main.c,   98, Successfully provisioned
<t:      74376>, main.c,  102, Node Address: 0x0100

- Server:

<t:         49>, main.c,  177, ----- BLE Mesh Light Switch Server Demo -----
<t:         52>, mesh_softdevice_init.c,  112, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   77, Enabling BLE...
<t:          2>, mesh_softdevice_init.c,   88, Ram base: 0x200032C8
<t:        627>, main.c,  150, Initializing and adding models
<t:       5513>, main.c,  205, Device UUID : 0059FFFF000000000C63B607528DC9A6
<t:      84000>, main.c,   70, Successfully provisioned
<t:      84002>, main.c,   74, Node Address: 0x0105

- DFU:

<t:         61>, main.c,  204, ----- Bluetooth Mesh DFU Example -----
<t:         64>, mesh_softdevice_init.c,  112, Initializing SoftDevice...
<t:          0>, mesh_softdevice_init.c,   77, Enabling BLE...
<t:          1>, mesh_softdevice_init.c,   88, Ram base: 0x200032C8
<t:        635>, serial_handler_prov.c,  212, Generating encryption keypair...
<t:       5538>, main.c,  222, Initialization complete!
<t:      10321>, main.c,  240, Enabling serial interface...
<t:      10329>, main.c,  244, DFU example started!
<t:    4770770>, nrf_mesh_dfu.c,  901, ERROR: No CMD handler!
<t:    4787476>, nrf_mesh_dfu.c,  901, ERROR: No CMD handler!
<t:    4804224>, nrf_mesh_dfu.c,  901, ERROR: No CMD handler!
<t:    4820641>, nrf_mesh_dfu.c,  901, ERROR: No CMD handler!
<t:    4837378>, nrf_mesh_dfu.c,  901, ERROR: No CMD handler!

- Terminal:

C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src
λ nrfutil --verbose dfu serial -pkg bin\lss-3_2.zip -p com4 -b 115200 -fc --mesh
Upgrading target on com4 with DFU package C:\Nordic\nrf5_SDK_for_Mesh_v2.0.1_src\bin\lss-3_2.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: 91180
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
PC -> target: 0502aabbccdd
target -> PC: 0582aabbccdd
Got echo response
Sending DFU init packet
PC -> target: 1378fdff040f85ba41a359000000030002000000
target -> PC: 0384788e
PC -> target: 1378fdff040f85ba41a359000000030002000000
target -> PC: 0384788e
PC -> target: 1378fdff040f85ba41a359000000030002000000
target -> PC: 0384788e
PC -> target: 1378fdff040f85ba41a359000000030002000000
target -> PC: 0384788e
PC -> target: 1378fdff040f85ba41a359000000030002000000
target -> PC: 0384788e

Failed to upgrade target. Error is: Device returned an unknown status code (142) on a DFU state beacon packet.

Possible causes:
- bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
- baud rate or flow control is not the same as in the target bootloader.
- target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode. Closing serial port...

I hope you can help me, thank you for your time.

Regards,
Carlos

  • By the way I also include the relevant code from the DFU example into the light switch server, in case that was needed but no difference so far. Maybe I am missing some simple but important piece of the puzzle.

  • Hello Carlos, I have just done something similar to what you are trying to do.

    I will try to answer atleast some of your questions.

    1) Yes, you need a separate zip ,and a separate application ID for each type of application that you run. Server/client etc. these also need rising application_versions for everytime you do a new DFU. 

    For the bootloader_config_default.json you will only need to modify the application_id the first time you flash the development board. 

    2) Here you can find a list of the Softdevices and their versions: https://devzone.nordicsemi.com/f/nordic-q-a/1171/how-do-i-access-softdevice-version-string

    3) The serial bootloader only needs to be flashed onto the card which is recieving the DFU via cable. All other cards should have the other bootloader as mentioned in your question 4. For my project I used the bin/bootloader/gccarmemb/mesh_bootloader_gccarmemb_nrf52832_xxAA.hex and /bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex . I know these will work, so unless there is a reason not to use these i would reccomend them

    4) See 3.

    5) The dfu hex file will be found in that location only after you have built the project with segger/cmake or your preffered IDE.

    Something important for step 5 is: If you want to do DFU on servers and clients, these both need relevant code from the DFU project. Remember to put NRF_MESH_SERIAL_ENABLE 0 on devices that are not programmed via cable. After you have implemented the DFU project code, rebuild your project and replace build/examples/dfu/dfu_nrf52832_xxAA_s132_5.0.0.hex with i.e [ /examples/light_switch/server/build/\light_switch_server_nrf52832_xxAA_s132_6.0.0_Debug/light_switch_server_nrf52832_xxAA_s132_6.0.0.hex ] <<-- This needs to point at your hex files for the different units. Check time modified on the file, so that it is when you rebuilt the project.

    tl:dr All different units need an initial flash of their project code, with necessary DFU code included..

    6) You should modify all your projects flash_placement.xml files. On line 32 change RAM_PH_SIZE to RAM_SIZE this will give you enough space to transfer the data on your development boards. Remember to save and rebuild after doing this. 

    Also, I recommend testing DFU using the step-by-step guide in the quick-start guide. The dfu_no_serial_<target>_<SoftDevice>.hex and dfu_serial_<target>_<SoftDevice>.hex files can be created simply by building the DFU project with NRF_MESH_SERIAL_ENABLE set to 1 and 0. You will find the most recent .hex in the project folder/build/"build type"/

    Hope this helps you on the way!

    Regards,

    Martin

  • Hello Martin,

    Thank you for the suggestions, I will follow them tomorrow as soon as I get in to the office (almost midnight over here).

    One more thing, do I need to do something special to provision the devkit with the DFU example? As my output shows I can see the UUID being broadcast but it does not start the provisioning process.

    Have you seen the same errors when sending the zip file to the DFU devkit?

    Regards,

    Carlos

  • Hi

    Time to get to bed now then ;) 

    The DFU-example is not prepared to be provisioned, but it does not need to be. You can instead program one of your servers or clients with NRF_MESH_SERIAL_ENABLE 1 and flash it with the serial bootloader. Then this device will be able to send DFU to the rest of the devices. 

    I have seen the same errors, and they are related to the error in flash_placement.xml I think. 

    My original answer is also updated, as I saw that you are using the armcc bootloader, whilst I was using the gccarmemb bootloader.

    Good luck!

    BR,

    Martin

  • Thank you for the suggestions, now I have DFU working with the light switch examples.

Related