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

Mesh UART-DFU fail with "Abort event. Reason: 0x4"

Hi,

We base on the light switch example to include the dfu process into it.

Device FW information is as follows:

Mesh sdk: v4.2.0
SoftDevice: s113_nrf52_7.0.1_softdevice.hex
bootloader: mesh_bootloader_gccarmemb_nrf52832_xxAA.hex
device page: device_page_nrf52832_xxAA_s113_7.0.1.hex

Testing environment:
1. PC <-UART-> 52832 DK

Build a DFU-sender program with c code (just like the nrfutil works) in PC to send the bin and dat data to 52832DK.
The 52832DK with pre-compile bootloader,soft device, application FW and device page can be dfu updated successfully via UART.

 0> <t:    4266661>, serial_bearer.c,  394, frank: C8
 0> <t:    4266667>, serial_bearer.c,  394, frank: A
 0> <t:    4266673>, serial_bearer.c,  394, frank: 40
 0> <t:    4266680>, serial_bearer.c,  394, frank: D
 0> <t:    4266682>, serial_bearer.c,  212, ----frank---  end_reception
 0> <t:    4266684>, serial_bearer.c,  141, ----frank---  serial_process
 0> <t:    4266688>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9623/9623
 0> <t:    4266693>, nrf_mesh_dfu.c,  656, 	TIMER set: 30000000us delay (@1696209137)
 0> <t:    4266697>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    5249733>, nrf_mesh_dfu.c,  351, Timeout fired @1696209137
 0> <t:    5264814>, nrf_mesh_dfu.c,  367, Write complete (0x2000FD38)
 0> <t:    5264818>, nrf_mesh_dfu.c,  376, Flash idle.
 0> <t:    5264891>, nrf_mesh_dfu.c,  372, Erase complete (0x7E000)
 0> <t:    5264899>, nrf_mesh_dfu.c,  367, Write complete (0x7F000)
 0> <t:    5265033>, nrf_mesh_dfu.c,  367, Write complete (0x7F004)
 0> <t:    5265041>, nrf_mesh_dfu.c,  367, Write complete (0x7F048)
 0> <t:    5265044>, nrf_mesh_dfu.c,  367, Write complete (0x7F054)
 0> <t:    5265048>, nrf_mesh_dfu.c,  367, Write complete (0x7F060)
 0> <t:    5265051>, nrf_mesh_dfu.c,  367, Write complete (0x7F06C)
 0> <t:    5265054>, nrf_mesh_dfu.c,  367, Write complete (0x7F080)
 0> <t:    5265057>, nrf_mesh_dfu.c,  367, Write complete (0x7F088)
 0> <t:    5265060>, nrf_mesh_dfu.c,  367, Write complete (0x7F0E0)
 0> <t:    5265132>, nrf_mesh_dfu.c,  372, Erase complete (0x7F000)
 0> <t:    5265140>, nrf_mesh_dfu.c,  367, Write complete (0x7E000)
 0> <t:    5265275>, nrf_mesh_dfu.c,  367, Write complete (0x7E004)
 0> <t:    5265283>, nrf_mesh_dfu.c,  367, Write complete (0x7E048)
 0> <t:    5265286>, nrf_mesh_dfu.c,  367, Write complete (0x7E054)
 0> <t:    5265289>, nrf_mesh_dfu.c,  367, Write complete (0x7E060)
 0> <t:    5265292>, nrf_mesh_dfu.c,  367, Write complete (0x7E06C)
 0> <t:    5265295>, nrf_mesh_dfu.c,  367, Write complete (0x7E080)
 0> <t:    5265298>, nrf_mesh_dfu.c,  367, Write complete (0x7E088)
 0> <t:    5265301>, nrf_mesh_dfu.c,  367, Write complete (0x7E0E0)
 0> <t:    5265304>, nrf_mesh_dfu.c,  376, Flash idle.
 0> <t:    5265306>, nrf_mesh_dfu.c,  520, 	DFU END!
 0> <t:    5265310>, dfu_init.c,  152, ----- NRF_MESH_EVT_DFU_END...
 0> <t:    5265314>, nrf_mesh_dfu.c,  527, 	DFU BANK AVAILABLE
 0> <t:    5265317>, dfu_init.c,  159, ----- NRF_MESH_EVT_DFU_BANK_AVAILABLE...
 0> <t:    5265374>, nrf_mesh_dfu.c,  367, Write complete (0x2000FD38)
 0> <t:    5265378>, nrf_mesh_dfu.c,  376, Flash idle.

2.other MCU <-UART-> 52832 module

Build a DFU-sender program with c code (just like the nrfutil works) in "other MCU" to send the bin and dat data to 52832 module.
The 52832 module with the same FW as above (pre-compile bootloader,soft device, application FW and device page) can get the bin+data data successfully with no errors (correct event,op-code and status) from "other MCU" via UART. But it shows "the Abort event. Reason: 0x4".

 0> <t:    3850853>, serial_bearer.c,  388, frank: A3
 0> <t:    3850859>, serial_bearer.c,  388, frank: 7E
 0> <t:    3850862>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9622/9623
 0> <t:    3850867>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    3854159>, serial_bearer.c,  388, frank: 19
 0> <t:    3854164>, serial_bearer.c,  388, frank: 78
 0> <t:    3854170>, serial_bearer.c,  388, frank: FC
 0> <t:    3854176>, serial_bearer.c,  388, frank: FF
 0> <t:    3854181>, serial_bearer.c,  388, frank: 97
 0> <t:    3854187>, serial_bearer.c,  388, frank: 25
 0> <t:    3854193>, serial_bearer.c,  388, frank: 1
 0> <t:    3854198>, serial_bearer.c,  388, frank: 0
 0> <t:    3854204>, serial_bearer.c,  388, frank: 0
 0> <t:    3854210>, serial_bearer.c,  388, frank: 0
 0> <t:    3854216>, serial_bearer.c,  388, frank: 5A
 0> <t:    3854221>, serial_bearer.c,  388, frank: 14
 0> <t:    3854227>, serial_bearer.c,  388, frank: 81
 0> <t:    3854233>, serial_bearer.c,  388, frank: BD
 0> <t:    3854238>, serial_bearer.c,  388, frank: 15
 0> <t:    3854244>, serial_bearer.c,  388, frank: 8D
 0> <t:    3854250>, serial_bearer.c,  388, frank: 59
 0> <t:    3854256>, serial_bearer.c,  388, frank: 8D
 0> <t:    3854262>, serial_bearer.c,  388, frank: D2
 0> <t:    3854267>, serial_bearer.c,  388, frank: D1
 0> <t:    3854273>, serial_bearer.c,  388, frank: A4
 0> <t:    3854279>, serial_bearer.c,  388, frank: 6F
 0> <t:    3854284>, serial_bearer.c,  388, frank: C8
 0> <t:    3854290>, serial_bearer.c,  388, frank: A
 0> <t:    3854296>, serial_bearer.c,  388, frank: 40
 0> <t:    3854301>, serial_bearer.c,  388, frank: D
 0> <t:    3854305>, nrf_mesh_dfu.c,  502, 	DFU segment rx: 9623/9623
 0> <t:    3854310>, nrf_mesh_dfu.c,  656, 	TIMER set: 30000000us delay (@1171624207)
 0> <t:    3854314>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 1, count 3, interval: exponential, handle: FFFC
 0> <t:    4837350>, nrf_mesh_dfu.c,  351, Timeout fired @1171624207
 0> <t:    4852242>, nrf_mesh_dfu.c,  431, 	Abort event. Reason: 0x4
 0> <t:    4852246>, dfu_init.c,  151, ----- NRF_MESH_EVT_DFU_END...
 0> <t:    4852250>, nrf_mesh_dfu.c,  581, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
 0> <t:    6047382>, serial_bearer.c,  388, frank: 55
 0> <t:    6047387>, serial_bearer.c,  388, frank: 7
 0> <t:    6047393>, serial_bearer.c,  388, frank: 32
 0> <t:    6047399>, serial_bearer.c,  388, frank: 1
 0> <t:    6047404>, serial_bearer.c,  388, frank: 0
 0> <t:    6047410>, serial_bearer.c,  388, frank: C7

Could anyone help it?

Thanks,
Frank

  • Hi Frank, 

    If you are planning to do only one on one uart DFU, I would suggest to have a look at the normal nRF5 SDK UART bootloader instead of the mesh bootloader. 

    The only draw back is that it's not background DFU, and you have to switch to the bootloader to receive the new image. However, since it only take a very short time (depends on the size of the image, can be less than a minute) to do DFU it's feasible to do so. 
    I have made an example on how to do UART update from one nRF52 to another nRF52 here

    350ms delay sounds reasonable as it's similar to the delay we have in the nrfutil. 

Related