Flash area error when attempting DFU via nRF Connect App

Hello,

I'm getting the following error  when attempting to perform a DFU. I'm using the Android nRF Connect app.

00> I: Image index: 0, Swap type: test
00> I: Image index: 1, Swap type: none
00> E: Failed to open flash area ID 1: -2

Flash Area ID of 1 indicates it's external flash. Error -2 is ENOENT. So it's saying that no such flash area exists? I suspect something is not configured correctly.

Here is my external flash devicetree snippet:

&spi4 {
	compatible = "nordic,nrf-spim";
	status = "okay";
	pinctrl-0 = <&spi4_default>;
	pinctrl-1 = <&spi4_sleep>;
	pinctrl-names = "default", "sleep";
	cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;

	sst26vf: sst26vf064b@0 {
		compatible = "jedec,spi-nor";
				reg = <0>;
		spi-max-frequency = <24000000>;
		jedec-id = [bf 26 43]; /* see datasheet table 5-4, p.25 */

		/* see datasheet pp. 72-79 for basic flash parameters table below */
		sfdp-bfp = [
			fd 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 80 bb
			fe ff ff ff  ff ff 00 ff  ff ff 44 0b  0c 20 0d d8
			0f d8 10 d8  20 91 48 24  80 6f 1d 81  ed 0f 77 38
			30 b0 30 b0  f7 ff ff ff  29 c2 5f ff  f0 30 c0 80
		];
		size = <67108864>;

	 	requires-ulbpr; /* sst26vf has block write protections enabled by default */
	};
};

The project is based on the smart lock sample code. I had to increase the size of the bootloader region to get it to fit. Here is the pm_static_dfu.yml file:

mcuboot:
  address: 0x0
  size: 0xc000
  region: flash_primary
mcuboot_pad:
  address: 0xc000
  size: 0x200
app:
  address: 0xc200
  size: 0xeae00
mcuboot_primary:
  orig_span: &id001
  - mcuboot_pad
  - app
  span: *id001
  address: 0xc000
  size: 0xeb000
  region: flash_primary
mcuboot_primary_app:
  orig_span: &id002
  - app
  span: *id002
  address: 0xc200
  size: 0xeae00
factory_data:
  address: 0xf7000
  size: 0x1000
  region: flash_primary
settings_storage:
  address: 0xf8000
  size: 0x8000
  region: flash_primary
mcuboot_primary_1:
  address: 0x0
  size: 0x40000
  device: flash_ctrl
  region: ram_flash
mcuboot_secondary:
  address: 0x0
  size: 0xef000
  device: SST26VF
  region: external_flash
mcuboot_secondary_1:
  address: 0xef000
  size: 0x40000
  device: SST26VF
  region: external_flash
external_flash:
  address: 0x12f000
  size: 0x6D1000
  device: SST26VF
  region: external_flash
pcd_sram:
  address: 0x20000000
  size: 0x2000
  region: sram_primary

I'm don't know how or if this yaml file relates to the partitions defined in the devicetree, but here are the devicetree partitions:

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0x00010000>;
		};
		slot0_partition: partition@10000 {
			label = "image-0";
		};
		slot0_ns_partition: partition@50000 {
			label = "image-0-nonsecure";
		};
		slot1_partition: partition@80000 {
			label = "image-1";
		};
		slot1_ns_partition: partition@c0000 {
			label = "image-1-nonsecure";
		};
		/* 0xf0000 to 0xf7fff reserved for TF-M partitions */
		storage_partition: partition@f8000 {
			label = "storage";
			reg = <0x000f8000 0x00008000>;
		};
	};
}

Thanks.

  • Hi Abhijith,

    I'm still unable to perform an upgrade using your peripheral_lbs sample code. See the full log below:

    *** Booting nRF Connect SDK v2.5.1 ***
    Starting Bluetooth Peripheral LBS example
    [00:00:00.007,904] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,904] <inf> fs_nvs: alloc wra: 0, f88
    [00:00:00.007,934] <inf> fs_nvs: data wra: 0, c4
    [00:00:00.040,008] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.040,039] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:00.040,069] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017
    [00:00:00.042,297] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:00.045,166] <inf> bt_hci_core: Identity: E1:C7:E4:D3:7E:A3 (random)
    [00:00:00.045,196] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x2102, manufacturer 0x0059
    [00:00:00.045,227] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x2102
    Advertising successfully started
    Connected
    Security changed: C4:93:D9:69:DF:A4 (public) level 4
    [00:03:47.805,572] <inf> mcuboot_util: Image index: 0, Swap type: none
    [00:03:47.806,396] <inf> mcuboot_util: Image index: 1, Swap type: none
    [00:03:47.806,427] <err> mcumgr_img_grp: Failed to open flash area ID 1: -2
    [00:03:47.943,328] <inf> mcuboot_util: Image index: 0, Swap type: none
    [00:03:48.045,227] <inf> mcumgr_img_grp: Erased 0x30000 bytes of image slot
    [00:03:48.064,575] <inf> mcumgr_img_grp: Erased 0x1000 bytes of image slot trailer
    [00:04:09.113,281] <inf> mcuboot_util: Image index: 1, Swap type: none
    [00:04:09.849,822] <inf> mcumgr_img_grp: Erased 0x32000 bytes of image slot
    [00:04:09.869,110] <inf> mcumgr_img_grp: Erased 0x1000 bytes of image slot trailer
    *** Booting nRF Connect SDK v2.5.1 ***
    Starting Bluetooth Peripheral LBS example
    [00:00:00.007,904] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.007,904] <inf> fs_nvs: alloc wra: 0, f88
    [00:00:00.007,934] <inf> fs_nvs: data wra: 0, c4
    [00:00:00.040,008] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.040,039] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:00.040,069] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017
    [00:00:00.042,297] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:00.045,166] <inf> bt_hci_core: Identity: E1:C7:E4:D3:7E:A3 (random)
    [00:00:00.045,196] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x2102, manufacturer 0x0059
    [00:00:00.045,227] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x2102
    Advertising successfully started

    I don't see an error message that would indicate why it's failing.

    I tried turning on logging in mcuboot.conf but it doesn't seem to print anything. Is there a way to see what mcuboot is doing and why the image swap is not happening? 

    My mcuboot.conf is below. I had to increase the size of the bootloader because it kept exceeding the flash memory. My custom board is limited to RTT debuggin (no serial pins exposed)

    #Enable QSPI drivers for external flash
    CONFIG_NORDIC_QSPI_NOR=y
    
    
    CONFIG_BOOT_MAX_IMG_SECTORS=256
    
    
    
    #Adding configurations to enable simultaneous multi-core updates
    CONFIG_NRF53_MULTI_IMAGE_UPDATE=y
    CONFIG_UPDATEABLE_IMAGE_NUMBER=2
    CONFIG_BOOT_UPGRADE_ONLY=y
    CONFIG_PCD_APP=y
    
    #Adding dependencies for CONFIG_NRF53_MULTI_IMAGE_UPDATE
    CONFIG_FLASH=y
    CONFIG_FLASH_SIMULATOR=y
    CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
    CONFIG_FLASH_SIMULATOR_STATS=nv
    
    # LUIS
    CONFIG_GPIO=y
    CONFIG_MULTITHREADING=y
    CONFIG_NORDIC_QSPI_NOR=n
    CONFIG_SPI_NOR=y
    CONFIG_NRFX_SPIM4=y
    CONFIG_SIZE_OPTIMIZATIONS=y
    CONFIG_NFCT_PINS_AS_GPIOS=y
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_MODE_IMMEDIATE=y
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x48000
    CONFIG_LOG_DEFAULT_LEVEL=3

    I'm not seeing any external flash errors and there's certainly activity when I examine the lines using a logic analyzer:

    Do you have any suggestions on what to try? I suspect mcuboot is rejecting the image for some reason. How do I prove this?

  • Hello,

    What is the response from the mobile application (nRF Connect)? You can also check the logs from the mobile app; in nRF Connect, I think you can slide to the right to see the logs.

    Kind Regards,

    Abhijith

  • Hi Abhijith,

    Please see the log below.

    nRF Connect, 2024-02-07
    Abhi_test_lbs (E1:C7:E4:D3:7E:A3)
    V	10:16:56.426	Connecting to E1:C7:E4:D3:7E:A3...
    D	10:16:56.427	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	10:16:56.664	[Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
    I	10:16:56.664	Connected to E1:C7:E4:D3:7E:A3
    D	10:16:56.665	wait(1600ms)
    D	10:16:56.699	[Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
    D	10:16:57.071	[Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
    D	10:16:57.087	[Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDED (12)
    I	10:16:57.088	Device bonded
    I	10:16:57.735	PHY updated (TX: LE 2M, RX: LE 2M)
    V	10:16:58.272	Discovering services...
    D	10:16:58.272	gatt.discoverServices()
    D	10:16:58.322	[Callback] Services discovered with status: 0
    I	10:16:58.322	Services discovered
    V	10:16:58.335	Generic Attribute (0x1801)
    - Service Changed [I] (0x2A05)
       Client Characteristic Configuration (0x2902)
    - Client Supported Features [R W] (0x2B29)
    - Database Hash [R] (0x2B2A)
    Generic Access (0x1800)
    - Device Name [R] (0x2A00)
    - Appearance [R] (0x2A01)
    - Peripheral Preferred Connection Parameters [R] (0x2A04)
    Nordic LED Button Service (00001523-1212-efde-1523-785feabcd123)
    - Button [N R] (00001524-1212-efde-1523-785feabcd123)
       Client Characteristic Configuration (0x2902)
    - LED [W] (00001525-1212-efde-1523-785feabcd123)
    SMP Service (8d53dc1d-1db7-4cd3-868b-8a527460aa84)
    - SMP Characteristic [N WNR] (da2e7828-fbce-4e01-ae9e-261174997c48)
       Client Characteristic Configuration (0x2902)
    D	10:16:58.336	gatt.setCharacteristicNotification(00002a05-0000-1000-8000-00805f9b34fb, true)
    D	10:16:58.338	gatt.setCharacteristicNotification(00001524-1212-efde-1523-785feabcd123, true)
    I	10:17:01.925	Connection parameters updated (interval: 43.75ms, latency: 0, timeout: 420ms)
    V	10:17:11.370	[McuMgr] Connecting...
    D	10:17:11.388	[McuMgr] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, LE 1M)
    D	10:17:11.456	[McuMgr] [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
    I	10:17:11.467	[McuMgr] Connected to E1:C7:E4:D3:7E:A3
    D	10:17:11.473	[McuMgr] wait(1600)
    V	10:17:13.082	[McuMgr] Discovering services...
    D	10:17:13.097	[McuMgr] gatt.discoverServices()
    I	10:17:13.147	[McuMgr] Services discovered
    V	10:17:13.158	[McuMgr] Primary service found
    V	10:17:13.184	[McuMgr] Requesting new MTU...
    D	10:17:13.193	[McuMgr] gatt.requestMtu(498)
    I	10:17:13.307	[McuMgr] MTU changed to: 498
    D	10:17:13.321	[McuMgr] gatt.setCharacteristicNotification(da2e7828-fbce-4e01-ae9e-261174997c48, true)
    V	10:17:13.331	[McuMgr] Enabling notifications for da2e7828-fbce-4e01-ae9e-261174997c48
    D	10:17:13.342	[McuMgr] descriptor.setValue(0x01-00)
    D	10:17:13.350	[McuMgr] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb)
    I	10:17:13.489	[McuMgr] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
    I	10:17:13.498	[McuMgr] Notifications enabled
    V	10:17:13.506	[McuMgr] Waiting for value change...
    V	10:17:13.514	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:13.523	[McuMgr] characteristic.setValue(0x000000010000FF06A0)
    D	10:17:13.532	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:13.539	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:13.549	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:13.622	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-06-00-00-FF-06-BF-62-72-63-08-FF
    I	10:17:13.631	[McuMgr] Wait for value changed complete
    A	10:17:13.649	[McuMgr] Received Header (Version: 0, Op: 1, Flags: 0, Len: 6, Group: 0, Seq: 255, Command: 6) CBOR {"rc":8}
    W	10:17:13.658	[McuMgr] Error: NOT_SUPPORTED (8)
    A	10:17:13.674	[McuMgr] Sending (10 bytes) Header (Version: 1, Op: 0, Flags: 0, Len: 2, Group: 0, Seq: 0, Command: 8) CBOR {}
    V	10:17:13.681	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:13.687	[McuMgr] characteristic.setValue(0x0800000200000008BFFF)
    D	10:17:13.694	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:13.700	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:13.721	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:13.805	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 09-00-00-15-00-00-00-08-BF-6A-62-6F-6F-74-6C-6F-61-64-65-72-67-4D-43-55-62-6F-6F-74-FF
    A	10:17:13.823	[McuMgr] Received Header (Version: 1, Op: 1, Flags: 0, Len: 21, Group: 0, Seq: 0, Command: 8) CBOR {"bootloader":"MCUboot"}
    A	10:17:13.890	[McuMgr] Sending (21 bytes) Header (Version: 1, Op: 0, Flags: 0, Len: 13, Group: 0, Seq: 1, Command: 8) CBOR {"query":"mode"}
    V	10:17:13.897	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:13.903	[McuMgr] characteristic.setValue(0x0800000D00000108BF657175657279646D6F6465FF)
    D	10:17:13.910	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:13.917	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:13.917	Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 420ms)
    I	10:17:13.944	[McuMgr] Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 420ms)
    I	10:17:13.951	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:13.971	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 09-00-00-08-00-00-01-08-BF-64-6D-6F-64-65-03-FF
    A	10:17:13.989	[McuMgr] Received Header (Version: 1, Op: 1, Flags: 0, Len: 8, Group: 0, Seq: 1, Command: 8) CBOR {"mode":3}
    A	10:17:14.050	[McuMgr] Sending (10 bytes) Header (Version: 1, Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 2, Command: 0) CBOR {}
    V	10:17:14.060	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:14.066	[McuMgr] characteristic.setValue(0x0800000200010200BFFF)
    D	10:17:14.076	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:14.082	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:14.104	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:14.120	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 09-00-00-8D-00-01-02-00-BF-66-69-6D-61-67-65-73-9F-BF-65-69-6D-61-67-65-00-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-61-5A-4D-5F-24-80-4A-69-41-91-E7-77-BD-BB-F1-86-B2-1A-3B-C6-0D-88-E1-48-89-E5-1B-6C-56-B8-2D-79-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
    A	10:17:14.139	[McuMgr] Received Header (Version: 1, Op: 1, Flags: 0, Len: 141, Group: 1, Seq: 2, Command: 0) CBOR {"images":[{"image":0,"slot":0,"version":"2.5.0","hash":"YVpNXySASmlBked3vbvxhrIaO8YNiOFIieUbbFa4LXk=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false}],"splitStatus":0}
    V	10:17:14.181	[McuMgr] Uploading firmware...
    A	10:17:52.144	[McuMgr] 201624 bytes sent in 37716 ms (5.35 kB/s)
    A	10:17:52.179	[McuMgr] Sending (10 bytes) Header (Version: 1, Op: 2, Flags: 0, Len: 2, Group: 63, Seq: 83, Command: 0) CBOR {}
    V	10:17:52.186	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:52.195	[McuMgr] characteristic.setValue(0x0A000002003F5300BFFF)
    D	10:17:52.201	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:52.209	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:52.223	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:52.245	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 0B-00-00-06-00-3F-53-00-BF-62-72-63-08-FF
    A	10:17:52.259	[McuMgr] Received Header (Version: 1, Op: 3, Flags: 0, Len: 6, Group: 63, Seq: 83, Command: 0) CBOR {"rc":8}
    W	10:17:52.268	[McuMgr] Error: NOT_SUPPORTED (8)
    V	10:17:52.293	[McuMgr] New state: CONFIRM
    A	10:17:52.309	[McuMgr] Sending (58 bytes) Header (Version: 1, Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 84, Command: 0) CBOR {"confirm":true,"hash":"4HcPr+VDfVnL8UNA2T6eZgwJsAMuQcLGPHEtwtGR2CQ="}
    V	10:17:52.323	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:52.330	[McuMgr] characteristic.setValue(0x0A00003200015400BF67636F6E6669726DF564686173685820E0770FAFE5437D59CBF14340D93E9E660C09B0032E41C2C63C712DC2D191D824FF)
    D	10:17:52.338	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:52.352	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:52.367	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:52.449	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 0B-00-01-77-00-01-54-00-BF-66-69-6D-61-67-65-73-9F-BF-65-69-6D-61-67-65-00-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-61-5A-4D-5F-24-80-4A-69-41-91-E7-77-BD-BB-F1-86-B2-1A-3B-C6-0D-88-E1-48-89-E5-1B-6C-56-B8-2D-79-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-65-69-6D-61-67-65-00-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-A7-8A-6D-46-C8-D7-4A-65-F7-4D-B3-A1-85-10-8E-96-61-66-E2-0B-6F-B1-0B-7D-2B-0D-89-27-73-1E-04-0E-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-65-69-6D-61-67-65-01-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-E0-77-0F-AF-E5-43-7D-59-CB-F1-43-40-D9-3E-9E-66-0C-09-B0-03-2E-41-C2-C6-3C-71-2D-C2-D1-91-D8-24-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F5-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F5-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
    A	10:17:52.463	[McuMgr] Received Header (Version: 1, Op: 3, Flags: 0, Len: 375, Group: 1, Seq: 84, Command: 0) CBOR {"images":[{"image":0,"slot":0,"version":"2.5.0","hash":"YVpNXySASmlBked3vbvxhrIaO8YNiOFIieUbbFa4LXk=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"image":0,"slot":1,"version":"2.5.0","hash":"p4ptRsjXSmX3TbOhhRCOlmFm4gtvsQt9Kw2JJ3MeBA4=","bootable":true,"pending":false,"confirmed":false,"active":false,"permanent":false},{"image":1,"slot":1,"version":"2.5.0","hash":"4HcPr+VDfVnL8UNA2T6eZgwJsAMuQcLGPHEtwtGR2CQ=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":true}],"splitStatus":0}
    A	10:17:52.532	[McuMgr] Sending (58 bytes) Header (Version: 1, Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 85, Command: 0) CBOR {"confirm":true,"hash":"p4ptRsjXSmX3TbOhhRCOlmFm4gtvsQt9Kw2JJ3MeBA4="}
    V	10:17:52.540	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:52.545	[McuMgr] characteristic.setValue(0x0A00003200015500BF67636F6E6669726DF564686173685820A78A6D46C8D74A65F74DB3A185108E966166E20B6FB10B7D2B0D8927731E040EFF)
    D	10:17:52.559	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:52.565	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:52.592	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:52.608	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 0B-00-01-77-00-01-55-00-BF-66-69-6D-61-67-65-73-9F-BF-65-69-6D-61-67-65-00-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-61-5A-4D-5F-24-80-4A-69-41-91-E7-77-BD-BB-F1-86-B2-1A-3B-C6-0D-88-E1-48-89-E5-1B-6C-56-B8-2D-79-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F4-69-63-6F-6E-66-69-72-6D-65-64-F5-66-61-63-74-69-76-65-F5-69-70-65-72-6D-61-6E-65-6E-74-F4-FF-BF-65-69-6D-61-67-65-00-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-A7-8A-6D-46-C8-D7-4A-65-F7-4D-B3-A1-85-10-8E-96-61-66-E2-0B-6F-B1-0B-7D-2B-0D-89-27-73-1E-04-0E-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F5-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F5-FF-BF-65-69-6D-61-67-65-01-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-32-2E-35-2E-30-64-68-61-73-68-58-20-E0-77-0F-AF-E5-43-7D-59-CB-F1-43-40-D9-3E-9E-66-0C-09-B0-03-2E-41-C2-C6-3C-71-2D-C2-D1-91-D8-24-68-62-6F-6F-74-61-62-6C-65-F5-67-70-65-6E-64-69-6E-67-F5-69-63-6F-6E-66-69-72-6D-65-64-F4-66-61-63-74-69-76-65-F4-69-70-65-72-6D-61-6E-65-6E-74-F5-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
    A	10:17:52.627	[McuMgr] Received Header (Version: 1, Op: 3, Flags: 0, Len: 375, Group: 1, Seq: 85, Command: 0) CBOR {"images":[{"image":0,"slot":0,"version":"2.5.0","hash":"YVpNXySASmlBked3vbvxhrIaO8YNiOFIieUbbFa4LXk=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"image":0,"slot":1,"version":"2.5.0","hash":"p4ptRsjXSmX3TbOhhRCOlmFm4gtvsQt9Kw2JJ3MeBA4=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":true},{"image":1,"slot":1,"version":"2.5.0","hash":"4HcPr+VDfVnL8UNA2T6eZgwJsAMuQcLGPHEtwtGR2CQ=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":true}],"splitStatus":0}
    V	10:17:52.657	[McuMgr] New state: RESET
    A	10:17:52.699	[McuMgr] Sending (10 bytes) Header (Version: 1, Op: 2, Flags: 0, Len: 2, Group: 0, Seq: 86, Command: 5) CBOR {}
    V	10:17:52.709	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
    D	10:17:52.717	[McuMgr] characteristic.setValue(0x0A00000200005605BFFF)
    D	10:17:52.728	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
    D	10:17:52.736	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
    I	10:17:52.748	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
    I	10:17:52.775	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 0B-00-00-02-00-00-56-05-BF-FF
    A	10:17:52.793	[McuMgr] Received Header (Version: 1, Op: 3, Flags: 0, Len: 2, Group: 0, Seq: 86, Command: 5) CBOR {}
    D	10:17:53.444	[Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)
    E	10:17:53.444	Error 8 (0x8): GATT CONN TIMEOUT
    I	10:17:53.444	Disconnected
    D	10:17:53.461	[McuMgr] [Callback] Connection state changed with status: 8 and new state: 0 (DISCONNECTED)
    W	10:17:53.482	[McuMgr] Error: (0x8): GATT CONN TIMEOUT
    I	10:17:53.508	[McuMgr] Disconnected
    D	10:17:53.525	[McuMgr] gatt.close()
    D	10:17:53.540	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
    D	10:18:02.842	gatt.close()
    D	10:18:02.844	wait(200)
    V	10:18:03.045	Connecting to E1:C7:E4:D3:7E:A3...
    D	10:18:03.045	gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
    D	10:18:08.074	[Callback] Connection state changed with status: 133 and new state: DISCONNECTED (0)
    E	10:18:08.074	Error 133 (0x85): GATT ERROR
    I	10:18:08.074	Disconnected
    

  • Hello,


    The error you see inside the nRF connect App is a bit generic; are you trying to add any custom services or characteristics to your project?
    How are you testing the firmware update? I mean, are you changing anything inside the application to see a visible change? For the debugging logs, have you configured the application? You need to include CONFIG_LOG=y and CONFIG_LOG_BACKEND_UART=y.

     <err> mcumgr_img_grp: Failed to open flash area ID 1: -2

    I have seen this error before; it says trying to open a flash area that doesn't exist, but as far as I remember, this should not stop the firmware update.

    Is this happening with the sample I shared, or have you changed anything inside the sample?

    Kind Regards,

    Abhijith

Related