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

BLE DFU fails after a certain time

Hi,

When I try to update the firmware by sending 20 bytes at a time, it fails after around 1.25 minutes consistently.

1. Is it because nrf52 cannot hold the ble connection beyond 1.25 minutes? I can see the led status change on the nrf52 dev board as if it has lost connection.

2. How do I increase this time in secure bootloader ble code? I'm using SDK 15.2.

3. How do I increase the NRF_SDH_BLE_GAP_DATA_LENGTH to 244? Besides making changes in the sdk_config.h are there any more changes to be made?

After I change NRF_SDH_BLE_GAP_DATA_LENGTH = 244, for the last execute command I receive 60-04-08 in response. Also for all data objects, I have to use this size command - 01 02 00 10 00 00. I was trying to make each data object of the size 3904 bytes as it is divisible by 244 (BLE packet size).

My RTT Log -

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
00> <info> app: Inside main
00> <debug> app: In nrf_bootloader_init
00> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
00> <warning> nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).
00> <debug> nrf_dfu_settings: Writing settings...
00> <debug> nrf_dfu_settings: Erasing old settings at: 0x0007F000
00> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0007F000, len=1 pages), queue usage: 0
00> <debug> nrf_dfu_flash: Flash erase success: addr=0x0007F000, pending 0
00> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x0007F000, src=0x20006D88, len=440 bytes), queue usage: 1
00> <debug> nrf_dfu_flash: Flash write success: addr=0x0007F000, pending 0
00> <debug> app: Enter nrf_bootloader_fw_activate
00> <info> app: No firmware to activate.
00> <debug> app: Enter nrf_dfu_app_is_valid
00> <debug> app: No valid app to boot.
00> <debug> app: DFU mode because app is not valid.
00> <info> nrf_bootloader_wdt: WDT is not enabled
00> <debug> app: in weak nrf_dfu_init_user
00> <debug> app: timer_stop (0x200057D0)
00> <debug> app: timer_activate (0x200057D0)
00> <info> app: Entering DFU mode.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX