Hi,
I already asked a similar question 6 month ago (ticket) but we never got a solution to this.
Now, after 15 month of development, our mesh-applications are almost finished and we really need DFU.
To be able to upload code, I open a private ticket here.
Our mesh-client is now running on Mesh SDK 3.1.0 and SDK 15.2. This client is supposed to get DFU-updates via UART0.
Our script for programming the client:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@echo off
for /f "tokens=1,2 delims==" %%a in (version.ini) do (
if %%a==client_version set client_version=%%b
)
echo __________Connectivity Client Version: %client_version%__________
@echo:
echo __________Device page erstellen____________________
cd pc-nrfutil-mesh_dfu
cd dfu
REM bootloader_config_default.json erstellen (bestehende Version der Firmware)
set /a "prior_version=%client_version%-1"
(
echo {
echo "bootloader_config": {
echo "bootloader_id": 1,
echo "bootloader_version": 1,
echo "company_id": 89,
echo "application_id": 1,
echo "application_version": %prior_version%
echo }
echo }
Our script for updating the client:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@echo off
for /f "tokens=1,2 delims==" %%a in (version.ini) do (
if %%a==client_version set client_version=%%b
if %%a==Comport set Comport=%%b
)
@echo off
echo __________Connectivity Client Version: %client_version%__________
cd pc-nrfutil-mesh_dfu
@echo:
echo __________DFU file erstellen_______________________
nrfutil dfu genpkg --application ..\..\Source\connectivity_client\build\connectivity_client_release\connectivity_client.hex --company-id 0x00000059 --application-id 1 --application-version %client_version% --sd-req 0x00A9 --mesh client.zip
@echo:
echo __________DFU Update an COM%Comport%_______________________
nrfutil --verbose dfu serial -pkg client.zip -p COM%Comport% -b 115200 -i 300 -fc --mesh
@echo:
cd ..
pause
The output when updating:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
__________DFU Update an COM6_______________________
Upgrading target on COM6 with DFU package C:\Users\se\Desktop\Oblamatik\Connectivityair_15.2_3.10\DFU\pc-nrfutil-mesh_dfu\client.zip. Flow control is enabled.
Flushing com-port...
Opened com-port
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 122220
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: 1378fdff040f65c3e7d559000000010002000000
target -> PC: 16a6045900000001000200000059000000010001000000
target -> PC: 03847800
PC -> target: 1378fdff040f65c3e7d559000000010002000000
target -> PC: 03847800
PC -> target: 1478fcff000065c3e7d5ffffffff5b77000000000c
target -> PC: 0da2010459000000010002000000
target -> PC: 03847800
Sending firmware file
[------------------------------------] 1% 00:11:52PC -> target: 1978fcff010065c3e7d500f0032059620200896202008b620200
PC -> target: 1978fcff010065c3e7d500f0032059620200896202008b620200
and sometimes it outputs:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 122220
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: 1378fdff040fed78a76359000000010002000000
target -> PC: 16a6045900000001000200000059000000010001000000
target -> PC: 03847800
PC -> target: 1378fdff040fed78a76359000000010002000000
target -> PC: 03847800
PC -> target: 1478fcff0000ed78a763ffffffff5b77000000000c
PC -> target: 1478fcff0000ed78a763ffffffff5b77000000000c
PC -> target: 1478fcff0000ed78a763ffffffff5b77000000000c
PC -> target: 1478fcff0000ed78a763ffffffff5b77000000000c
PC -> target: 1478fcff0000ed78a763ffffffff5b77000000000c
Failed to upgrade target. Error is: Crashed on start packet
RTT outputs the following during the DFU-update:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0> <t: 1523878>, nrf_mesh_dfu.c, 390, New firmware!
0> <t: 1523881>, mesh.c, 744, DFU update application
0> <t: 1523883>, mesh.c, 778, DFU me
0> <t: 1523885>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
0> <t: 1523889>, nrf_mesh_dfu.c, 534, Killing a TX slot prematurely (repeats done: 5).
0> <t: 1523893>, nrf_mesh_dfu.c, 561, SERIAL TX!
0> <t: 1590164>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
0> <t: 1590168>, nrf_mesh_dfu.c, 534, Killing a TX slot prematurely (repeats done: 0).
0> <t: 1590172>, nrf_mesh_dfu.c, 561, SERIAL TX!
0> <t: 1656741>, nrf_mesh_dfu.c, 430, DFU start
0> <t: 1656743>, mesh.c, 792, DFU start
0> <t: 1656746>, nrf_mesh_dfu.c, 528, RADIO TX! SLOT 1, count 6, interval: exponential, handle: FFFC
0> <t: 1739614>, nrf_mesh_dfu.c, 329, Erase complete (0x44000)
0> <t: 1739617>, nrf_mesh_dfu.c, 333, Flash idle.
I already tried making changes like described here, but this didn't help.
What could be the problem here?
Best regards
Gerry