Hi,
Using Windows 10 and SES
SEGGER Embedded Studio for ARM
Release 6.34a Build 2022083102.51023
Windows x64 2014-2022 SEGGER Microcontroller GmbH
1997-2022 Rowley Associates Ltd.
segger-as: version 2.11
segger-cc: version 14.2.1
segger-cc-ng: version 14.92.0
segger-ld: version 4.34.2
segger-rtl: version 4.18.0
GCC/BINUTILS: built using the GNU ARM Embedded Toolchain version 11.2-2022.02 source distribution
Clang/LLVM: built using the version 14.0.6 source distribution
Trying to run one of the Acconneer samples I get the errors below:
service_handle = acc_service_create(envelope_configuration); returns a NULL handle, all up to this point looked fine...
The errors in the debug window shows:
"<error> app: sensor_protocol:Timeout waiting for event on sensor 1
<error> app: cpd_cbank_and_vana_calibration:Failed to get result for vana setting=0
<error> app: cpd_cbank_and_vana_calibration:Get Vana result failed
<error> app: sensor_manager:Calibration failure for sensor 1
<info> app: Could not create envelope service"
Segger Compiler
nRF5_SDK_15.3.0_59ac345
nRF52840DK as Debugger connected with 10pin cable to the XB122.
The actual code preceding the error was:
acc_service_configuration_t envelope_configuration = acc_service_envelope_configuration_create();
if (envelope_configuration == NULL)
{
printf("Could not create envelope configuration\n");
success = false;
}
if (success)
{
acc_service_requested_start_set(envelope_configuration, range_start_m);
acc_service_requested_length_set(envelope_configuration, range_length_m);
acc_service_power_save_mode_set(envelope_configuration, SELECTED_POWER_SAVE_MODE);
acc_service_profile_set(envelope_configuration, SELECTED_SERVICE_PROILE);
acc_service_hw_accelerated_average_samples_set(envelope_configuration, HWAAS);
acc_service_envelope_downsampling_factor_set(envelope_configuration, DOWNSAMPLING_FACTOR);
service_handle = acc_service_create(envelope_configuration);
Now service_handle == NULL; with above errors thrown from the inner libraries.
After lots of up and down with Acconneer we are convinced something is going wrong with how the deployment package is built. Looking at samples and reading documentation my attempt ended up as:
nrfutil settings generate --family NRF52 --application acc_bluetooth_beacon.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 settings.hex
mergehex -m acc_bluetooth_beacon.hex settings.hex -o merged.hex
mergehex -m merged.hex s140_nrf52_6.1.1_softdevice.hex -o merged_output.hex
nrfutil pkg generate --hw-version 52 --application-version 1 --application merged_output.hex --sd-req 0xB6 --sd-id 0xB6 app_dfu_package.zip
output for all this looks like:
"Note: Generating a DFU settings page with backup page included.
This is only required for bootloaders from nRF5 SDK 15.1 and newer.
If you want to skip backup page generation, use --no-backup option.
Generated Bootloader DFU settings .hex file and stored it in: settings.hex
Bootloader DFU Settings:
* File: settings.hex
* Family: nRF52
* Start Address: 0x0007F000
* CRC: 0xB5FA4D7C
* Settings Version: 0x00000001 (1)
* App Version: 0x00000001 (1)
* Bootloader Version: 0x00000002 (2)
* Bank Layout: 0x00000000
* Current Bank: 0x00000000
* Application Size: 0x00017358 (95064 bytes)
* Application CRC: 0x27AD3A4B
* Bank0 Bank Code: 0x00000001
* Softdevice Size: 0x00000000 (0 bytes)
* Boot Validation CRC: 0x00000000
* SD Boot Validation Type: 0x00000000 (0)
* App Boot Validation Type: 0x00000000 (0)
Parsing input files.
Merging file "acc_bluetooth_beacon.hex" into output.
Merging file "settings.hex" into output.
Storing merged file.
Parsing input files.
Merging file "merged.hex" into output.
Merging file "s140_nrf52_6.1.1_softdevice.hex" into output.
Storing merged file.
|===============================================================|
|## ## ### ######## ## ## #### ## ## ###### |
|## ## ## ## ## ## ## ### ## ## ### ## ## ## |
|## ## ## ## ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####|
|## ## ## ######### ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ## ## ## ### ## ## ### ## ## |
| ### ### ## ## ## ## ## ## #### ## ## ###### |
|===============================================================|
|You are not providing a signature key, which means the DFU |
|files will not be signed, and are vulnerable to tampering. |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments. |
|===============================================================|
Zip created at app_dfu_package.zip"
So all seems successful, yet when I run the App, the device does not show up as available BLE. If I connect the debugger it is seen to fail as showed above. I know something is wrong with deployment as once this has been deployed I cannot see the device anymore via BLE to DFU again via Android. I must now reset to factory before I can try again.
Can someone please assist with how to correctly package and deploy bootloader + softdevice + App
Thanks
Cheers
Andreas