Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
It should use the same Softdevice S132 version 7.2.0 as with the nRF52832 that has already been tried. The size of the Softdevice should be checked, but that shouldn't be a problem.
In nrf_bootloader_fw_activation.c the &s_dfu_settings.bank_1 struct is used, but on make write_bootloader_settings in the nrf52840 build directory, the current bank is 0 and that bank code is 1. This in contrast to nrf_bootloader_fw_activate which will inspect bank 1, checks p_bank->bank_code (which is 0, all fields are zero) and then returns ACTIVATION_NONE.
By manually changing the above to &s_dfu_settings.bank_0 it tries to activate, but fails.
In (gdb) p s_dfu_settings shows the same settings as make write_bootloader_settings so writing succeeds.
How to properly activate the app on the nRF52840? (And why does this succeed on the nRF52832?)
The https://github.com/crownstone/bluenet/tree/compile-for-host branch has now support for the nRF52840 in the form of the PCA10056 dev. kit.
Check the following things:
nrf_bootloader_fw_activation.c
the&s_dfu_settings.bank_1
struct is used, but onmake write_bootloader_settings
in the nrf52840 build directory, the current bank is 0 and that bank code is 1. This in contrast tonrf_bootloader_fw_activate
which will inspect bank 1, checksp_bank->bank_code
(which is 0, all fields are zero) and then returnsACTIVATION_NONE
.&s_dfu_settings.bank_0
it tries to activate, but fails.(gdb) p s_dfu_settings
shows the same settings asmake write_bootloader_settings
so writing succeeds.How to properly activate the app on the nRF52840? (And why does this succeed on the nRF52832?)