|
| 1 | +# |
| 2 | +# Copyright (c) 2026 Nordic Semiconductor ASA |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause |
| 5 | +# |
| 6 | + |
| 7 | +config ZIGBEE_BT_DFU |
| 8 | + bool "Enable DFU over Bluetooth LE SMP feature set" |
| 9 | + depends on !CHIP |
| 10 | + select BOOTLOADER_MCUBOOT |
| 11 | + select BT |
| 12 | + select BT_PERIPHERAL |
| 13 | + select MCUMGR |
| 14 | + select MCUMGR_TRANSPORT_BT |
| 15 | + select IMG_MANAGER |
| 16 | + select STREAM_FLASH |
| 17 | + select ZCBOR |
| 18 | + select MCUMGR_GRP_IMG |
| 19 | + select MCUMGR_GRP_OS |
| 20 | + select MCUMGR_GRP_IMG_STATUS_HOOKS |
| 21 | + # Enable custom SMP request to erase settings partition. |
| 22 | + select MCUMGR_GRP_ZBASIC |
| 23 | + select MCUMGR_GRP_ZBASIC_STORAGE_ERASE |
| 24 | + select MCUMGR_TRANSPORT_BT_REASSEMBLY |
| 25 | + help |
| 26 | + Enables Device Firmware Upgrade over Bluetooth LE with SMP and configures |
| 27 | + the set of options related to that feature. |
| 28 | + |
| 29 | + Cannot be combined with Matter (CONFIG_CHIP), as it requires different Bluetooth LE orchestration. |
| 30 | + Use Matter's CONFIG_CHIP_DFU_OVER_BT_SMP instead. |
| 31 | + |
| 32 | +if ZIGBEE_BT_DFU |
| 33 | + |
| 34 | +config BT_MAX_CONN |
| 35 | + default 1 |
| 36 | + |
| 37 | +# MCU Manager and SMP configuration |
| 38 | +choice MCUMGR_TRANSPORT_BT_PERM |
| 39 | + default MCUMGR_TRANSPORT_BT_PERM_RW |
| 40 | +endchoice |
| 41 | + |
| 42 | +config MCUMGR_TRANSPORT_NETBUF_COUNT |
| 43 | + default 6 |
| 44 | + |
| 45 | +config MCUMGR_MGMT_NOTIFICATION_HOOKS |
| 46 | + bool |
| 47 | + default y |
| 48 | + |
| 49 | +config MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK |
| 50 | + bool |
| 51 | + default y |
| 52 | + |
| 53 | +config MCUMGR_SMP_COMMAND_STATUS_HOOKS |
| 54 | + bool |
| 55 | + default y |
| 56 | + |
| 57 | +# Increase BT MTU and RX buffer sizes to improve DFU throughput |
| 58 | +config BT_L2CAP_TX_MTU |
| 59 | + default 498 |
| 60 | + |
| 61 | +config BT_BUF_ACL_RX_SIZE |
| 62 | + default 502 |
| 63 | + |
| 64 | +# Increase MCUMGR_TRANSPORT_NETBUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B |
| 65 | +config MCUMGR_TRANSPORT_NETBUF_SIZE |
| 66 | + default 1024 |
| 67 | + |
| 68 | +# Increase system workqueue size, as SMP is processed within it |
| 69 | +config SYSTEM_WORKQUEUE_STACK_SIZE |
| 70 | + default 2800 |
| 71 | + |
| 72 | +if SOC_SERIES_NRF53 |
| 73 | + |
| 74 | +# Enable custom SMP request to erase settings partition. |
| 75 | +config MCUMGR_GRP_ZBASIC |
| 76 | + default y |
| 77 | + |
| 78 | +config MCUMGR_GRP_ZBASIC_STORAGE_ERASE |
| 79 | + default y |
| 80 | + |
| 81 | +endif # SOC_SERIES_NRF53 |
| 82 | + |
| 83 | +module = ZIGBEE_BT_DFU |
| 84 | +module-str = Zigbee Bluetooth LE DFU |
| 85 | +source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" |
| 86 | + |
| 87 | +endif # ZIGBEE_BT_DFU |
| 88 | + |
0 commit comments