Check and configure the following Kconfig options:
-
CONFIG_APP_FOTA: Enables the FOTA module. Enabled by default.
-
CONFIG_APP_FOTA_SHELL: Enables the FOTA shell commands. Enabled by default when the shell is available.
-
CONFIG_APP_FOTA_THREAD_STACK_SIZE: Sets the stack size for the FOTA module thread.
-
CONFIG_APP_FOTA_WATCHDOG_TIMEOUT_SECONDS: Defines the timeout in seconds for the FOTA module watchdog. This timeout covers both waiting for incoming messages and message processing time. The download runs asynchronously and is not part of the processing time, so the timeout only has to cover the blocking CoAP poll that checks for and reports a job.
-
CONFIG_APP_FOTA_MSG_PROCESSING_TIMEOUT_SECONDS: Sets the maximum time allowed for processing a single message in the module's state machine. This value must be smaller than the watchdog timeout.
-
CONFIG_APP_FOTA_LOG_LEVEL_*: Controls the logging level for the FOTA module. This follows Zephyr's standard logging configuration pattern.
The download needs a DTLS context of its own while the cloud session is connected, so CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS must be at least 2. See Troubleshooting if downloads fail to create a socket.