![]() |
nRF5 SDK
v17.0.2
|
Important: Before you run this example, make sure to program the SoftDevice.
The BLE Secure DFU Bootloader example uses the Bootloader and DFU modules to implement a bootloader with secure Device Firmware Update (DFU) functionality.
The example bootloader accepts images that contain a new bootloader, SoftDevice, application, or any combination of these. To protect the target device against malicious attackers trying to impersonate the rightful sender of the firmware update, the init packet of the firmware package must be signed.
There are certain configuration parameters available in the sdk_config
file through which you can configure the Secure DFU Bootloader. For details on editing the SDK configurations, see SDK configuration header file.
Depending on the target board and SoftDevice, you can find the source code and the project file of the example in one of the following folders:
<InstallFolder>\examples\dfu\secure_bootloader\pca10040_s132_ble
<InstallFolder>\examples\dfu\secure_bootloader\pca10040e_s112_ble
<InstallFolder>\examples\dfu\secure_bootloader\pca10056_s140_ble
<InstallFolder>\examples\dfu\secure_bootloader\pca10056e_s112_ble
<InstallFolder>\examples\dfu\secure_bootloader\pca10100_s113_ble
<InstallFolder>\examples\dfu\secure_bootloader\pca10100_s140_ble
Button assignments - in addition to those defined in BSP BLE Button Assignments:
You can either create your own firmware package for testing or use one of the provided packages that are located in subfolders of <InstallFolder>\examples\dfu\secure_dfu_test_images
. The provided packages have been generated using a private key that corresponds to the default public key in the project. This public key must not be used in production.
The following is the naming convention for the hex and zip files that you can use in this example:
ble\nrf528xx\ble_app_buttonless_dfu_with_bonds_s1xx.zip
ble\nrf528xx\ble_app_buttonless_dfu_without_bonds_s1xx.zip
ble\nrf528xx\ble_app_buttonless_dfu_with_bonds_s1xx_with_setting_page.hex
ble\nrf528xx\ble_app_buttonless_dfu_without_bonds_s1xx_with_setting_page.hex
ble\nrf528xx\hrs_application_s1xx.hex
ble\nrf528xx\hrs_application_s1xx.zip
ble\nrf528xx\softdevice_s1xx.hex
ble\nrf528xx\softdevice_s1xx.zip
ble\nrf528xx\bootloader_secure_ble_debug_with_bonds_s1xx.hex
ble\nrf528xx\bootloader_secure_ble_debug_with_bonds_s1xx.zip
ble\nrf528xx\bootloader_secure_ble_debug_without_bonds_s1xx.hex
ble\nrf528xx\bootloader_secure_ble_debug_without_bonds_s1xx.zip
ble\nrf528xx\sd_s1xx_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_with_bonds.hex
ble\nrf528xx\sd_s1xx_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex
Test the BLE Secure DFU Bootloader application by performing the following steps:
dfu_public_key.c
. See Working with keys for instructions.dfu_public_key.c
file to the project folder, replacing the existing file.nrfutil dfu ble -ic NRF52 -f -pkg package.zip
-n
or -a
options. For more information, enter nrfutil dfu ble --help
.