From b2376a4050224201fc872cdc1e60bb756319b2b8 Mon Sep 17 00:00:00 2001 From: rbaron Date: Sat, 11 May 2024 10:38:27 +0200 Subject: [PATCH] Re-create separate prj_fota.conf --- code/nrf-connect/samples/zigbee/Kconfig | 36 ------- code/nrf-connect/samples/zigbee/prj.conf | 5 - code/nrf-connect/samples/zigbee/prj_fota.conf | 96 +++++++++++++++++++ 3 files changed, 96 insertions(+), 41 deletions(-) create mode 100644 code/nrf-connect/samples/zigbee/prj_fota.conf diff --git a/code/nrf-connect/samples/zigbee/Kconfig b/code/nrf-connect/samples/zigbee/Kconfig index f34acc6..4ce621a 100644 --- a/code/nrf-connect/samples/zigbee/Kconfig +++ b/code/nrf-connect/samples/zigbee/Kconfig @@ -46,39 +46,3 @@ endchoice # PRST_ZB_FACTORY_RESET_METHOD config PRST_ZB_RESTART_WATCHDOG_TIMEOUT_SEC int "Duration after the device will restart the rejoin procedure if a network has not been successfully joined." default 3600 - -if ZIGBEE_FOTA - -config ZIGBEE_FOTA_ENDPOINT - int "Endpoint number for ota zigbee endpoint. Must not be used by another application." - default 5 - -config ZIGBEE_FOTA_COMMENT - string - default "b-parasite" - -config IMG_MANAGER - bool "Ensure an MCUboot-compatible binary for ota update is generated." - default y - -config STREAM_FLASH - bool - default y - -config DFU_TARGET_MCUBOOT - bool - default y - -config IMG_ERASE_PROGRESSIVELY - bool - default y - -config ZIGBEE_FOTA_PROGRESS_EVT - bool - default y - -config NRF_802154_RX_BUFFERS - int "Increase the number of RX buffers for ota functionality." - default 32 - -endif diff --git a/code/nrf-connect/samples/zigbee/prj.conf b/code/nrf-connect/samples/zigbee/prj.conf index 9dbefe1..9e20278 100644 --- a/code/nrf-connect/samples/zigbee/prj.conf +++ b/code/nrf-connect/samples/zigbee/prj.conf @@ -70,8 +70,3 @@ CONFIG_ASSERT=y # Factory reset method selection. Only hardware revision 2.0.0+ has button SW1. Earlier # revisions must select a different method. See Kconfig for options. # CONFIG_PRST_ZB_FACTORY_RESET_VIA_SW1=y -## OTA section - -# OTA update configuration. This is based on the zigbee light switch example from the nrf-connect toolkit. -CONFIG_ZIGBEE_FOTA=n -CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0" # Increase this version for generating an update for the devices. diff --git a/code/nrf-connect/samples/zigbee/prj_fota.conf b/code/nrf-connect/samples/zigbee/prj_fota.conf new file mode 100644 index 0000000..e9d769a --- /dev/null +++ b/code/nrf-connect/samples/zigbee/prj_fota.conf @@ -0,0 +1,96 @@ + +CONFIG_LOG=y +CONFIG_PWM=y +CONFIG_I2C=y +CONFIG_ADC=y +CONFIG_GPIO=y + +CONFIG_USE_SEGGER_RTT=y +CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096 + +CONFIG_NEWLIB_LIBC=y +CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y + +CONFIG_SERIAL=n + +CONFIG_HEAP_MEM_POOL_SIZE=2048 +CONFIG_MAIN_THREAD_PRIORITY=7 + +CONFIG_ZIGBEE=y +CONFIG_ZIGBEE_APP_UTILS=y +CONFIG_ZIGBEE_ROLE_END_DEVICE=y + +# This example requires more workqueue stack +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# Enable nRF ECB driver +CONFIG_CRYPTO=y +CONFIG_CRYPTO_NRF_ECB=y +CONFIG_CRYPTO_INIT_PRIORITY=80 + +# Networking +CONFIG_NET_IPV6=n +CONFIG_NET_IPV6_MLD=n +CONFIG_NET_IPV6_NBR_CACHE=n +CONFIG_NET_IPV6_RA_RDNSS=n +CONFIG_NET_IP_ADDR_CHECK=n +CONFIG_NET_UDP=n + +## +## ZigBee Channel Selection +## +# Get Zigbee to scan every channel. +CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_MULTI=y +# By default only scans channel 11 (ZigBee2MQTT default) and 15 (ZHA default). +# Comment to scan all channels - this will make pairing consume more energy. +# CONFIG_ZIGBEE_CHANNEL_MASK=0x8800 + +# Uncomment to set a specific channel - this will make pairing more energy efficient. +# CONFIG_ZIGBEE_CHANNEL=11 + +# Enable API for powering down unused RAM parts. +# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/ug_zigbee_configuring.html#power-saving-during-sleep +CONFIG_RAM_POWER_DOWN_LIBRARY=y + +# LittleFS. +CONFIG_MAIN_STACK_SIZE=2048 +CONFIG_FLASH=y +CONFIG_FLASH_MAP=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FILE_SYSTEM=y +CONFIG_FILE_SYSTEM_LITTLEFS=y + +CONFIG_WATCHDOG=y +CONFIG_HWINFO=y +CONFIG_ASSERT=y + +# Uncomment for debug log level. +# CONFIG_LOG_DEFAULT_LEVEL=4 + +# Factory reset method selection. Only hardware revision 2.0.0+ has button SW1. Earlier +# revisions must select a different method. See Kconfig for options. +# CONFIG_PRST_ZB_FACTORY_RESET_VIA_SW1=y + +## +## OTA section. +## + +# Software build version in the basic_attrs cluster. +CONFIG_PRST_ZB_SOFTWARE_VERSION="test-sw-1" + +# Enable Zigbee FOTA library +CONFIG_ZIGBEE_FOTA=y +CONFIG_ZIGBEE_FOTA_HW_VERSION=52 +CONFIG_ZIGBEE_FOTA_ENDPOINT=5 +CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0" +CONFIG_ZIGBEE_FOTA_COMMENT="b-parasite" + +# Ensure an MCUboot-compatible binary is generated. +CONFIG_IMG_MANAGER=y +CONFIG_STREAM_FLASH=y +CONFIG_DFU_TARGET_MCUBOOT=y +CONFIG_IMG_ERASE_PROGRESSIVELY=y +CONFIG_ZIGBEE_FOTA_PROGRESS_EVT=y + +# Increase the number of RX buffers +CONFIG_NRF_802154_RX_BUFFERS=32