BLE OTA failed with private key

Hello, I'm working with NCS 2.6.0 in Visual Studio Code

I already have a private key generated by using imgtool.py, and I put the .pem file in C:\user\nordic\ncs\user_apps\_keys folder.

I also have a mcuboot.conf in project/child_image folder.

What I'm trying to do is changing CONFIG_BT_DEVICE_NAME or CONFIG_BT_DIS_SW_REV_STR, and update the firmware over BLE.

But when I try to update new firmware to device, only showing image already pending on Device Manager APP, I didn't see any changes on BLE name or REV number.

Looking into RTT log, I found "Swap type: test" but even if I reset the device, the firmware doesn't update.

I had review lession 8 on DevAcademy, adding CONFIG_BOOTLOADER_MCUBOOT=y and CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y in prj.conf.

Also create a child_image folder, what else should I do to get BLE OTA work in signed firmware?

Please give me any suggestion for fixing these problems. Thanks in advanced.

Here's log from RTT logger

Connected 68:1B:FD:D3:DA:38 (random)
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: raw 6130 ~ 897 mV => 1794 mV

[0:03:30.060]: 1794 mV; 0 pptt
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: test
*** Booting nRF Connect SDK d96769faceca ***
I: Setup AIN0 got 0
I: Battery setup: 0 1
I: raw 6179 ~ 905 mV => 1810 mV

[0:00:00.050]: 1810 mV; 0 pptt
-------------------- whoamI. 6a
-------------------- rst. 0
Set up lsm6dsl_int1 at gpio@50000000 pin 19
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fe8
I: data wra: 0, 0
I: SoftDevice Controller build revision: 
I: 36 f0 e5 0e 87 68 48 fb |6....hH.
I: 02 fd 9f 82 cc 32 e5 7b |.....2.{
I: 91 b1 5c ed             |..\.    
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF52x (0x0002)
I: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
I: No ID address. App must call settings_load()
Bluetooth initialized
I: Identity: D1:4C:BC:53:9C:85 (random)
I: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059
I: LMP: version 5.4 (0x0d) subver 0x118f
Advertising successfully started, advertising as Jumpad9C85
Connected 61:10:4D:D5:46:A0 (random)
I: Image index: 0, Swap type: test

Here's the mcuboot.conf file:

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x0A000
CONFIG_BOOT_SIGNATURE_KEY_FILE="C:/user/nordic/ncs/user_apps/_keys/240522_priv.pem"
CONFIG_BOOT_SIGNATURE_TYPE_RSA=n
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y

Here's my prj.conf file:

#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_MAX_CONN=2
CONFIG_BT_MAX_PAIRED=2
CONFIG_BT_SMP=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Jumpad"
CONFIG_BT_DEVICE_APPEARANCE=961

# Enable the NUS service
CONFIG_BT_NUS=y

CONFIG_BT_BAS=y
CONFIG_BT_HIDS=y
CONFIG_BT_HIDS_MAX_CLIENT_COUNT=1
CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
CONFIG_BT_GATT_UUID16_POOL_SIZE=40
CONFIG_BT_GATT_CHRC_POOL_SIZE=20

CONFIG_BT_CONN_CTX=y

CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=y
# CONFIG_BT_DIS_MANUF="NordicSemiconductor"
CONFIG_BT_DIS_PNP_VID_SRC=2
CONFIG_BT_DIS_PNP_VID=0x1915
CONFIG_BT_DIS_PNP_PID=0xEEEF
CONFIG_BT_DIS_PNP_VER=0x0100
CONFIG_BT_DIS_MODEL="JP01"
CONFIG_BT_DIS_MANUF="Ucare"
CONFIG_BT_DIS_SERIAL_NUMBER=y
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_HW_REV=y
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_SERIAL_NUMBER_STR="1"
CONFIG_BT_DIS_FW_REV_STR="NCS2.6.0"
CONFIG_BT_DIS_SW_REV_STR="0.0.1"

CONFIG_BT_DIS_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
# CONFIG_SETTINGS_NONE=y

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

CONFIG_DK_LIBRARY=y

CONFIG_NFC_OOB_PAIRING=n

# This example requires more stack
CONFIG_MAIN_STACK_SIZE=4096

# # Config logger
# CONFIG_LOG=y
# CONFIG_USE_SEGGER_RTT=y
# CONFIG_LOG_BACKEND_RTT=y
# CONFIG_LOG_BACKEND_UART=n
# CONFIG_LOG_PRINTK=y

CONFIG_ASSERT=y

# Enable Gsensor
CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_LSM6DSL_TRIGGER_GLOBAL_THREAD=y
CONFIG_CBPRINTF_FP_SUPPORT=y

# Enable ADC
CONFIG_ADC=y

# Enable Watchdog
CONFIG_WATCHDOG=y


# Enable MCUboot
#Enable MCUBOOT bootloader build in the application
CONFIG_BOOTLOADER_MCUBOOT=y
#Include MCUMGR and the dependencies in the build
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

Parents
  • Hello,

    I wanted to let you know that I have been assigned to this case and have started looking into it. Could you tell me which Nordic chip or DK you are using here?

    I will try to reproduce this here, but is this happening only with the nRF device manager app, or is it the same with the nRF Connect mobile application? What happens if you provide the swap type "confirm only" from the mobile application?

    Kind Regards,

    Abhijith

  • Hello Menon,

    Thanks for your help here. I'm using nRF52832 custom board.

    In nRF device manager app and nRF Connect mobile app, I got the same issue.

    I had try Test and Comfirm, Test only and Confirm only, but still can not get BLE OTA work.

    Nothing changes after the uploading progress bar run to the end.

Reply Children
No Data
Related