I have a custom board with a nRF52805 based module from Minew and I'm trying to do a OTA DFU but I can't quite understand how it works.
This is what I do. For info, I'm using the softdevice s112 version 7.0.1.
- Generate the public and private key and replace it in the folder to compile the bootloader.
- Compile the secure bootloader from
examples\dfu\secure_bootloader\pca10040e_s112_ble\sessecure_bootloader_ble_s112_pca10040e.emProject
and it compiled successfully. I renamed it to bootloader.hex - Then I compiled simple blinky app and rename it to app.hex
- Generate the settings for the bootloader with this commands in command line:
nrfutil settings generate --family NRF52810 --application app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex
. - Use the software nRF Connect Programmer to view the memory map and it show there is no overlap between the files: app.hex, bootloader.hex, settings.hex and the softdevice.
- Erase and write to the target and reset.
At this point I think everything is ok but when the target reset the blinky is not running. I scann with nRF Connect mobile app and the DFU Target is visible and available to do DFU. So my questions are:
1. May I have to use the mbr blinky app template to do this?
2. May I have to enable some module or change something at sdk_config.h file in my app to work alongside the bootloader and execute the app first? It seems like the device is entering in DFU mode instead of run the app.
3. To enter DFU mode just have to assign the button pin number of my device to NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN in the sdk_config.h?
Another question I have about the use of DFU is how does the ble_app_buttonless_dfu work? I follow this guide/tutorial but I can't quite understand how it works. I understand that the example app is just a BT advertising and you can make the DFU through nRF Connect mobile app right? Please correct me if I'm wrong.
Thanks in advance...