[McuMgr] Error : NOT_SUPPORTED during DFU by BLE with MCUBoot

Hi

I am currently to add DFU function on my custom device.

So I had McuBoot, and i would like to make the DFU by BLE.

I follow this link in order to do that https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_ble.

It's works well on my nrf5340dk, i also try to report the DFU on peripheral_lbs samples and still working.

But when i am trying to do the same thing on my custom board, i got this error [McuMgr] Error : NOT_SUPPORTED 

nRF Connect, 2023-10-10
KRepgt (CE:71:DC:F2:77:E6)
V	08:47:42.977	[McuMgr] Connecting...
D	08:47:42.981	[McuMgr] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, LE 1M)
D	08:47:43.015	[McuMgr] [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
I	08:47:43.020	[McuMgr] Connected to CE:71:DC:F2:77:E6
D	08:47:43.026	[McuMgr] wait(300)
I	08:47:43.031	[McuMgr] MTU changed to: 498
V	08:47:43.332	[McuMgr] Discovering services...
D	08:47:43.337	[McuMgr] gatt.discoverServices()
I	08:47:43.342	[McuMgr] Services discovered
V	08:47:43.346	[McuMgr] Primary service found
D	08:47:43.614	[McuMgr] gatt.setCharacteristicNotification(da2e7828-fbce-4e01-ae9e-261174997c48, true)
V	08:47:43.622	[McuMgr] Enabling notifications for da2e7828-fbce-4e01-ae9e-261174997c48
D	08:47:43.632	[McuMgr] descriptor.setValue(0x01-00)
D	08:47:43.642	[McuMgr] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb)
I	08:47:43.853	[McuMgr] Data written to descr. 00002902-0000-1000-8000-00805f9b34fb
I	08:47:43.862	[McuMgr] Notifications enabled
V	08:47:43.869	[McuMgr] Waiting for value change...
V	08:47:43.877	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
D	08:47:43.883	[McuMgr] characteristic.setValue(0x000000010000FF06A0)
D	08:47:43.890	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
D	08:47:43.896	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
I	08:47:43.974	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	08:47:44.108	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-19-00-00-FF-06-BF-68-62-75-66-5F-73-69-7A-65-19-09-AB-69-62-75-66-5F-63-6F-75-6E-74-04-FF
I	08:47:44.116	[McuMgr] Wait for value changed complete
A	08:47:44.128	[McuMgr] Received Header (Op: 1, Flags: 0, Len: 25, Group: 0, Seq: 255, Command: 6) CBOR {"buf_size":2475,"buf_count":4}
I	08:47:44.140	[McuMgr] SMP reassembly supported with buffer size: 2475 bytes and count: 4
A	08:47:44.147	[McuMgr] Sending (10 bytes) Header (Op: 0, Flags: 0, Len: 2, Group: 1, Seq: 0, Command: 0) CBOR {}
V	08:47:44.150	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
D	08:47:44.155	[McuMgr] characteristic.setValue(0x0000000200010000BFFF)
D	08:47:44.160	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
D	08:47:44.165	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
I	08:47:44.172	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	08:47:44.322	Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 420ms)
I	08:47:44.367	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 01-00-00-F4-00-01-00-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-B8-B3-9B-09-96-2F-8B-32-C2-EA-EE-F8-78-8E-0D-E3-2B-16-95-60-8A-F8-D1-F6-6E-6A-43-11-5B-BE-21-2A-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-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-BC-1D-3D-F3-0F-1F-9B-C1-93-C2-59-CC-F4-86-D1-FD-75-31-F2-32-44-2B-AF-71-18-FE-4F-2D-34-44-0D-58-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-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
I	08:47:44.377	[McuMgr] Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 420ms)
A	08:47:44.390	[McuMgr] Received Header (Op: 1, Flags: 0, Len: 244, Group: 1, Seq: 0, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"uLObCZYvizLC6u74eI4N4ysWlWCK+NH2bmpDEVu+ISo=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"vB098w8fm8GTwlnM9IbR/XUx8jJEK69xGP5PLTREDVg=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	08:47:44.433	[McuMgr] Uploading firmware...
A	08:47:44.445	[McuMgr] Sending (10 bytes) Header (Op: 2, Flags: 0, Len: 2, Group: 63, Seq: 1, Command: 0) CBOR {}
V	08:47:44.650	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
D	08:47:44.657	[McuMgr] characteristic.setValue(0x02000002003F0100BFFF)
D	08:47:44.664	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
D	08:47:44.670	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
I	08:47:44.695	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	08:47:44.704	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-06-00-3F-01-00-BF-62-72-63-08-FF
A	08:47:44.715	[McuMgr] Received Header (Op: 3, Flags: 0, Len: 6, Group: 63, Seq: 1, Command: 0) CBOR {"rc":8}
W	08:47:44.723	[McuMgr] Error: NOT_SUPPORTED (8)
V	08:47:44.737	[McuMgr] New state: CONFIRM
A	08:47:45.001	[McuMgr] Sending (58 bytes) Header (Op: 2, Flags: 0, Len: 50, Group: 1, Seq: 2, Command: 0) CBOR {"confirm":true,"hash":"vB098w8fm8GTwlnM9IbR/XUx8jJEK69xGP5PLTREDVg="}
V	08:47:45.012	[McuMgr] Writing characteristic da2e7828-fbce-4e01-ae9e-261174997c48 (WRITE COMMAND)
D	08:47:45.019	[McuMgr] characteristic.setValue(0x0200003200010200BF67636F6E6669726DF564686173685820BC1D3DF30F1F9BC193C259CCF486D1FD7531F232442BAF7118FE4F2D34440D58FF)
D	08:47:45.027	[McuMgr] characteristic.setWriteType(WRITE COMMAND)
D	08:47:45.034	[McuMgr] gatt.writeCharacteristic(da2e7828-fbce-4e01-ae9e-261174997c48)
I	08:47:45.058	[McuMgr] Data written to da2e7828-fbce-4e01-ae9e-261174997c48
I	08:47:45.239	[McuMgr] Notification received from da2e7828-fbce-4e01-ae9e-261174997c48, value: (0x) 03-00-00-F4-00-01-02-00-BF-66-69-6D-61-67-65-73-9F-BF-64-73-6C-6F-74-00-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-B8-B3-9B-09-96-2F-8B-32-C2-EA-EE-F8-78-8E-0D-E3-2B-16-95-60-8A-F8-D1-F6-6E-6A-43-11-5B-BE-21-2A-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-64-73-6C-6F-74-01-67-76-65-72-73-69-6F-6E-65-30-2E-30-2E-30-64-68-61-73-68-58-20-BC-1D-3D-F3-0F-1F-9B-C1-93-C2-59-CC-F4-86-D1-FD-75-31-F2-32-44-2B-AF-71-18-FE-4F-2D-34-44-0D-58-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-F4-FF-FF-6B-73-70-6C-69-74-53-74-61-74-75-73-00-FF
A	08:47:45.252	[McuMgr] Received Header (Op: 3, Flags: 0, Len: 244, Group: 1, Seq: 2, Command: 0) CBOR {"images":[{"slot":0,"version":"0.0.0","hash":"uLObCZYvizLC6u74eI4N4ysWlWCK+NH2bmpDEVu+ISo=","bootable":true,"pending":false,"confirmed":true,"active":true,"permanent":false},{"slot":1,"version":"0.0.0","hash":"vB098w8fm8GTwlnM9IbR/XUx8jJEK69xGP5PLTREDVg=","bootable":true,"pending":true,"confirmed":false,"active":false,"permanent":false}],"splitStatus":0}
V	08:47:45.322	[McuMgr] Disconnecting...
D	08:47:45.330	[McuMgr] gatt.disconnect()
D	08:47:45.591	[McuMgr] [Callback] Connection state changed with status: 0 and new state: 0 (DISCONNECTED)
I	08:47:45.600	[McuMgr] Disconnected
D	08:47:45.609	[McuMgr] gatt.close()
I	08:47:50.201	Connection parameters updated (interval: 40.0ms, latency: 0, timeout: 420ms)
V	08:54:07.656	Disconnecting...
D	08:54:07.656	gatt.disconnect()
D	08:54:07.687	[Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I	08:54:07.687	Disconnected
D	08:54:08.702	[Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED

See my prj.conf

# nothing here
CONFIG_RTT_CONSOLE=y

CONFIG_I2C=y
CONFIG_GPIO=y

CONFIG_NEWLIB_LIBC=y

# BLE definition 
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_DM=y

CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_DEVICE_NAME="KRepet"
CONFIG_BT_DEVICE_APPEARANCE=962

CONFIG_HEAP_MEM_POOL_SIZE=2048

CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_UUID_CNT=8

CONFIG_MPSL=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_SIMPLE_GPIO=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

CONFIG_SECURE_BOOT=n

# Enable SMP Server
CONFIG_MCUMGR=y
CONFIG_MCUMGR_GRP_IMG=y

# CONFIG_MCUMGR_GRP_IMG dependencies
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y

# CONFIG_IMG_MANAGER dependencies
CONFIG_STREAM_FLASH=y

# CONFIG_MCUMGR dependencies
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y

# Required for CONFIG_IMG_MANAGER
CONFIG_FLASH_MAP=y

# Enable BLE transfer
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

I am not using an external flash to do the DFU.

My environment are

-IDE : Visual Studio Code

-Zephyr: V2.4.1

-OS: Windows

-custom Board: nrf52833

Thanks,

Best Regards,

Julien

Related