Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't update bootloader OTA

Hello!

I'm trying to update the bootloader of a nRF52 device OTA. We are using SDK 12.3. The device has our own application flashed, along with what is essentially the bootloader example, and we are able to update the app OTA. However, we're failing to update the bootloader...

We are using the hex of the bootloader, compiled with the correct keys, and without merging the bootloader settings (should we merge them?), and then creating the zip file using the following command

nrfutil pkg generate --hw-version 52 --sd-req 0x8C --sd-id 0x8C --bootloader-version our_version --bootloader our_bootloader.hex --key-file our_key.pem our_new_bl.zip

However, when we try to flash the bootloader using nRF Connect, it fails.

The last part of the log retrieve in nRF Connect states the following:

...
[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (ox): 60-04-0A
[DFU] Remote DFU error: OPERATION FAILED

Is it possible to extract any error information from the notification value?

Here is the bootloader log from the same transaction (I added some more prints to help debugging). Notice how it hangs after starting the crc check for the second time.

:INFO:---------------- BOOTING ----------------
:INFO:In nrf_bootloader_init
:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:Enter nrf_dfu_continue
:INFO:Valid App
:INFO:Erasing old settings at: 0x0007f000
:INFO:Erasing: 0x0007f000, num: 1
:INFO:Writing 0x00000057 words
:INFO:Writing settings...
:INFO:Application sent bootloader request
:INFO:Point 1
:INFO:In nrf_dfu_transports_init
:INFO:num transports: 1
:INFO:vector table: 0x00075000
SDH:DEBUG:sd_ble_enable: RAM start at 0x20002798
:INFO:After nrf_dfu_transports_init
:INFO:------- nrf_dfu_flash_init-------
:INFO:Waiting for events
:INFO:Received select object
:INFO:Valid Command: NRF_DFU_OBJECT_OP_SELECT
:INFO:Sending Object Info: [0x60, 0x06, 0x01 max: 0:x00000100 0:x00000000, CRC:0x00000000]
:INFO:Set receipt notif
:INFO:Sending Response: [0x2, 0x1]
:INFO:Received create object
:INFO:Before OP create command
:INFO:Valid Command Create
:INFO:Sending Response: [0x1, 0x1]
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Before OP write command
:INFO:Received calculate CRC
:INFO:Valid Command CRC
:INFO:Sending CRC: [0x60, 0x03, 0x01, 0:x0000008d, CRC:0x6d4ec922]
:INFO:Received execute object
:INFO:Before OP execute command
:INFO:Valid command execute
:INFO:
12 8A 01 0A 44 08 01 12 40 08 02 10 33 1A 02 87  [email protected]...
01 20 02 28 00 30 F8 8A 02 38 00 42 24 08 03 12  . .(.0...8.B$...
20 FE F1 77 87 C3 DE 0C 1C 80 7D 11 2C C7 AF AC   ..w......}.,...
7D F1 78 D1 C9 1A CC 59 79 A4 EB 65 0B BB 35 2E  }.x....Yy..e..5.
D4 48 00 52 04 08 01 12 00 10 00 1A 40 39 6F B5  .H.R........@9o.
84 0E F2 D6 12 26 90 6F 8C 2B ED CF E1 F0 06 24  .....&.o.+.....$
:INFO:
:INFO:---------------- BOOTING ----------------
:INFO:In nrf_bootloader_init
:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:Enter nrf_dfu_continue
:INFO:Valid App
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Going to compute CRC. Image size is 135428 
:INFO:Done computing CRC 
:INFO:Return true in CRC 
:INFO:Return true. App was valid
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Going to compute CRC. Image size is 135428 

Could you please help shed some light on this matter? Thanks!

Related